From f36b4650b8675891efd360a074761aa48c93a9dd Mon Sep 17 00:00:00 2001 From: sam17kd Date: Tue, 17 Nov 2020 21:06:38 +0100 Subject: [PATCH] qic tooltip, handout-deck.md updates --- resource/support/css/_quizzes.scss | 17 ++++-- resource/support/css/decker.css | 12 +++- resource/support/css/mario.css | 8 ++- resource/support/plugins/quiz-wue/quiz-wue.js | 6 +- test/decks/handout-deck.md | 55 +++++++++++-------- 5 files changed, 65 insertions(+), 33 deletions(-) diff --git a/resource/support/css/_quizzes.scss b/resource/support/css/_quizzes.scss index f56758a4..048dd4d3 100644 --- a/resource/support/css/_quizzes.scss +++ b/resource/support/css/_quizzes.scss @@ -665,13 +665,20 @@ _:-ms-lang(x), max-height: initial; &.plain { width: 100%; + .matchItems { + align-items: stretch !important; + } .matchQuestion { font-size: var(--font-size-small) !important; - .optList, - .optList p, - .optList p::before, - .optList p::after { - color: #fff !important; + .optList { + color: #fff !important; + background-color: #fff; + max-height: 1em; + p, + p::before, + p::after { + color: #fff !important; + } } } .matchItems { diff --git a/resource/support/css/decker.css b/resource/support/css/decker.css index 675ecb9a..a338fe24 100644 --- a/resource/support/css/decker.css +++ b/resource/support/css/decker.css @@ -1312,15 +1312,23 @@ _.plain:-ms-lang(x) .options, .reveal .slides section .plain[class*="quiz-"] { width: 100%; } + .reveal .slides section .qmi.plain .matchItems, +.reveal .slides section .plain[class*="quiz-"] .matchItems { + align-items: stretch !important; + } .reveal .slides section .qmi.plain .matchQuestion, .reveal .slides section .plain[class*="quiz-"] .matchQuestion { font-size: var(--font-size-small) !important; } .reveal .slides section .qmi.plain .matchQuestion .optList, -.reveal .slides section .qmi.plain .matchQuestion .optList p, +.reveal .slides section .plain[class*="quiz-"] .matchQuestion .optList { + color: #fff !important; + background-color: #fff; + max-height: 1em; + } + .reveal .slides section .qmi.plain .matchQuestion .optList p, .reveal .slides section .qmi.plain .matchQuestion .optList p::before, .reveal .slides section .qmi.plain .matchQuestion .optList p::after, -.reveal .slides section .plain[class*="quiz-"] .matchQuestion .optList, .reveal .slides section .plain[class*="quiz-"] .matchQuestion .optList p, .reveal .slides section .plain[class*="quiz-"] .matchQuestion .optList p::before, .reveal .slides section .plain[class*="quiz-"] .matchQuestion .optList p::after { diff --git a/resource/support/css/mario.css b/resource/support/css/mario.css index 0731c4d4..dc97d10b 100644 --- a/resource/support/css/mario.css +++ b/resource/support/css/mario.css @@ -1260,7 +1260,6 @@ div.q-panel { .reveal .qic .tooltip-div, .reveal [class*="quiz-i"] .tooltip-div { font-size: 0.6em; - background-color: #f4f4f7; margin: 0.5em auto 0 auto; padding: 0.5em; visibility: hidden; @@ -1268,7 +1267,12 @@ div.q-panel { .reveal .qic .tooltip-div.solved, .reveal [class*="quiz-i"] .tooltip-div.solved { - visibility: visible; + visibility: visible; +} + +.reveal .qic .tooltip-div.solved .tooltip, +.reveal [class*="quiz-i"] .tooltip-div.solved .tooltip { + background-color: #f4f4f7; } .reveal .quiz-mi, diff --git a/resource/support/plugins/quiz-wue/quiz-wue.js b/resource/support/plugins/quiz-wue/quiz-wue.js index 8f2290c2..ec9bdfba 100644 --- a/resource/support/plugins/quiz-wue/quiz-wue.js +++ b/resource/support/plugins/quiz-wue/quiz-wue.js @@ -144,8 +144,10 @@ function quizIC() { if (sel.classList.contains('solved')) { const answers = solutionList.getElementsByTagName('li'); const tip = answers.item(sel.selectedIndex - 1).querySelector('.tooltip'); - const cln = tip.cloneNode(true); - tipDiv.appendChild(cln); + if (tip.innerHTML !== "") { + const cln = tip.cloneNode(true); + tipDiv.appendChild(cln); + } tipDiv.classList.add('solved'); }}); sel.addEventListener("mouseleave", () => { diff --git a/test/decks/handout-deck.md b/test/decks/handout-deck.md index 78d2f5c0..96467196 100644 --- a/test/decks/handout-deck.md +++ b/test/decks/handout-deck.md @@ -7,6 +7,8 @@ showNotes: True subtitle: Generate handouts from slide source title: Handout Test title-prefix: Decker +quiz: + style: plain --- # Notes @@ -149,49 +151,58 @@ title-prefix: Decker # Matching Questions -{match} A +## {.qmi} + +A : drag to A -{match} Haskell +Haskell : ![](include/06-metal.png) -{match} B +B : drag to B -{match} decker +decker : [decker](http://go.uniwue.de/decker) -{match} C +C : $\Leftarrow$ C # Freetext Questions {layout="columns"} -## {.left} -* {?} $2*2=~?$ -* {!} 4 +## {.left .qft} + +$2*2=~?$ + +- 4 + - Die perfekte Lösung + + +## {.qft} + +The Answer to the Ultimate Question of Life, the Universe, and Everything is ...? + +- 42 -## {.question} +## {.right .qft} -* {?} The Answer to the Ultimate Question of Life, the Universe, and Everything is ...? -* {!} 42 +Is this a question? -## {.right} +- yes -* {?} Is this a question? -* {!} yes +## {.qft} -## +Name the capital of Germany -* {?} Name the capital of Germany -* {!} Berlin +- Berlin # Multiple Choice Questions -## Question: Which file format does decker use? {.question} +## Question: Which file format does decker use? {.qmc} -* { } .docx -* { } .csv -* { } .xml -* {X} .md +- [ ] .docx +- [ ] .csv +- [ ] .xml +- [X] .md -- GitLab