From 723704ef0542c2692bce9cc43c2ed2841afb7f04 Mon Sep 17 00:00:00 2001 From: parmsam Date: Wed, 4 Sep 2024 08:38:23 -0400 Subject: [PATCH] Built site for gh-pages --- .nojekyll | 2 +- README.md | 4 ++++ example.html | 2 +- example_files/libs/revealjs/plugin/reveal-quiz/quiz.js | 5 ++++- index.html | 2 +- 5 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.nojekyll b/.nojekyll index 94d0b85..691df83 100644 --- a/.nojekyll +++ b/.nojekyll @@ -1 +1 @@ -d049d733 \ No newline at end of file +241676b8 \ No newline at end of file diff --git a/README.md b/README.md index 3a793f2..b606a82 100644 --- a/README.md +++ b/README.md @@ -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: + +Example of Quiz Extension + ## Installing This will install the extension under the `_extensions` subdirectory. diff --git a/example.html b/example.html index 2235721..7f09d57 100644 --- a/example.html +++ b/example.html @@ -447,7 +447,7 @@

What is the capital of Germany?

Python lists

What is the value of x[2]?

-
+
x = [2, 3, 4]
 x[2] = 4
 print(x[2])
diff --git a/example_files/libs/revealjs/plugin/reveal-quiz/quiz.js b/example_files/libs/revealjs/plugin/reveal-quiz/quiz.js index a56d2a3..53033c8 100644 --- a/example_files/libs/revealjs/plugin/reveal-quiz/quiz.js +++ b/example_files/libs/revealjs/plugin/reveal-quiz/quiz.js @@ -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(); } }); }; diff --git a/index.html b/index.html index 2235721..7f09d57 100644 --- a/index.html +++ b/index.html @@ -447,7 +447,7 @@

What is the capital of Germany?

Python lists

What is the value of x[2]?

-
+
x = [2, 3, 4]
 x[2] = 4
 print(x[2])