yomichan/ext/bg/data/anki-field-templates-upgrade-v6.handlebars
toasted-nutbread 008ffdb6bf
Frequencies marker (#1074)
* Update japanese.js tests

* Simplify fallback/early exit

* Add overloads to furigana and furiganaPlain handlebars helper functions

* Expose unique expression/reading arrays (and subsequently counts)

* Add {frequencies} marker
2020-11-28 14:30:50 -05:00

26 lines
809 B
Handlebars

{{#*inline "conjugation"}}
{{~#if definition.reasons~}}
{{~#each definition.reasons~}}
{{~#if (op ">" @index 0)}} « {{/if~}}
{{.}}
{{~/each~}}
{{~/if~}}
{{/inline}}
{{#*inline "frequencies"}}
{{~#if (op ">" definition.frequencies.length 0)~}}
<ul style="text-align: left;">
{{~#each definition.frequencies~}}
<li>
{{~#if (op "!==" ../definition.type "kanji")~}}
{{~#if (op "||" (op ">" ../uniqueExpressions.length 1) (op ">" ../uniqueReadings.length 1))~}}(
{{~#furigana expression reading~}}{{~/furigana~}}
) {{/if~}}
{{~/if~}}
{{~dictionary}}: {{frequency~}}
</li>
{{~/each~}}
</ul>
{{~/if~}}
{{/inline}}