diff options
author | Alex Auvolat <alex@adnab.me> | 2024-03-15 16:41:14 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2024-03-15 16:49:31 +0100 |
commit | 32dccce54d58e81ea16463321b1a54de9371c555 (patch) | |
tree | 40f24f46609dd1f21e9d91ee28247fa174638d7b /static | |
parent | 6150eba66beb96d03a3e2af839737e3ef4c0a086 (diff) | |
download | datagengo-32dccce54d58e81ea16463321b1a54de9371c555.tar.gz datagengo-32dccce54d58e81ea16463321b1a54de9371c555.zip |
add backlinks to kanji in generated practice
Diffstat (limited to 'static')
-rw-r--r-- | static/script.js | 2 | ||||
-rw-r--r-- | static/style.css | 14 |
2 files changed, 15 insertions, 1 deletions
diff --git a/static/script.js b/static/script.js index 72fcb1c..639e743 100644 --- a/static/script.js +++ b/static/script.js @@ -26,6 +26,7 @@ function display_example(i) { $("#gen_ex_display").html(examples[i].furi); $("#gen_ex_en").html(examples[i].en); $("#gen_ex_words").html(examples[i].vocab); + $("#gen_ex_kanji").html(examples[i].kanji); $("#gen_section").addClass("gen_hidden"); current = i; revealed = false; @@ -45,4 +46,5 @@ function spacebar() { $("#gen_section").removeClass("gen_hidden"); revealed = true; } + window.scrollTo(0, 0); } diff --git a/static/style.css b/static/style.css index fbe8e7d..b699ead 100644 --- a/static/style.css +++ b/static/style.css @@ -150,7 +150,11 @@ details .chars { padding-bottom: 1em; } -#gen_ex_words table td { +#gen_ex_words table, #gen_ex_kanji table { + margin: auto; +} + +#gen_ex_words table td, #gen_ex_kanji table td { text-align: left; } @@ -160,6 +164,10 @@ details .chars { padding-bottom: 3em; } +#gen_ex_words { + padding-bottom: 1em; +} + #gen_section.gen_hidden #gen_ex_en { visibility: hidden; } @@ -168,6 +176,10 @@ details .chars { visibility: hidden; } +#gen_section.gen_hidden #gen_ex_kanji { + visibility: hidden; +} + #gen_section.gen_hidden #gen_ex_display rt { visibility: hidden; } |