From c5d00f9f298f7040e5e7415d4ab4f2c03b1d5ed9 Mon Sep 17 00:00:00 2001 From: Philipp Stadler <hello@phstadler.com> Date: Thu, 25 Jul 2024 10:58:56 +0200 Subject: [PATCH] feat: add trimmed down version of vocab Closes #4 --- README.md | 22 +++++ src/templates/vocabsimple/.template-spec.yaml | 44 +++++++++ src/templates/vocabsimple/hear/back.html | 78 ++++++++++++++++ src/templates/vocabsimple/hear/front.html | 45 +++++++++ .../vocabsimple/identify_radical/back.html | 45 +++++++++ .../vocabsimple/identify_radical/front.html | 39 ++++++++ .../identify_radical_traditional/back.html | 45 +++++++++ .../identify_radical_traditional/front.html | 39 ++++++++ .../vocabsimple/read_hanzi/back.html | 86 ++++++++++++++++++ .../vocabsimple/read_hanzi/front.html | 39 ++++++++ .../read_hanzi_traditional/back.html | 86 ++++++++++++++++++ .../read_hanzi_traditional/front.html | 39 ++++++++ .../vocabsimple/read_pinyin/back.html | 91 +++++++++++++++++++ .../vocabsimple/read_pinyin/front.html | 34 +++++++ src/templates/vocabsimple/speak/back.html | 91 +++++++++++++++++++ src/templates/vocabsimple/speak/front.html | 34 +++++++ src/templates/vocabsimple/write/back.html | 91 +++++++++++++++++++ src/templates/vocabsimple/write/front.html | 34 +++++++ .../vocabsimple/write_traditional/back.html | 91 +++++++++++++++++++ .../vocabsimple/write_traditional/front.html | 34 +++++++ 20 files changed, 1107 insertions(+) create mode 100644 src/templates/vocabsimple/.template-spec.yaml create mode 100644 src/templates/vocabsimple/hear/back.html create mode 100644 src/templates/vocabsimple/hear/front.html create mode 100644 src/templates/vocabsimple/identify_radical/back.html create mode 100644 src/templates/vocabsimple/identify_radical/front.html create mode 100644 src/templates/vocabsimple/identify_radical_traditional/back.html create mode 100644 src/templates/vocabsimple/identify_radical_traditional/front.html create mode 100644 src/templates/vocabsimple/read_hanzi/back.html create mode 100644 src/templates/vocabsimple/read_hanzi/front.html create mode 100644 src/templates/vocabsimple/read_hanzi_traditional/back.html create mode 100644 src/templates/vocabsimple/read_hanzi_traditional/front.html create mode 100644 src/templates/vocabsimple/read_pinyin/back.html create mode 100644 src/templates/vocabsimple/read_pinyin/front.html create mode 100644 src/templates/vocabsimple/speak/back.html create mode 100644 src/templates/vocabsimple/speak/front.html create mode 100644 src/templates/vocabsimple/write/back.html create mode 100644 src/templates/vocabsimple/write/front.html create mode 100644 src/templates/vocabsimple/write_traditional/back.html create mode 100644 src/templates/vocabsimple/write_traditional/front.html diff --git a/README.md b/README.md index dee59fa..45d6069 100644 --- a/README.md +++ b/README.md @@ -130,10 +130,32 @@ frame number. The Hanzi animation is large and optimized for single characters. #### Example TODO +### vocabsimple +Built for learning Chinese writing, reading, listening, speaking, recognizing +radicals. + +Optimized for manual use in Anki. + +#### Fields +* `English` +* `简体字` +* `繁體字` +* `Pīnyīn` +* `Examples` +* `Remarks` +* `Remarks (front side)` +* `Audio recording` +* `Lesson` +* `Credits` +* `Source` + ### vocabulary Built for learning Chinese writing, reading, listening, speaking, recognizing radicals. +Includes advanced features ike feature flags, but less convenient for manual +use in Anki. + #### Fields * `English` * `简体字` diff --git a/src/templates/vocabsimple/.template-spec.yaml b/src/templates/vocabsimple/.template-spec.yaml new file mode 100644 index 0000000..48c8156 --- /dev/null +++ b/src/templates/vocabsimple/.template-spec.yaml @@ -0,0 +1,44 @@ +template_version: 2024-07-25 10:00:00+00:00 + +note_type: + id: 2024-07-25 10:00:00+00:00 + name: Vocab simple + fields: + - English + - 简体字 + - 繁體字 + - Pīnyīn + - Examples + - Remarks + - Remarks (front side) + - Audio recording + - Lesson + - Credits + - Source + # this is only necessary to make explicit to keep the later added fields + # id contents + - resources + +card_types: +- name: Listen + template: hear +- name: Read (Pīnyīn) + template: read_pinyin +- name: Read (简体字) + template: read_hanzi +- name: Read (繁體字) + template: read_hanzi_traditional +- name: Write (简体字) + template: write +- name: Write (繁體字) + template: write_traditional +- name: Speak + template: speak +- name: Identify radical (简体字) + template: identify_radical +- name: Identify radical (繁體字) + template: identify_radical_traditional + +resource_paths: +- '{{BUILD_PREFIX}}hanzi-data' +- '{{BUILD_PREFIX}}KA_TEMPLATES_NOTICE.js' diff --git a/src/templates/vocabsimple/hear/back.html b/src/templates/vocabsimple/hear/back.html new file mode 100644 index 0000000..f7ed2b9 --- /dev/null +++ b/src/templates/vocabsimple/hear/back.html @@ -0,0 +1,78 @@ +<div class="front-side-on-back"> + {{FrontSide}} +</div> + +<hr id="answer"> + +<div class="exercise back anki-template-hanyu-hear-back"> + <dl class="translations"> + <dt>Pīnyīn</dt> + <dd>{{Pīnyīn}}</dd> + <dt>English</dt> + <dd>{{English}}</dd> + <dt>简体字</dt> + <dd> + <span class="hanzi-print">{{简体字}}</span> + <div class="strichfolge-animation" no-animate="true" highlight-radical="true"> + {{text:简体字}} + </div> + </dd> + <dt>Remarks</dt> + <dd>{{Remarks}}</dd> + <dt>Examples</dt> + <dd>{{Examples}}</dd> + <dt>Source</dt> + <dd class="text-light">{{Source}}</dd> + <details class="answer-details"> + <summary> + <span class="answer-details-more">Show more…</span> + <span class="answer-details-less">Show less…</span> + </summary> + {{#繁體字}} + <dt>繁體字</dt> + <dd> + <span class="hanzi-print">{{繁體字}}</span> + <div class="strichfolge-animation is-traditional" no-animate="true" highlight-radical="true"> + {{text:繁體字}} + </div> + </dd> + {{/繁體字}} + <dt>Radical (简体字)</dt> + <dd> + <span hanzi-data="{{text:简体字}}" hanzi-prop="radical" class="hanzi-print"></span> + <div class="strichfolge-animation" no-animate="true"> + <span hanzi-data="{{text:简体字}}" hanzi-prop="radical"></span> + </div> + </dd> + {{#繁體字}} + <dt>Radical (繁體字)</dt> + <dd> + <span hanzi-data="{{text:繁體字}}" hanzi-kind="traditional" hanzi-prop="radical" class="hanzi-print"></span> + <div class="strichfolge-animation is-traditional" no-animate="true"> + <span hanzi-data="{{text:繁體字}}" hanzi-kind="traditional" hanzi-prop="radical"></span> + </div> + </dd> + {{/繁體字}} + </details> + </dl> + + <details class="answer-details"> + <summary> + <span class="answer-details-more">About this pack…</span> + <span class="answer-details-less">Hide pack info…</span> + </summary> + + {{Credits}} + <div notice-file="KA_TEMPLATES_NOTICE"></div> + </details> +</div> + +<!-- Repeat only relevant text on the back side on AnkiDroid, not all of it --> +<tts style="display: none" service="android" voice="zh_CN">{{text:简体字}}</tts> + +<script type="module"> + import '../../../components/debug' +</script> +<script type="module"> + import '../../../components/back' +</script> \ No newline at end of file diff --git a/src/templates/vocabsimple/hear/front.html b/src/templates/vocabsimple/hear/front.html new file mode 100644 index 0000000..c408d91 --- /dev/null +++ b/src/templates/vocabsimple/hear/front.html @@ -0,0 +1,45 @@ +{{#简体字}} +<style> + @import url(../../../components/global.css); +</style> + +<div class="exercise front anki-template-hanyu-hear-front"> + <header class="card-info"> + <aside class="exercise-category"> + {{Subdeck}} + </aside> + <aside class="exercise-kind"> + {{Card}} + </aside> + </header> + </header> + + <dl class="prompt translations"> + <dt>汉语</dt> + <dd id="t2s-player-container" class="t2s-player-container"> + <div class="anki-droid-player"> + <tts style="display: none" service="android" voice="zh_CN"> + {{text:简体字}} + </tts> + </div> + <div class="anki-web-player"> + {{text:简体字}} + </div> + <div class="anki-builtin-player"> + {{tts zh_CN:简体字}} + </div> + </dd> + <dt>Recording</dt> + <dd>{{Audio recording}}</dd> + <dt>Remarks</dt> + <dd>{{Remarks (front side)}}</dd> + </dl> +</div> + +<script type="module"> + import '../../../components/debug' +</script> +<script type="module"> + import '../../../components/front' +</script> +{{/简体字}} \ No newline at end of file diff --git a/src/templates/vocabsimple/identify_radical/back.html b/src/templates/vocabsimple/identify_radical/back.html new file mode 100644 index 0000000..cf67889 --- /dev/null +++ b/src/templates/vocabsimple/identify_radical/back.html @@ -0,0 +1,45 @@ +<div class="front-side-on-back"> + {{FrontSide}} +</div> + +<hr id="answer"> + +<div class="exercise back radicals-identify-back"> + <dl class="translations"> + <dt>Radical (简体字)</dt> + <dd> + <span hanzi-data="{{text:简体字}}" hanzi-prop="radical" class="hanzi-print"></span> + <div class="strichfolge-animation" no-animate="true"> + <span hanzi-data="{{text:简体字}}" hanzi-prop="radical"></span> + </div> + </dd> + <dt>Name (中文)</dt> + <dd hanzi-data="{{text:简体字}}" hanzi-prop="radicalMeaningZh"></dd> + <dt>Name (English)</dt> + <dd hanzi-data="{{text:简体字}}" hanzi-prop="radicalMeaningDe"></dd> + <dt>Strichzahl</dt> + <dd hanzi-data="{{text:简体字}}" hanzi-prop="count"></dd> + <dt>Source</dt> + <dd class="text-light">{{Source}}</dd> + </dl> + + <details class="answer-details"> + <summary> + <span class="answer-details-more">About this pack…</span> + <span class="answer-details-less">Hide pack info…</span> + </summary> + + {{Credits}} + <div notice-file="KA_TEMPLATES_NOTICE"></div> + </details> +</div> + +<!-- Suppress speech output on AnkiDroid if globally enabled --> +<tts style="display: none" service="android" voice="zh_CN"></tts> + +<script type="module"> + import '../../../components/debug' +</script> +<script type="module"> + import '../../../components/back' +</script> \ No newline at end of file diff --git a/src/templates/vocabsimple/identify_radical/front.html b/src/templates/vocabsimple/identify_radical/front.html new file mode 100644 index 0000000..58d0e82 --- /dev/null +++ b/src/templates/vocabsimple/identify_radical/front.html @@ -0,0 +1,39 @@ +{{#简体字}} +<style> + @import url(../../../components/global.css); +</style> + +<div class="exercise front radicals-identify-front"> + <header class="card-info"> + <aside class="exercise-category"> + {{Subdeck}} + </aside> + <aside class="exercise-kind"> + {{Card}} + </aside> + </header> + </header> + + <dl class="prompt translations"> + <dt>简体字</dt> + <dd> + <span class="hanzi-print">{{简体字}}</span> + <div class="strichfolge-animation" no-animate="true" highlight-radical="answer"> + {{text:简体字}} + </div> + </dd> + <dt>Remarks</dt> + <dd>{{Remarks (front side)}}</dd> + </dl> +</div> + +<!-- Suppress speech output on AnkiDroid if globally enabled --> +<tts style="display: none" service="android" voice="zh_CN"></tts> + +<script type="module"> + import '../../../components/debug' +</script> +<script type="module"> + import '../../../components/front' +</script> +{{/简体字}} \ No newline at end of file diff --git a/src/templates/vocabsimple/identify_radical_traditional/back.html b/src/templates/vocabsimple/identify_radical_traditional/back.html new file mode 100644 index 0000000..bda9a39 --- /dev/null +++ b/src/templates/vocabsimple/identify_radical_traditional/back.html @@ -0,0 +1,45 @@ +<div class="front-side-on-back"> + {{FrontSide}} +</div> + +<hr id="answer"> + +<div class="exercise back radicals-identify-back"> + <dl class="translations"> + <dt>Radical (繁體字)</dt> + <dd> + <span hanzi-data="{{text:繁體字}}" hanzi-kind="traditional" hanzi-prop="radical" class="hanzi-print"></span> + <div class="strichfolge-animation is-traditional" no-animate="true"> + <span hanzi-data="{{text:繁體字}}" hanzi-kind="traditional" hanzi-prop="radical"></span> + </div> + </dd> + <dt>Name (中文)</dt> + <dd hanzi-data="{{text:繁體字}}" hanzi-kind="traditional" hanzi-prop="radicalMeaningZh"></dd> + <dt>Name (English)</dt> + <dd hanzi-data="{{text:繁體字}}" hanzi-kind="traditional" hanzi-prop="radicalMeaningDe"></dd> + <dt>Strichzahl</dt> + <dd hanzi-data="{{text:繁體字}}" hanzi-kind="traditional" hanzi-prop="count"></dd> + <dt>Source</dt> + <dd class="text-light">{{Source}}</dd> + </dl> + + <details class="answer-details"> + <summary> + <span class="answer-details-more">About this pack…</span> + <span class="answer-details-less">Hide pack info…</span> + </summary> + + {{Credits}} + <div notice-file="KA_TEMPLATES_NOTICE"></div> + </details> +</div> + +<!-- Suppress speech output on AnkiDroid if globally enabled --> +<tts style="display: none" service="android" voice="zh_CN"></tts> + +<script type="module"> + import '../../../components/debug' +</script> +<script type="module"> + import '../../../components/back' +</script> \ No newline at end of file diff --git a/src/templates/vocabsimple/identify_radical_traditional/front.html b/src/templates/vocabsimple/identify_radical_traditional/front.html new file mode 100644 index 0000000..bc0a645 --- /dev/null +++ b/src/templates/vocabsimple/identify_radical_traditional/front.html @@ -0,0 +1,39 @@ +{{#繁體字}} +<style> + @import url(../../../components/global.css); +</style> + +<div class="exercise front radicals-identify-front"> + <header class="card-info"> + <aside class="exercise-category"> + {{Subdeck}} + </aside> + <aside class="exercise-kind"> + {{Card}} + </aside> + </header> + </header> + + <dl class="prompt translations"> + <dt>繁體字</dt> + <dd> + <span class="hanzi-print">{{繁體字}}</span> + <div class="strichfolge-animation is-traditional" no-animate="true" highlight-radical="answer"> + {{text:繁體字}} + </div> + </dd> + <dt>Remarks</dt> + <dd>{{Remarks (front side)}}</dd> + </dl> +</div> + +<!-- Suppress speech output on AnkiDroid if globally enabled --> +<tts style="display: none" service="android" voice="zh_CN"></tts> + +<script type="module"> + import '../../../components/debug' +</script> +<script type="module"> + import '../../../components/front' +</script> +{{/繁體字}} \ No newline at end of file diff --git a/src/templates/vocabsimple/read_hanzi/back.html b/src/templates/vocabsimple/read_hanzi/back.html new file mode 100644 index 0000000..a0746d4 --- /dev/null +++ b/src/templates/vocabsimple/read_hanzi/back.html @@ -0,0 +1,86 @@ +<div class="front-side-on-back"> + {{FrontSide}} +</div> + +<hr id="answer"> + +<div class="exercise back anki-template-hanyu-read-hanzi-back"> + <dl class="translations"> + <dt>Pīnyīn</dt> + <dd>{{Pīnyīn}}</dd> + <dt>English</dt> + <dd>{{English}}</dd> + {{#简体字}} + <dt class="t2s-player-heading">汉语</dt> + <dd id="t2s-player-container" class="t2s-player-container"> + <div class="anki-droid-player"> + <tts style="display: none" service="android" voice="zh_CN"> + {{text:简体字}} + </tts> + </div> + <div class="anki-web-player"> + {{text:简体字}} + </div> + <div class="anki-builtin-player"> + {{tts zh_CN:简体字}} + </div> + </dd> + {{/简体字}} + <dt>Recording</dt> + <dd>{{Audio recording}}</dd> + <dt>Remarks</dt> + <dd>{{Remarks}}</dd> + <dt>Examples</dt> + <dd>{{Examples}}</dd> + <dt>Source</dt> + <dd class="text-light">{{Source}}</dd> + <details class="answer-details"> + <summary> + <span class="answer-details-more">Show more…</span> + <span class="answer-details-less">Show less…</span> + </summary> + {{#繁體字}} + <dt>繁體字</dt> + <dd> + <span class="hanzi-print">{{繁體字}}</span> + <div class="strichfolge-animation is-traditional" no-animate="true" highlight-radical="true"> + {{text:繁體字}} + </div> + </dd> + {{/繁體字}} + <dt>Radical (简体字)</dt> + <dd> + <span hanzi-data="{{text:简体字}}" hanzi-prop="radical" class="hanzi-print"></span> + <div class="strichfolge-animation" no-animate="true"> + <span hanzi-data="{{text:简体字}}" hanzi-prop="radical"></span> + </div> + </dd> + {{#繁體字}} + <dt>Radical (繁體字)</dt> + <dd> + <span hanzi-data="{{text:繁體字}}" hanzi-kind="traditional" hanzi-prop="radical" class="hanzi-print"></span> + <div class="strichfolge-animation is-traditional" no-animate="true"> + <span hanzi-data="{{text:繁體字}}" hanzi-kind="traditional" hanzi-prop="radical"></span> + </div> + </dd> + {{/繁體字}} + </details> + </dl> + + <details class="answer-details"> + <summary> + <span class="answer-details-more">About this pack…</span> + <span class="answer-details-less">Hide pack info…</span> + </summary> + + {{Credits}} + <div notice-file="KA_TEMPLATES_NOTICE"></div> + </details> +</div> + +<script type="module"> + import '../../../components/debug' +</script> +<script type="module"> + import '../../../components/back' +</script> \ No newline at end of file diff --git a/src/templates/vocabsimple/read_hanzi/front.html b/src/templates/vocabsimple/read_hanzi/front.html new file mode 100644 index 0000000..15af006 --- /dev/null +++ b/src/templates/vocabsimple/read_hanzi/front.html @@ -0,0 +1,39 @@ +{{#简体字}} +<style> + @import url(../../../components/global.css); +</style> + +<div class="exercise front anki-template-hanyu-read-hanzi-front"> + <header class="card-info"> + <aside class="exercise-category"> + {{Subdeck}} + </aside> + <aside class="exercise-kind"> + {{Card}} + </aside> + </header> + </header> + + <dl class="prompt translations"> + <dt>简体字</dt> + <dd> + <span class="hanzi-print">{{简体字}}</span> + <div class="strichfolge-animation" no-animate="true" highlight-radical="answer"> + {{text:简体字}} + </div> + </dd> + <dt>Remarks</dt> + <dd>{{Remarks (front side)}}</dd> + </dl> +</div> + +<!-- Suppress speech output on AnkiDroid until card flipped --> +<tts style="display: none" service="android" voice="zh_CN"></tts> + +<script type="module"> + import '../../../components/debug' +</script> +<script type="module"> + import '../../../components/front' +</script> +{{/简体字}} \ No newline at end of file diff --git a/src/templates/vocabsimple/read_hanzi_traditional/back.html b/src/templates/vocabsimple/read_hanzi_traditional/back.html new file mode 100644 index 0000000..37c660c --- /dev/null +++ b/src/templates/vocabsimple/read_hanzi_traditional/back.html @@ -0,0 +1,86 @@ +<div class="front-side-on-back"> + {{FrontSide}} +</div> + +<hr id="answer"> + +<div class="exercise back anki-template-hanyu-read-hanzi-back"> + <dl class="translations"> + <dt>Pīnyīn</dt> + <dd>{{Pīnyīn}}</dd> + <dt>English</dt> + <dd>{{English}}</dd> + {{#简体字}} + <dt class="t2s-player-heading">汉语</dt> + <dd id="t2s-player-container" class="t2s-player-container"> + <div class="anki-droid-player"> + <tts style="display: none" service="android" voice="zh_CN"> + {{text:简体字}} + </tts> + </div> + <div class="anki-web-player"> + {{text:简体字}} + </div> + <div class="anki-builtin-player"> + {{tts zh_CN:简体字}} + </div> + </dd> + {{/简体字}} + <dt>Recording</dt> + <dd>{{Audio recording}}</dd> + <dt>Remarks</dt> + <dd>{{Remarks}}</dd> + <dt>Examples</dt> + <dd>{{Examples}}</dd> + <dt>Source</dt> + <dd class="text-light">{{Source}}</dd> + <details class="answer-details"> + <summary> + <span class="answer-details-more">Show more…</span> + <span class="answer-details-less">Show less…</span> + </summary> + {{#简体字}} + <dt>简体字</dt> + <dd> + <span class="hanzi-print">{{简体字}}</span> + <div class="strichfolge-animation" no-animate="true"> + {{text:简体字}} + </div> + </dd> + {{/简体字}} + <dt>Radical (繁體字)</dt> + <dd> + <span hanzi-data="{{text:繁體字}}" hanzi-kind="traditional" hanzi-prop="radical" class="hanzi-print"></span> + <div class="strichfolge-animation is-traditional" no-animate="true"> + <span hanzi-data="{{text:繁體字}}" hanzi-kind="traditional" hanzi-prop="radical"></span> + </div> + </dd> + {{#简体字}} + <dt>Radical (简体字)</dt> + <dd> + <span hanzi-data="{{text:简体字}}" hanzi-prop="radical" class="hanzi-print"></span> + <div class="strichfolge-animation" no-animate="true"> + <span hanzi-data="{{text:简体字}}" hanzi-prop="radical"></span> + </div> + </dd> + {{/简体字}} + </details> + </dl> + + <details class="answer-details"> + <summary> + <span class="answer-details-more">About this pack…</span> + <span class="answer-details-less">Hide pack info…</span> + </summary> + + {{Credits}} + <div notice-file="KA_TEMPLATES_NOTICE"></div> + </details> +</div> + +<script type="module"> + import '../../../components/debug' +</script> +<script type="module"> + import '../../../components/back' +</script> \ No newline at end of file diff --git a/src/templates/vocabsimple/read_hanzi_traditional/front.html b/src/templates/vocabsimple/read_hanzi_traditional/front.html new file mode 100644 index 0000000..97e615e --- /dev/null +++ b/src/templates/vocabsimple/read_hanzi_traditional/front.html @@ -0,0 +1,39 @@ +{{#繁體字}} +<style> + @import url(../../../components/global.css); +</style> + +<div class="exercise front anki-template-hanyu-read-hanzi-front"> + <header class="card-info"> + <aside class="exercise-category"> + {{Subdeck}} + </aside> + <aside class="exercise-kind"> + {{Card}} + </aside> + </header> + </header> + + <dl class="prompt translations"> + <dt>繁體字</dt> + <dd> + <span class="hanzi-print">{{繁體字}}</span> + <div class="strichfolge-animation is-traditional" no-animate="true" highlight-radical="answer"> + {{text:繁體字}} + </div> + </dd> + <dt>Remarks</dt> + <dd>{{Remarks (front side)}}</dd> + </dl> +</div> + +<!-- Suppress speech output on AnkiDroid until card flipped --> +<tts style="display: none" service="android" voice="zh_CN"></tts> + +<script type="module"> + import '../../../components/debug' +</script> +<script type="module"> + import '../../../components/front' +</script> +{{/繁體字}} \ No newline at end of file diff --git a/src/templates/vocabsimple/read_pinyin/back.html b/src/templates/vocabsimple/read_pinyin/back.html new file mode 100644 index 0000000..31bae8f --- /dev/null +++ b/src/templates/vocabsimple/read_pinyin/back.html @@ -0,0 +1,91 @@ +<div class="front-side-on-back"> + {{FrontSide}} +</div> + +<hr id="answer"> + +<div class="exercise back anki-template-hanyu-read-pinyin-back"> + <dl class="translations"> + <dt>English</dt> + <dd>{{English}}</dd> + <dt>简体字</dt> + <dd> + <span class="hanzi-print">{{简体字}}</span> + <div class="strichfolge-animation" no-animate="true" highlight-radical="true"> + {{text:简体字}} + </div> + </dd> + {{#简体字}} + <dt class="t2s-player-heading">汉语</dt> + <dd id="t2s-player-container" class="t2s-player-container"> + <div class="anki-droid-player"> + <tts style="display: none" service="android" voice="zh_CN"> + {{text:简体字}} + </tts> + </div> + <div class="anki-web-player"> + {{text:简体字}} + </div> + <div class="anki-builtin-player"> + {{tts zh_CN:简体字}} + </div> + </dd> + {{/简体字}} + <dt>Recording</dt> + <dd>{{Audio recording}}</dd> + <dt>Remarks</dt> + <dd>{{Remarks}}</dd> + <dt>Examples</dt> + <dd>{{Examples}}</dd> + <dt>Source</dt> + <dd class="text-light">{{Source}}</dd> + <details class="answer-details"> + <summary> + <span class="answer-details-more">Show more…</span> + <span class="answer-details-less">Show less…</span> + </summary> + {{#繁體字}} + <dt>繁體字</dt> + <dd> + <span class="hanzi-print">{{繁體字}}</span> + <div class="strichfolge-animation is-traditional" no-animate="true" highlight-radical="true"> + {{text:繁體字}} + </div> + </dd> + {{/繁體字}} + <dt>Radical (简体字)</dt> + <dd> + <span hanzi-data="{{text:简体字}}" hanzi-prop="radical" class="hanzi-print"></span> + <div class="strichfolge-animation" no-animate="true"> + <span hanzi-data="{{text:简体字}}" hanzi-prop="radical"></span> + </div> + </dd> + {{#繁體字}} + <dt>Radical (繁體字)</dt> + <dd> + <span hanzi-data="{{text:繁體字}}" hanzi-kind="traditional" hanzi-prop="radical" class="hanzi-print"></span> + <div class="strichfolge-animation is-traditional" no-animate="true"> + <span hanzi-data="{{text:繁體字}}" hanzi-kind="traditional" hanzi-prop="radical"></span> + </div> + </dd> + {{/繁體字}} + </details> + </dl> + + <details class="answer-details"> + <summary> + <span class="answer-details-more">About this pack…</span> + <span class="answer-details-less">Hide pack info…</span> + </summary> + + {{Credits}} + <div notice-file="KA_TEMPLATES_NOTICE"></div> + </details> +</div> + +<script type="module"> + import '../../../components/debug' +</script> +<script type="module"> + import '../../../components/back' +</script> \ No newline at end of file diff --git a/src/templates/vocabsimple/read_pinyin/front.html b/src/templates/vocabsimple/read_pinyin/front.html new file mode 100644 index 0000000..d734ad3 --- /dev/null +++ b/src/templates/vocabsimple/read_pinyin/front.html @@ -0,0 +1,34 @@ +{{#Pīnyīn}} +<style> + @import url(../../../components/global.css); +</style> + +<div class="exercise front anki-template-hanyu-read-pinyin-front"> + <header class="card-info"> + <aside class="exercise-category"> + {{Subdeck}} + </aside> + <aside class="exercise-kind"> + {{Card}} + </aside> + </header> + </header> + + <dl class="prompt translations"> + <dt>Pīnyīn</dt> + <dd>{{Pīnyīn}}</dd> + <dt>Remarks</dt> + <dd>{{Remarks (front side)}}</dd> + </dl> +</div> + +<!-- Suppress speech output on AnkiDroid until card flipped --> +<tts style="display: none" service="android" voice="zh_CN"></tts> + +<script type="module"> + import '../../../components/debug' +</script> +<script type="module"> + import '../../../components/front' +</script> +{{/Pīnyīn}} \ No newline at end of file diff --git a/src/templates/vocabsimple/speak/back.html b/src/templates/vocabsimple/speak/back.html new file mode 100644 index 0000000..a3db231 --- /dev/null +++ b/src/templates/vocabsimple/speak/back.html @@ -0,0 +1,91 @@ +<div class="front-side-on-back"> + {{FrontSide}} +</div> + +<hr id="answer"> + +<div class="exercise back anki-template-hanyu-speak-back"> + <dl class="translations"> + <dt>Pīnyīn</dt> + <dd>{{Pīnyīn}}</dd> + <dt>简体字</dt> + <dd> + <span class="hanzi-print">{{简体字}}</span> + <div class="strichfolge-animation" no-animate="true" highlight-radical="true"> + {{text:简体字}} + </div> + </dd> + {{#简体字}} + <dt class="t2s-player-heading">汉语</dt> + <dd id="t2s-player-container" class="t2s-player-container"> + <div class="anki-droid-player"> + <tts style="display: none" service="android" voice="zh_CN"> + {{text:简体字}} + </tts> + </div> + <div class="anki-web-player"> + {{text:简体字}} + </div> + <div class="anki-builtin-player"> + {{tts zh_CN:简体字}} + </div> + </dd> + {{/简体字}} + <dt>Recording</dt> + <dd>{{Audio recording}}</dd> + <dt>Remarks</dt> + <dd>{{Remarks}}</dd> + <dt>Examples</dt> + <dd>{{Examples}}</dd> + <dt>Source</dt> + <dd class="text-light">{{Source}}</dd> + <details class="answer-details"> + <summary> + <span class="answer-details-more">Show more…</span> + <span class="answer-details-less">Show less…</span> + </summary> + {{#繁體字}} + <dt>繁體字</dt> + <dd> + <span class="hanzi-print">{{繁體字}}</span> + <div class="strichfolge-animation is-traditional" no-animate="true" highlight-radical="true"> + {{text:繁體字}} + </div> + </dd> + {{/繁體字}} + <dt>Radical (简体字)</dt> + <dd> + <span hanzi-data="{{text:简体字}}" hanzi-prop="radical" class="hanzi-print"></span> + <div class="strichfolge-animation" no-animate="true"> + <span hanzi-data="{{text:简体字}}" hanzi-prop="radical"></span> + </div> + </dd> + {{#繁體字}} + <dt>Radical (繁體字)</dt> + <dd> + <span hanzi-data="{{text:繁體字}}" hanzi-kind="traditional" hanzi-prop="radical" class="hanzi-print"></span> + <div class="strichfolge-animation is-traditional" no-animate="true"> + <span hanzi-data="{{text:繁體字}}" hanzi-kind="traditional" hanzi-prop="radical"></span> + </div> + </dd> + {{/繁體字}} + </details> + </dl> + + <details class="answer-details"> + <summary> + <span class="answer-details-more">About this pack…</span> + <span class="answer-details-less">Hide pack info…</span> + </summary> + + {{Credits}} + <div notice-file="KA_TEMPLATES_NOTICE"></div> + </details> +</div> + +<script type="module"> + import '../../../components/debug' +</script> +<script type="module"> + import '../../../components/back' +</script> \ No newline at end of file diff --git a/src/templates/vocabsimple/speak/front.html b/src/templates/vocabsimple/speak/front.html new file mode 100644 index 0000000..16fb4d6 --- /dev/null +++ b/src/templates/vocabsimple/speak/front.html @@ -0,0 +1,34 @@ +{{#English}} +<style> + @import url(../../../components/global.css); +</style> + +<div class="exercise front anki-template-hanyu-speak-front"> + <header class="card-info"> + <aside class="exercise-category"> + {{Subdeck}} + </aside> + <aside class="exercise-kind"> + {{Card}} + </aside> + </header> + </header> + + <dl class="prompt translations"> + <dt>English</dt> + <dd>{{English}}</dd> + <dt>Remarks</dt> + <dd>{{Remarks (front side)}}</dd> + </dl> +</div> + +<!-- Suppress speech output on AnkiDroid until card flipped --> +<tts style="display: none" service="android" voice="zh_CN"></tts> + +<script type="module"> + import '../../../components/debug' +</script> +<script type="module"> + import '../../../components/front' +</script> +{{/English}} \ No newline at end of file diff --git a/src/templates/vocabsimple/write/back.html b/src/templates/vocabsimple/write/back.html new file mode 100644 index 0000000..df3e85f --- /dev/null +++ b/src/templates/vocabsimple/write/back.html @@ -0,0 +1,91 @@ +<div class="front-side-on-back"> + {{FrontSide}} +</div> + +<hr id="answer"> + +<div class="exercise back anki-template-hanyu-write-back"> + <dl class="translations"> + <dt>简体字</dt> + <dd> + <span class="hanzi-print">{{简体字}}</span> + <div class="strichfolge-animation" highlight-radical="true"> + {{text:简体字}} + </div> + </dd> + <dt>Pīnyīn</dt> + <dd>{{Pīnyīn}}</dd> + {{#简体字}} + <dt class="t2s-player-heading">汉语</dt> + <dd id="t2s-player-container" class="t2s-player-container"> + <div class="anki-droid-player"> + <tts style="display: none" service="android" voice="zh_CN"> + {{text:简体字}} + </tts> + </div> + <div class="anki-web-player"> + {{text:简体字}} + </div> + <div class="anki-builtin-player"> + {{tts zh_CN:简体字}} + </div> + </dd> + {{/简体字}} + <dt>Recording</dt> + <dd>{{Audio recording}}</dd> + <dt>Remarks</dt> + <dd>{{Remarks}}</dd> + <dt>Examples</dt> + <dd>{{Examples}}</dd> + <dt>Source</dt> + <dd class="text-light">{{Source}}</dd> + <details class="answer-details"> + <summary> + <span class="answer-details-more">Show more…</span> + <span class="answer-details-less">Show less…</span> + </summary> + {{#繁體字}} + <dt>繁體字</dt> + <dd> + <span class="hanzi-print">{{繁體字}}</span> + <div class="strichfolge-animation is-traditional" highlight-radical="true"> + {{text:繁體字}} + </div> + </dd> + {{/繁體字}} + <dt>Radical (简体字)</dt> + <dd> + <span hanzi-data="{{text:简体字}}" hanzi-prop="radical" class="hanzi-print"></span> + <div class="strichfolge-animation" no-animate="true"> + <span hanzi-data="{{text:简体字}}" hanzi-prop="radical"></span> + </div> + </dd> + {{#繁體字}} + <dt>Radical (繁體字)</dt> + <dd> + <span hanzi-data="{{text:繁體字}}" hanzi-kind="traditional" hanzi-prop="radical" class="hanzi-print"></span> + <div class="strichfolge-animation is-traditional" no-animate="true"> + <span hanzi-data="{{text:繁體字}}" hanzi-kind="traditional" hanzi-prop="radical"></span> + </div> + </dd> + {{/繁體字}} + </details> + </dl> + + <details class="answer-details"> + <summary> + <span class="answer-details-more">About this pack…</span> + <span class="answer-details-less">Hide pack info…</span> + </summary> + + {{Credits}} + <div notice-file="KA_TEMPLATES_NOTICE"></div> + </details> +</div> + +<script type="module"> + import '../../../components/debug' +</script> +<script type="module"> + import '../../../components/back' +</script> \ No newline at end of file diff --git a/src/templates/vocabsimple/write/front.html b/src/templates/vocabsimple/write/front.html new file mode 100644 index 0000000..a87a39d --- /dev/null +++ b/src/templates/vocabsimple/write/front.html @@ -0,0 +1,34 @@ +{{#English}} +<style> + @import url(../../../components/global.css); +</style> + +<div class="exercise front anki-template-hanyu-write-front"> + <header class="card-info"> + <aside class="exercise-category"> + {{Subdeck}} + </aside> + <aside class="exercise-kind"> + {{Card}} + </aside> + </header> + </header> + + <dl class="prompt translations"> + <dt>English</dt> + <dd>{{English}}</dd> + <dt>Remarks</dt> + <dd>{{Remarks (front side)}}</dd> + </dl> +</div> + +<!-- Suppress default speech output and do that from script instead --> +<tts style="display: none" service="android" voice="zh_CN"></tts> + +<script type="module"> + import '../../../components/debug' +</script> +<script type="module"> + import '../../../components/front' +</script> +{{/English}} \ No newline at end of file diff --git a/src/templates/vocabsimple/write_traditional/back.html b/src/templates/vocabsimple/write_traditional/back.html new file mode 100644 index 0000000..894cc99 --- /dev/null +++ b/src/templates/vocabsimple/write_traditional/back.html @@ -0,0 +1,91 @@ +<div class="front-side-on-back"> + {{FrontSide}} +</div> + +<hr id="answer"> + +<div class="exercise back anki-template-hanyu-write-back"> + <dl class="translations"> + <dt>繁體字</dt> + <dd> + <span class="hanzi-print">{{繁體字}}</span> + <div class="strichfolge-animation is-traditional" highlight-radical="true"> + {{text:繁體字}} + </div> + </dd> + <dt>Pīnyīn</dt> + <dd>{{Pīnyīn}}</dd> + {{#简体字}} + <dt class="t2s-player-heading">汉语</dt> + <dd id="t2s-player-container" class="t2s-player-container"> + <div class="anki-droid-player"> + <tts style="display: none" service="android" voice="zh_CN"> + {{text:简体字}} + </tts> + </div> + <div class="anki-web-player"> + {{text:简体字}} + </div> + <div class="anki-builtin-player"> + {{tts zh_CN:简体字}} + </div> + </dd> + {{/简体字}} + <dt>Recording</dt> + <dd>{{Audio recording}}</dd> + <dt>Remarks</dt> + <dd>{{Remarks}}</dd> + <dt>Examples</dt> + <dd>{{Examples}}</dd> + <dt>Source</dt> + <dd class="text-light">{{Source}}</dd> + <details class="answer-details"> + <summary> + <span class="answer-details-more">Show more…</span> + <span class="answer-details-less">Show less…</span> + </summary> + {{#简体字}} + <dt>简体字</dt> + <dd> + <span class="hanzi-print">{{简体字}}</span> + <div class="strichfolge-animation" highlight-radical="true"> + {{text:简体字}} + </div> + </dd> + {{/简体字}} + <dt>Radical (繁體字)</dt> + <dd> + <span hanzi-data="{{text:繁體字}}" hanzi-kind="traditional" hanzi-prop="radical" class="hanzi-print"></span> + <div class="strichfolge-animation is-traditional" no-animate="true"> + <span hanzi-data="{{text:繁體字}}" hanzi-kind="traditional" hanzi-prop="radical"></span> + </div> + </dd> + {{#简体字}} + <dt>Radical (简体字)</dt> + <dd> + <span hanzi-data="{{text:简体字}}" hanzi-prop="radical" class="hanzi-print"></span> + <div class="strichfolge-animation" no-animate="true"> + <span hanzi-data="{{text:简体字}}" hanzi-prop="radical"></span> + </div> + </dd> + {{/简体字}} + </details> + </dl> + + <details class="answer-details"> + <summary> + <span class="answer-details-more">About this pack…</span> + <span class="answer-details-less">Hide pack info…</span> + </summary> + + {{Credits}} + <div notice-file="KA_TEMPLATES_NOTICE"></div> + </details> +</div> + +<script type="module"> + import '../../../components/debug' +</script> +<script type="module"> + import '../../../components/back' +</script> \ No newline at end of file diff --git a/src/templates/vocabsimple/write_traditional/front.html b/src/templates/vocabsimple/write_traditional/front.html new file mode 100644 index 0000000..6adb90e --- /dev/null +++ b/src/templates/vocabsimple/write_traditional/front.html @@ -0,0 +1,34 @@ +{{#English}}{{#繁體字}} +<style> + @import url(../../../components/global.css); +</style> + +<div class="exercise front anki-template-hanyu-write-front"> + <header class="card-info"> + <aside class="exercise-category"> + {{Subdeck}} + </aside> + <aside class="exercise-kind"> + {{Card}} + </aside> + </header> + </header> + + <dl class="prompt translations"> + <dt>English</dt> + <dd>{{English}}</dd> + <dt>Remarks</dt> + <dd>{{Remarks (front side)}}</dd> + </dl> +</div> + +<!-- Suppress default speech output and do that from script instead --> +<tts style="display: none" service="android" voice="zh_CN"></tts> + +<script type="module"> + import '../../../components/debug' +</script> +<script type="module"> + import '../../../components/front' +</script> +{{/繁體字}}{{/English}} \ No newline at end of file -- GitLab