From 63bde9adcba69b82cb0031ed371ab0f664181dbe Mon Sep 17 00:00:00 2001
From: Philipp Stadler <a51820432@unet.univie.ac.at>
Date: Wed, 29 May 2024 12:28:43 +0200
Subject: [PATCH] =?UTF-8?q?feat:=20About=20auf=20Kartenr=C3=BCckseite=20ve?=
 =?UTF-8?q?rlegt?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Das Fragezeichen auf der Vorderseite wurde entfernt und durch einen Button auf der Rückseite "About this deck…" ersetzt.

Closes #317
---
 src/components/answer-details.css             |  8 +++-
 src/components/notice/notice.css              | 41 +------------------
 src/components/notice/notice.html             | 13 +++---
 src/templates/bijective/backward/back.html    |  2 +
 src/templates/bijective/backward/front.html   |  2 -
 src/templates/bijective/forward/back.html     |  2 +
 src/templates/bijective/forward/front.html    |  2 -
 src/templates/facts/q_a/back.html             |  2 +
 src/templates/facts/q_a/front.html            |  2 -
 src/templates/hanzi/write/back.html           |  2 +
 src/templates/hanzi/write/front.html          |  2 -
 src/templates/molaoshi/hear/back.html         |  2 +
 src/templates/molaoshi/hear/front.html        |  2 -
 .../molaoshi/identify_radical/back.html       |  2 +
 .../molaoshi/identify_radical/front.html      |  2 -
 .../identify_radical_traditional/back.html    |  2 +
 .../identify_radical_traditional/front.html   |  2 -
 src/templates/molaoshi/read_hanzi/back.html   |  2 +
 src/templates/molaoshi/read_hanzi/front.html  |  2 -
 .../molaoshi/read_hanzi_traditional/back.html |  2 +
 .../read_hanzi_traditional/front.html         |  2 -
 src/templates/molaoshi/read_pinyin/back.html  |  2 +
 src/templates/molaoshi/read_pinyin/front.html |  2 -
 src/templates/molaoshi/speak/back.html        |  2 +
 src/templates/molaoshi/speak/front.html       |  2 -
 src/templates/molaoshi/write/back.html        |  2 +
 src/templates/molaoshi/write/front.html       |  2 -
 27 files changed, 39 insertions(+), 71 deletions(-)

diff --git a/src/components/answer-details.css b/src/components/answer-details.css
index 957a2b4..a6a882d 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 868c512..4c8e028 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 524b64d..2067e20 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 e295a4d..84534fb 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 5a2101d..8fb070c 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 4f5dde5..afbae1a 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 87fe973..6552410 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 7c10b35..1ac8a07 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 f5c845a..9dce46e 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 aebd657..b176010 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 b55b862..f58e910 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 3f1b6f0..116328e 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 b49f55c..6d7b05d 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 af0c710..0d1a17e 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 b7011c7..e0302ce 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 9e8cff1..7a642be 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 2c442e6..ea10b1c 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 b0723c9..c31c73f 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 3e680c5..2238436 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 ca5aa67..a9cb21c 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 f49f4e1..62303dd 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 a902d3c..69e6d76 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 d870426..7674257 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 55b4af3..40c3a02 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 f9cfcd6..a93e52e 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 305fb9a..787d8cf 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 83a3b88..ed82b42 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 -->
-- 
GitLab