Skip to content

Commit

Permalink
Built site for gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
parmsam committed Sep 4, 2024
1 parent cd68d32 commit 723704e
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .nojekyll
Original file line number Diff line number Diff line change
@@ -1 +1 @@
d049d733
241676b8
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

Simple RevealJS that allows you to create multiple choice quiz questions in Quarto.

Here's an example of what this extension looks like:

<img src="example.png" alt="Example of Quiz Extension" width="70%"/>

## Installing

This will install the extension under the `_extensions` subdirectory.
Expand Down
2 changes: 1 addition & 1 deletion example.html
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ <h2>What is the capital of Germany?</h2>
<section id="python-lists" class="slide level2 quiz-question">
<h2>Python lists</h2>
<p>What is the value of x[2]?</p>
<div id="2d75fbd6" class="cell" data-execution_count="1">
<div id="576a2e2a" class="cell" data-execution_count="1">
<div class="sourceCode cell-code" id="cb1"><pre class="sourceCode numberSource python number-lines code-with-copy"><code class="sourceCode python"><span id="cb1-1"><a href=""></a>x <span class="op">=</span> [<span class="dv">2</span>, <span class="dv">3</span>, <span class="dv">4</span>]</span>
<span id="cb1-2"><a href=""></a>x[<span class="dv">2</span>] <span class="op">=</span> <span class="dv">4</span></span>
<span id="cb1-3"><a href=""></a><span class="bu">print</span>(x[<span class="dv">2</span>])</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
Expand Down
5 changes: 4 additions & 1 deletion example_files/libs/revealjs/plugin/reveal-quiz/quiz.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,10 @@ window.RevealQuiz = function () {
// Check if the pressed key is a number that corresponds to an option button
if (index >= 0 && index < options.length) {
// Simulate a click on the corresponding option button
options[index].click();
// only simulate on the current slide
let currentSlide = deck.getCurrentSlide();
let optionButtons = currentSlide.querySelectorAll('.option-button');
optionButtons[index].click();
}
});
};
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ <h2>What is the capital of Germany?</h2>
<section id="python-lists" class="slide level2 quiz-question">
<h2>Python lists</h2>
<p>What is the value of x[2]?</p>
<div id="2d75fbd6" class="cell" data-execution_count="1">
<div id="576a2e2a" class="cell" data-execution_count="1">
<div class="sourceCode cell-code" id="cb1"><pre class="sourceCode numberSource python number-lines code-with-copy"><code class="sourceCode python"><span id="cb1-1"><a href=""></a>x <span class="op">=</span> [<span class="dv">2</span>, <span class="dv">3</span>, <span class="dv">4</span>]</span>
<span id="cb1-2"><a href=""></a>x[<span class="dv">2</span>] <span class="op">=</span> <span class="dv">4</span></span>
<span id="cb1-3"><a href=""></a><span class="bu">print</span>(x[<span class="dv">2</span>])</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
Expand Down

0 comments on commit 723704e

Please sign in to comment.