}
else {
Html({
- raw => join("\n", map qq(<script src="/word/$_"></script>),
- 'put.min.js', 'quiz.js', "$name.js",
+ raw => join("\n",
+ (map {qq(<script src="/word/$_"></script>)}
+ 'put.min.js', 'quiz.js', "$name.js",
+ ),
+ (map {qq(<link rel="stylesheet" type="text/css" href="/$_">)}
+ grep {-e} "word/$name.css"
+ ),
),
lang => $lang,
});
innerHTML: this.namehtml(title),
});
}
- if (level <= 1 && subs.length >= 2) {
+ if (level <= 1 && subs.length >= 4) {
put(worditem, '.large');
}
if (subs.length) {
-<(../common.inc.plp)><:
-
-our $wordlistbase;
-
-Html({
- raw => <<'EOT',
-<script src="/word/put.min.js"></script>
-<script src="/word/quiz.js"></script>
-<script src="/word/memory.js"></script>
-<style>
/* cards */
#quiz {
display: grid;
66% { filter: hue-rotate(360deg); transform: rotate(360deg) }
100% { filter: hue-rotate(360deg); transform: rotate(360deg) }
}
-</style>
-EOT
-});
-say '<h1>memory</h1><p id="quiz"></p>';
-say "<script>new WordMemory('/$wordlistbase.json')</script>";
--- /dev/null
+img {
+ width: 90vw;
+ max-width: 64em;
+ margin: 2em 0 1ex;
+}
+li {
+ font-size: 20pt;
+ padding: .2ex;
+}
+li:hover {
+ cursor: pointer;
+ background: #8888;
+}
+li.wrong {background: #F008}
+li.good {background: #0F08}
-class WordMultiChoice extends WordQuiz {
+class WordMultichoice extends WordQuiz {
next() {
if (this.words.length < 4) return;
let word = this.words.shift();
+++ /dev/null
-<(../common.inc.plp)><:
-
-our $wordlistbase;
-
-Html({
- raw => <<'EOT',
-<script src="/word/put.min.js"></script>
-<script src="/word/quiz.js"></script>
-<script src="/word/multichoice.js"></script>
-<style>
-img {
- width: 90vw;
- max-width: 64em;
- margin: 2em 0 1ex;
-}
-li {
- font-size: 20pt;
- padding: .2ex;
-}
-li:hover {
- cursor: pointer;
- background: #8888;
-}
-li.wrong {background: #F008}
-li.good {background: #0F08}
-</style>
-EOT
-});
-
-say '<h1 id=quiz>quiz</h1>';
-say "<script>new WordMultiChoice('/$wordlistbase.json')</script>";
-<(../common.inc.plp)><:
-
-our $wordlistbase;
-
-Html({
- raw => <<'EOT',
-<script src="/word/put.min.js"></script>
-<script src="/word/quiz.js"></script>
-<script src="/word/wijzer.js"></script>
-<style>
#quiz {
display: grid;
grid: auto / 2fr 1fr;
grid-column: auto;
}
}
-</style>
-EOT
-});
-
-say '<h1>per seconde wijzer</h1><div id=quiz></div>';
-say "<script>new WordWijzer('/$wordlistbase.json')</script>";