mirror of
https://github.com/ZetaKebab/japanese-conjugation-drill.git
synced 2025-01-14 22:08:44 +00:00
Added permanent furigana on questions and better scoreboard.
This commit is contained in:
parent
68f75046a1
commit
e009289965
@ -67,6 +67,7 @@ body, input {
|
||||
}
|
||||
|
||||
#message {
|
||||
margin-top: 10px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@ -155,7 +156,7 @@ div#history table {
|
||||
|
||||
div#history table th,
|
||||
div#history table td {
|
||||
padding: 8px;
|
||||
padding: 10px 16px 10px 16px;
|
||||
border: 1px solid gray;
|
||||
}:
|
||||
|
||||
@ -169,7 +170,8 @@ div.options > * {
|
||||
margin: 20px;
|
||||
}
|
||||
|
||||
div#splash > * {
|
||||
div#splash > *,
|
||||
div#scoreSection > * {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
display: table;
|
||||
@ -200,7 +202,8 @@ div.options ul {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
[tooltip]:hover:before {
|
||||
[tooltip]:hover:before,
|
||||
.furiganaAlways #question [tooltip]:before {
|
||||
/* needed - do not touch */
|
||||
opacity: 1;
|
||||
|
||||
@ -226,9 +229,9 @@ div.options ul {
|
||||
#question .tooltip-w2[tooltip]:before { font-size: 12px; margin-left: 8px; }
|
||||
#question .tooltip-w3[tooltip]:before { font-size: 12px; margin-left: 2px; }
|
||||
|
||||
#question .tooltip-w1[tooltip]:hover:before,
|
||||
#question .tooltip-w2[tooltip]:hover:before,
|
||||
#question .tooltip-w3[tooltip]:hover:before { margin-top: -12px; }
|
||||
#question .tooltip-w1[tooltip]:hover:before, .furiganaAlways #question .tooltip-w1[tooltip]:before,
|
||||
#question .tooltip-w2[tooltip]:hover:before, .furiganaAlways #question .tooltip-w2[tooltip]:before,
|
||||
#question .tooltip-w3[tooltip]:hover:before, .furiganaAlways #question .tooltip-w3[tooltip]:before { margin-top: -12px; }
|
||||
|
||||
div#explanation p span {
|
||||
}
|
||||
|
@ -74,12 +74,17 @@
|
||||
<div>
|
||||
<label><input type="checkbox" id="kana"> Use hiragana throughout the test (no kanji)</label>
|
||||
</div>
|
||||
<div>
|
||||
<label><input type="checkbox" id="furigana_always"> Always show furigana on questions</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="scoreSection">
|
||||
|
||||
<div id="scoreSectionTitle"></div>
|
||||
|
||||
<div id="history">
|
||||
</div>
|
||||
|
||||
|
@ -483,7 +483,15 @@ function updateHistoryView(log) {
|
||||
|
||||
$('#history').empty().append(review);
|
||||
|
||||
$('#history').append("<p>" + correct + " of " + total + " correct.</p>");
|
||||
var resultString;
|
||||
|
||||
if (correct == total) {
|
||||
resultString = "All correct";
|
||||
} else {
|
||||
resultString = correct + " of " + total + " correct";
|
||||
}
|
||||
|
||||
$('#scoreSectionTitle').html("<h1>Result: " + resultString + "</h1>");
|
||||
}
|
||||
|
||||
function proceed() {
|
||||
@ -507,6 +515,14 @@ function startQuiz() {
|
||||
$('#quizSection').show();
|
||||
$('#scoreSection').hide();
|
||||
|
||||
var options = getOptions();
|
||||
|
||||
if (options.furigana_always) {
|
||||
$('body').addClass("furiganaAlways");
|
||||
} else {
|
||||
$('body').removeClass("furiganaAlways");
|
||||
}
|
||||
|
||||
resetLog();
|
||||
generateQuestion();
|
||||
}
|
||||
@ -696,7 +712,7 @@ function getOptions() {
|
||||
var options = ["plain", "polite", "negative", "past", "te-form",
|
||||
"progressive", "potential", "imperative", "passive", "causative",
|
||||
"godan", "ichidan", "iku", "kuru", "suru", "i-adjective", "na-adjective",
|
||||
"ii", "desire", "volitional", "trick", "kana"];
|
||||
"ii", "desire", "volitional", "trick", "kana", "furigana_always"];
|
||||
|
||||
var result = {};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user