From e6562345ed0ea429a0eebd2a290bd7991643e32c Mon Sep 17 00:00:00 2001 From: lonkaars Date: Sat, 7 Oct 2023 19:56:03 +0200 Subject: support audio field --- anki-card-template/card.css | 36 ++++++++++++++++++++++++++++++++++++ anki-card-template/card.html | 23 +++++++++++++++++++++++ anki-card-template/card.js | 9 +++++++++ anki-card-template/template.html.m4 | 5 +++++ 4 files changed, 73 insertions(+) diff --git a/anki-card-template/card.css b/anki-card-template/card.css index 0506765..1c7444e 100644 --- a/anki-card-template/card.css +++ b/anki-card-template/card.css @@ -575,3 +575,39 @@ rt { user-select: none; } width: 0; white-space: nowrap; } + +/* make elements within this class display on one line */ +.vertical-layout .flex-line { flex-direction: column; } +.horizontal-layout .flex-line { flex-direction: row; } +.flex-line { + display: flex !important; + flex-wrap: wrap; + align-items: center; + justify-content: center; + gap: 0; +} + +/* display:none utility class */ +.display-none { display: none; } + +/* play audio button size */ +.mobile .replay-button svg { + width: 48px !important; + height: 48px !important; +} +.replay-button svg { + width: 24px !important; + height: 24px !important; +} + +/* maximize size of touch target (for mobile) */ +.replay-button { + margin: 0px !important; + padding: 6px; /* max allowed padding w/o changing page layout */ + color: var(--fg); +} +/* force play icon to be same as text color */ +.replay-button svg path { + fill: currentColor !important; +} + diff --git a/anki-card-template/card.html b/anki-card-template/card.html index 5e17eb9..866d0d9 100644 --- a/anki-card-template/card.html +++ b/anki-card-template/card.html @@ -16,6 +16,24 @@ bottom: 0; margin: 1em; } + /* from reviewer.css */ + .replay-button { + text-decoration: none; + display: inline-flex; + vertical-align: middle; + margin: 3px; + } + .replay-button svg { + width: 40px; + height: 40px; + } + .replay-button svg circle { + fill: #fff; + stroke: #414141; + } + .replay-button svg path { + fill: #414141; + } @@ -26,12 +44,17 @@
+ 見舞われる,他の書き方、書き方3【み・まわれる】[0] (note) + + [verb] To experi\ence {crisis}, [な-adj] to , [テスト] to suffer {test,テスト,test} (this is, a single item)\, and still is here, [ば\-test] but not here ゼルダの伝説 ブレス・オブ・ザ・ワイルド
+ + -- cgit v1.2.3