summaryrefslogtreecommitdiff
path: root/ext/bg/data/default-anki-field-templates.handlebars
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/data/default-anki-field-templates.handlebars')
-rw-r--r--ext/bg/data/default-anki-field-templates.handlebars18
1 files changed, 15 insertions, 3 deletions
diff --git a/ext/bg/data/default-anki-field-templates.handlebars b/ext/bg/data/default-anki-field-templates.handlebars
index 94553183..8ee2e00d 100644
--- a/ext/bg/data/default-anki-field-templates.handlebars
+++ b/ext/bg/data/default-anki-field-templates.handlebars
@@ -9,6 +9,13 @@
{{~#set "any" true}}{{/set~}}
{{~/if~}}
{{~/each~}}
+ {{~#unless noDictionaryTag~}}
+ {{~#if (op "||" (op "!" @root.compactTags) (op "!==" dictionary (get "previousDictionary")))~}}
+ {{~#if (get "any")}}, {{else}}<i>({{/if~}}
+ {{dictionary}}
+ {{~#set "any" true}}{{/set~}}
+ {{~/if~}}
+ {{~/unless~}}
{{~#if (get "any")}})</i> {{/if~}}
{{~/scope~}}
{{~#if only~}}({{#each only}}{{.}}{{#unless @last}}, {{/unless}}{{/each}} only) {{/if~}}
@@ -20,6 +27,7 @@
{{~else~}}
<ul>{{#each glossary}}<li>{{#multiLine}}{{.}}{{/multiLine}}</li>{{/each}}</ul>
{{~/if~}}
+ {{~#set "previousDictionary" dictionary~}}{{~/set~}}
{{/inline}}
{{#*inline "audio"}}
@@ -93,12 +101,12 @@
<div style="text-align: left;">
{{~#scope~}}
{{~#if (op "===" definition.type "term")~}}
- {{~> glossary-single definition brief=brief ~}}
+ {{~> 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 ~}}</li>{{~/each~}}</ol>
+ <ol>{{~#each definition.definitions~}}<li>{{~> glossary-single . brief=../brief noDictionaryTag=../noDictionaryTag ~}}</li>{{~/each~}}</ol>
{{~else~}}
- {{~#each definition.definitions~}}{{~> glossary-single . brief=../brief ~}}{{~/each~}}
+ {{~#each definition.definitions~}}{{~> glossary-single . brief=../brief noDictionaryTag=../noDictionaryTag ~}}{{~/each~}}
{{~/if~}}
{{~else if (op "===" definition.type "kanji")~}}
{{~#if (op ">" definition.glossary.length 1)~}}
@@ -111,6 +119,10 @@
</div>
{{~/inline~}}
+{{#*inline "glossary-no-dictionary"}}
+ {{~> glossary2 noDictionaryTag=true ~}}
+{{/inline}}
+
{{#*inline "glossary-brief"}}
{{~> glossary brief=true ~}}
{{/inline}}