forked from FooSoft/yomichan
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add single dictionary handlebars * fix dicts with kanji in title * sort * rename to single-glossary-XYZ * add brief and no dict variants * add docs, only terms no kanji * allow testing single dict handlebars * remove empty comment <rikaitan.link>MmQxOTFiZmRiZDk1NWEzNjNlN2FmZGM3OWM3YTJiNGIxMWEyZTliNwo=</rikaitan.link>
- Loading branch information
1 parent
f7eb4ee
commit 7291f99
Showing
11 changed files
with
246 additions
and
56 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
59 changes: 59 additions & 0 deletions
59
ext/data/templates/anki-field-templates-upgrade-v34.handlebars
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
{{<<<<<<<}} | ||
{{~#*inline "glossary"~}} | ||
<div style="text-align: left;"> | ||
{{~#scope~}} | ||
{{~#if (op "===" definition.type "term")~}} | ||
{{~> glossary-single definition brief=brief noDictionaryTag=noDictionaryTag ~}} | ||
{{~else if (op "||" (op "===" definition.type "termGrouped") (op "===" definition.type "termMerged"))~}} | ||
{{~#if (op ">" definition.definitions.length 1)~}} | ||
<ol>{{~#each definition.definitions~}}<li>{{~> glossary-single . brief=../brief noDictionaryTag=../noDictionaryTag ~}}</li>{{~/each~}}</ol> | ||
{{~else~}} | ||
{{~#each definition.definitions~}}{{~> glossary-single . brief=../brief noDictionaryTag=../noDictionaryTag ~}}{{~/each~}} | ||
{{~/if~}} | ||
{{~else if (op "===" definition.type "kanji")~}} | ||
{{~#if (op ">" definition.glossary.length 1)~}} | ||
<ol>{{#each definition.glossary}}<li>{{.}}</li>{{/each}}</ol> | ||
{{~else~}} | ||
{{~#each definition.glossary~}}{{.}}{{~/each~}} | ||
{{~/if~}} | ||
{{~/if~}} | ||
{{~/scope~}} | ||
</div> | ||
{{~/inline~}} | ||
{{=======}} | ||
{{~#*inline "glossary"~}} | ||
<div style="text-align: left;"> | ||
{{~#scope~}} | ||
{{~#if (op "===" definition.type "term")~}} | ||
{{~#unless (op "&&" selectedDictionary (op "!=" selectedDictionary definition.dictionary))~}} | ||
{{~> glossary-single definition brief=brief noDictionaryTag=noDictionaryTag ~}} | ||
{{~/unless~}} | ||
{{~else if (op "||" (op "===" definition.type "termGrouped") (op "===" definition.type "termMerged"))~}} | ||
{{~#if (op ">" definition.definitions.length 1)~}} | ||
<ol> | ||
{{~#each definition.definitions~}} | ||
{{~#unless (op "&&" ../selectedDictionary (op "!=" ../selectedDictionary dictionary))~}} | ||
<li> | ||
{{~> glossary-single . brief=../brief noDictionaryTag=../noDictionaryTag ~}} | ||
</li> | ||
{{~/unless~}} | ||
{{~/each~}} | ||
</ol> | ||
{{~else~}} | ||
{{~#each definition.definitions~}} | ||
{{~#unless (op "&&" ../selectedDictionary (op "!=" ../selectedDictionary dictionary))~}} | ||
{{~> glossary-single . brief=../brief noDictionaryTag=../noDictionaryTag ~}} | ||
{{~/unless~}} | ||
{{~/each~}} | ||
{{~/if~}} | ||
{{~else if (op "===" definition.type "kanji")~}} | ||
{{~#if (op ">" definition.glossary.length 1)~}} | ||
<ol>{{#each definition.glossary}}<li>{{.}}</li>{{/each}}</ol> | ||
{{~else~}} | ||
{{~#each definition.glossary~}}{{.}}{{~/each~}} | ||
{{~/if~}} | ||
{{~/if~}} | ||
{{~/scope~}} | ||
</div> | ||
{{~/inline~}} | ||
{{>>>>>>>}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters