diff --git a/src/components/answer-details.css b/src/components/answer-details.css index 957a2b49c310145f29fae14bb62200a4949532ff..a6a882dfa02cb18d478b4a01ff2e145206ee772f 100644 --- a/src/components/answer-details.css +++ b/src/components/answer-details.css @@ -1,3 +1,8 @@ +.answer-details { + margin-top: 1em; + margin-bottom: 1em; +} + .answer-details:has(> summary:only-child) { display: none; } @@ -10,15 +15,16 @@ max-width: 10em; margin-left: auto; margin-right: auto; - margin-bottom: 1em; transition: border-color var(--default-transition-time) ease, color var(--default-transition-time) ease; cursor: pointer; + text-align: center; } .answer-details[open] > summary { border-color: var(--color-fg); color: var(--color-fg); + margin-bottom: 1em; } .answer-details > summary > .answer-details-less { diff --git a/src/components/notice/notice.css b/src/components/notice/notice.css index 868c51217d89ddfdef3240c9f3c487dacccd100b..4c8e028e579098a384dddbfc75d2c7bf8982a906 100644 --- a/src/components/notice/notice.css +++ b/src/components/notice/notice.css @@ -1,46 +1,7 @@ -.notice-btn-open-text, -.notice-btn-close-text { - display: inline-block; - font-weight: 700; - border: 1px solid rgba(0, 0, 0, 0.12); - border-radius: 0.3rem; - padding: 0.1rem 0.4rem; - font-size: 2em; -} - -.notice-btn-open-text { - color: rgba(0, 0, 0, 0.5); -} - -.nightMode .notice-btn-open-text { - color: rgba(255, 255, 255, 0.5); -} - -.notice-btn-open-text { - display: inline; -} - -.notice-btn-close-text { - display: none; -} - -details[open] .notice-btn-open-text { - display: none; -} - -details[open] .notice-btn-close-text { - display: inline; -} - -.notice-btn { - text-align: center; - cursor: pointer; -} - .notice-contents { text-align: justify; } .notice-contents ul { list-style-type: none; -} \ No newline at end of file +} diff --git a/src/components/notice/notice.html b/src/components/notice/notice.html index 524b64dca9bf2e473e8f07145476c16a662077da..2067e20b2e55c1fdfe1129b63d9e4c9bd5e7853b 100644 --- a/src/components/notice/notice.html +++ b/src/components/notice/notice.html @@ -1,13 +1,14 @@ -<details> - <summary class="notice-btn" title="About this template…"> - <span class="notice-btn-open-text">?</span> - <span class="notice-btn-close-text">?</span> +<details class="answer-details"> + <summary> + <span class="answer-details-more">About this deck…</span> + <span class="answer-details-less">Hide notice…</span> </summary> <aside class="notice-contents"> <p> - This Anki card template and some decks made with it are open source software available on + The code that makes this deck work is open source software available on <a href="https://gitlab.phaidra.org/kartenaale/sinologie-anki-pack">University of Vienna GitLab</a>. - <br>Go there for updates, if you are experiencing issues or if you want to contribute. + <br>Check out releases for more decks and updates, or file an issue if + you are experiencing issues or if you want to contribute. </p> <p> Deck: Chinese Cultural Spaces<br> diff --git a/src/templates/bijective/backward/back.html b/src/templates/bijective/backward/back.html index e295a4d4fa4a799543fd2368ad2f7fc84bebd594..84534fbef4bf17dc733bf2504a2833cf24a1529d 100644 --- a/src/templates/bijective/backward/back.html +++ b/src/templates/bijective/backward/back.html @@ -8,6 +8,8 @@ <div class="bijective-answer"> {{A}} </div> + + <include src="src/components/notice/notice.html"></include> </div> <!-- Suppress speech output on AnkiDroid if globally enabled --> diff --git a/src/templates/bijective/backward/front.html b/src/templates/bijective/backward/front.html index 5a2101dced9fc27235ebdde98f1bf5d8428b8908..8fb070ca68fe2b6782da088c8d6be88c61c0c954 100644 --- a/src/templates/bijective/backward/front.html +++ b/src/templates/bijective/backward/front.html @@ -16,8 +16,6 @@ <div class="prompt bijective-question"> {{B}} </div> - - <include src="src/components/notice/notice.html"></include> </div> <!-- Suppress speech output on AnkiDroid if globally enabled --> diff --git a/src/templates/bijective/forward/back.html b/src/templates/bijective/forward/back.html index 4f5dde5a2a35317d2494c03df8fb5747a986a8f8..afbae1a920ec242f9d2fed054e70b5a6d895e16a 100644 --- a/src/templates/bijective/forward/back.html +++ b/src/templates/bijective/forward/back.html @@ -8,6 +8,8 @@ <div class="bijective-answer"> {{B}} </div> + + <include src="src/components/notice/notice.html"></include> </div> <!-- Suppress speech output on AnkiDroid if globally enabled --> diff --git a/src/templates/bijective/forward/front.html b/src/templates/bijective/forward/front.html index 87fe973e0eb77e884eeafb532184b127870df944..6552410c728b94ee4edcb7f7bbbe9a20fd07e714 100644 --- a/src/templates/bijective/forward/front.html +++ b/src/templates/bijective/forward/front.html @@ -16,8 +16,6 @@ <div class="prompt bijective-question"> {{A}} </div> - - <include src="src/components/notice/notice.html"></include> </div> <!-- Suppress speech output on AnkiDroid if globally enabled --> diff --git a/src/templates/facts/q_a/back.html b/src/templates/facts/q_a/back.html index 7c10b356dbfec7b36a2e3f7056c844c0426a2d76..1ac8a0788f6fcbe64b2bd300a560d7e6648180a2 100644 --- a/src/templates/facts/q_a/back.html +++ b/src/templates/facts/q_a/back.html @@ -8,6 +8,8 @@ <div class="facts-answer"> {{Back}} </div> + + <include src="src/components/notice/notice.html"></include> </div> <!-- Suppress speech output on AnkiDroid if globally enabled --> diff --git a/src/templates/facts/q_a/front.html b/src/templates/facts/q_a/front.html index f5c845adb3fc4fe2fb9a74f691e3c37cd5695c0e..9dce46e5f30d7eca54411614df3c55003fc2b7d2 100644 --- a/src/templates/facts/q_a/front.html +++ b/src/templates/facts/q_a/front.html @@ -16,8 +16,6 @@ <div class="prompt facts-question"> {{Front}} </div> - - <include src="src/components/notice/notice.html"></include> </div> <!-- Suppress speech output on AnkiDroid if globally enabled --> diff --git a/src/templates/hanzi/write/back.html b/src/templates/hanzi/write/back.html index aebd657953dde24aec39caa143328dd6aa8b25fe..b176010e465ffba032bb66d8f77781403597df87 100644 --- a/src/templates/hanzi/write/back.html +++ b/src/templates/hanzi/write/back.html @@ -13,6 +13,8 @@ <dt>Print form</dt> <dd><span class="hanzi-print is-large">{{Hanzi}}</span></dd> </dl> + + <include src="src/components/notice/notice.html"></include> </div> <!-- Suppress speech output on AnkiDroid if globally enabled --> diff --git a/src/templates/hanzi/write/front.html b/src/templates/hanzi/write/front.html index b55b86295734804bc94db4fd8f991dc0d6cd445d..f58e910788efc3e0ca0a7c49d4d243ffac4cb141 100644 --- a/src/templates/hanzi/write/front.html +++ b/src/templates/hanzi/write/front.html @@ -22,8 +22,6 @@ <dt>Notes</dt> <dd>{{Notes (Front)}}</dd> </dl> - - <include src="src/components/notice/notice.html"></include> </div> <!-- Suppress speech output on AnkiDroid if globally enabled --> diff --git a/src/templates/molaoshi/hear/back.html b/src/templates/molaoshi/hear/back.html index 3f1b6f05e013d94e36cc8ce328295f2e6296afad..116328eb7786ce20a8d9457cbbff9857ae4f5173 100644 --- a/src/templates/molaoshi/hear/back.html +++ b/src/templates/molaoshi/hear/back.html @@ -55,6 +55,8 @@ {{/繁體字}} </details> </dl> + + <include src="src/components/notice/notice.html"></include> </div> <!-- Repeat only relevant text on the back side on AnkiDroid, not all of it --> diff --git a/src/templates/molaoshi/hear/front.html b/src/templates/molaoshi/hear/front.html index b49f55ca5e1eb5cd97349683eff8709015e17dab..6d7b05d3ad1767c89f7ba114455ea4b6f99682d1 100644 --- a/src/templates/molaoshi/hear/front.html +++ b/src/templates/molaoshi/hear/front.html @@ -34,8 +34,6 @@ <dt>Bemerkungen</dt> <dd>{{Bemerkungen (Vorderseite)}}</dd> </dl> - - <include src="src/components/notice/notice.html"></include> </div> <script type="module"> diff --git a/src/templates/molaoshi/identify_radical/back.html b/src/templates/molaoshi/identify_radical/back.html index af0c71078788eb5ad663a35c1046cb2cb936f9da..0d1a17ecb421718485288e2dd8bfa750e56f1128 100644 --- a/src/templates/molaoshi/identify_radical/back.html +++ b/src/templates/molaoshi/identify_radical/back.html @@ -20,6 +20,8 @@ <dt>Strichzahl</dt> <dd hanzi-data="{{text:简体字}}" hanzi-prop="count"></dd> </dl> + + <include src="src/components/notice/notice.html"></include> </div> <!-- Suppress speech output on AnkiDroid if globally enabled --> diff --git a/src/templates/molaoshi/identify_radical/front.html b/src/templates/molaoshi/identify_radical/front.html index b7011c765b371742b7906ec576f3ec3a15cf3ab8..e0302ce0df617461cbbfc73f7d96eaf1e4de6d4f 100644 --- a/src/templates/molaoshi/identify_radical/front.html +++ b/src/templates/molaoshi/identify_radical/front.html @@ -25,8 +25,6 @@ <dt>Bemerkungen</dt> <dd>{{Bemerkungen (Vorderseite)}}</dd> </dl> - - <include src="src/components/notice/notice.html"></include> </div> <!-- Suppress speech output on AnkiDroid if globally enabled --> diff --git a/src/templates/molaoshi/identify_radical_traditional/back.html b/src/templates/molaoshi/identify_radical_traditional/back.html index 9e8cff101c9aac17420d74be8cedbd556b1e56ef..7a642befa6dfc17535bd8a3ccd20f3cb490a1449 100644 --- a/src/templates/molaoshi/identify_radical_traditional/back.html +++ b/src/templates/molaoshi/identify_radical_traditional/back.html @@ -20,6 +20,8 @@ <dt>Strichzahl</dt> <dd hanzi-data="{{text:繁體字}}" hanzi-kind="traditional" hanzi-prop="count"></dd> </dl> + + <include src="src/components/notice/notice.html"></include> </div> <!-- Suppress speech output on AnkiDroid if globally enabled --> diff --git a/src/templates/molaoshi/identify_radical_traditional/front.html b/src/templates/molaoshi/identify_radical_traditional/front.html index 2c442e645bc54451f40eb4cdbe80d45fd7b5e64c..ea10b1cae3adc893ae9c63295f815b1e35ea3647 100644 --- a/src/templates/molaoshi/identify_radical_traditional/front.html +++ b/src/templates/molaoshi/identify_radical_traditional/front.html @@ -25,8 +25,6 @@ <dt>Bemerkungen</dt> <dd>{{Bemerkungen (Vorderseite)}}</dd> </dl> - - <include src="src/components/notice/notice.html"></include> </div> <!-- Suppress speech output on AnkiDroid if globally enabled --> diff --git a/src/templates/molaoshi/read_hanzi/back.html b/src/templates/molaoshi/read_hanzi/back.html index b0723c955b032d7368677a892e2fecaae3a7cde9..c31c73f808a2f30e36a34d2190797a7a2fe9905f 100644 --- a/src/templates/molaoshi/read_hanzi/back.html +++ b/src/templates/molaoshi/read_hanzi/back.html @@ -66,6 +66,8 @@ {{/繁體字}} </details> </dl> + + <include src="src/components/notice/notice.html"></include> </div> <script type="module"> diff --git a/src/templates/molaoshi/read_hanzi/front.html b/src/templates/molaoshi/read_hanzi/front.html index 3e680c5ce1d1939990993bf5d92e060d30a39e94..2238436e1bfafb3dacff27a7a17ffe88131c441c 100644 --- a/src/templates/molaoshi/read_hanzi/front.html +++ b/src/templates/molaoshi/read_hanzi/front.html @@ -25,8 +25,6 @@ <dt>Bemerkungen</dt> <dd>{{Bemerkungen (Vorderseite)}}</dd> </dl> - - <include src="src/components/notice/notice.html"></include> </div> <!-- Suppress speech output on AnkiDroid until card flipped --> diff --git a/src/templates/molaoshi/read_hanzi_traditional/back.html b/src/templates/molaoshi/read_hanzi_traditional/back.html index ca5aa67941a30864b92934525699e2971b6a583d..a9cb21c688aa08638f24751eeb87c4fdb8681b0d 100644 --- a/src/templates/molaoshi/read_hanzi_traditional/back.html +++ b/src/templates/molaoshi/read_hanzi_traditional/back.html @@ -57,6 +57,8 @@ {{/繁體字}} </details> </dl> + + <include src="src/components/notice/notice.html"></include> </div> <script type="module"> diff --git a/src/templates/molaoshi/read_hanzi_traditional/front.html b/src/templates/molaoshi/read_hanzi_traditional/front.html index f49f4e1c994cbc7448ee39b9b30df27b126b74c4..62303dd46488ef8127d71bed749dafb67f16f6a2 100644 --- a/src/templates/molaoshi/read_hanzi_traditional/front.html +++ b/src/templates/molaoshi/read_hanzi_traditional/front.html @@ -25,8 +25,6 @@ <dt>Bemerkungen</dt> <dd>{{Bemerkungen (Vorderseite)}}</dd> </dl> - - <include src="src/components/notice/notice.html"></include> </div> <!-- Suppress speech output on AnkiDroid until card flipped --> diff --git a/src/templates/molaoshi/read_pinyin/back.html b/src/templates/molaoshi/read_pinyin/back.html index a902d3c854551f3c873de51d8980f12f7bba34f9..69e6d76db059c1193fbf5f570baa8fc8395bc801 100644 --- a/src/templates/molaoshi/read_pinyin/back.html +++ b/src/templates/molaoshi/read_pinyin/back.html @@ -71,6 +71,8 @@ {{/繁體字}} </details> </dl> + + <include src="src/components/notice/notice.html"></include> </div> <script type="module"> diff --git a/src/templates/molaoshi/read_pinyin/front.html b/src/templates/molaoshi/read_pinyin/front.html index d8704268660608e95072f0e3ece271a8164bd058..767425794c210bc5a0c31a65f396e0d0e2d579d0 100644 --- a/src/templates/molaoshi/read_pinyin/front.html +++ b/src/templates/molaoshi/read_pinyin/front.html @@ -20,8 +20,6 @@ <dt>Bemerkungen</dt> <dd>{{Bemerkungen (Vorderseite)}}</dd> </dl> - - <include src="src/components/notice/notice.html"></include> </div> <!-- Suppress speech output on AnkiDroid until card flipped --> diff --git a/src/templates/molaoshi/speak/back.html b/src/templates/molaoshi/speak/back.html index 55b4af37ed4e19763f817c4fb3359668f1a2c479..40c3a02005d24b887a4fad0333990336fd8aeab4 100644 --- a/src/templates/molaoshi/speak/back.html +++ b/src/templates/molaoshi/speak/back.html @@ -71,6 +71,8 @@ {{/繁體字}} </details> </dl> + + <include src="src/components/notice/notice.html"></include> </div> <script type="module"> diff --git a/src/templates/molaoshi/speak/front.html b/src/templates/molaoshi/speak/front.html index f9cfcd6b04daa445d2a7c218b629240e2e86d19f..a93e52ec72911078a60d4a58a91fa1f82cacb669 100644 --- a/src/templates/molaoshi/speak/front.html +++ b/src/templates/molaoshi/speak/front.html @@ -20,8 +20,6 @@ <dt>Bemerkungen</dt> <dd>{{Bemerkungen (Vorderseite)}}</dd> </dl> - - <include src="src/components/notice/notice.html"></include> </div> <!-- Suppress speech output on AnkiDroid until card flipped --> diff --git a/src/templates/molaoshi/write/back.html b/src/templates/molaoshi/write/back.html index 305fb9a9eb9a2070b5c8e63a3b7f67f488063e48..787d8cf80b718b444cc3aabbed8898418fd58d3f 100644 --- a/src/templates/molaoshi/write/back.html +++ b/src/templates/molaoshi/write/back.html @@ -73,6 +73,8 @@ {{/繁體字}} </details> </dl> + + <include src="src/components/notice/notice.html"></include> </div> <script type="module"> diff --git a/src/templates/molaoshi/write/front.html b/src/templates/molaoshi/write/front.html index 83a3b88d14adb942f309c004152a026d86bb7aac..ed82b423a4db16d8ea4255cba9428a23ddca0da7 100644 --- a/src/templates/molaoshi/write/front.html +++ b/src/templates/molaoshi/write/front.html @@ -20,8 +20,6 @@ <dt>Bemerkungen</dt> <dd>{{Bemerkungen (Vorderseite)}}</dd> </dl> - - <include src="src/components/notice/notice.html"></include> </div> <!-- Suppress default speech output and do that from script instead -->