2b4af57bd7
* Move handlebars template files * Move schema files
132 lines
5.3 KiB
Handlebars
132 lines
5.3 KiB
Handlebars
{{#*inline "stroke-count"}}
|
|
{{~#scope~}}
|
|
{{~#set "found" false}}{{/set~}}
|
|
{{~#each definition.stats.misc~}}
|
|
{{~#if (op "===" name "strokes")~}}
|
|
{{~#set "found" true}}{{/set~}}
|
|
Stroke count: {{value}}
|
|
{{~/if~}}
|
|
{{~/each~}}
|
|
{{~#if (op "!" (get "found"))~}}
|
|
Stroke count: Unknown
|
|
{{~/if~}}
|
|
{{~/scope~}}
|
|
{{/inline}}
|
|
|
|
{{<<<<<<<}}
|
|
{{#*inline "glossary-single"}}
|
|
{{~#unless brief~}}
|
|
{{~#scope~}}
|
|
{{~#set "any" false}}{{/set~}}
|
|
{{~#if definitionTags~}}{{#each definitionTags~}}
|
|
{{~#if (op "||" (op "!" ../data.compactTags) (op "!" redundant))~}}
|
|
{{~#if (get "any")}}, {{else}}<i>({{/if~}}
|
|
{{name}}
|
|
{{~#set "any" true}}{{/set~}}
|
|
{{~/if~}}
|
|
{{~/each~}}
|
|
{{~#if (get "any")}})</i> {{/if~}}
|
|
{{~/if~}}
|
|
{{~/scope~}}
|
|
{{~#if only~}}({{#each only}}{{{.}}}{{#unless @last}}, {{/unless}}{{/each}} only) {{/if~}}
|
|
{{~/unless~}}
|
|
{{~#if glossary.[1]~}}
|
|
{{~#if compactGlossaries~}}
|
|
{{#each glossary}}{{#multiLine}}{{.}}{{/multiLine}}{{#unless @last}} | {{/unless}}{{/each}}
|
|
{{~else~}}
|
|
<ul>{{#each glossary}}<li>{{#multiLine}}{{.}}{{/multiLine}}</li>{{/each}}</ul>
|
|
{{~/if~}}
|
|
{{~else~}}
|
|
{{~#multiLine}}{{glossary.[0]}}{{/multiLine~}}
|
|
{{~/if~}}
|
|
{{/inline}}
|
|
{{=======}}
|
|
{{#*inline "glossary-single"}}
|
|
{{~#unless brief~}}
|
|
{{~#scope~}}
|
|
{{~#set "any" false}}{{/set~}}
|
|
{{~#each definitionTags~}}
|
|
{{~#if (op "||" (op "!" @root.compactTags) (op "!" redundant))~}}
|
|
{{~#if (get "any")}}, {{else}}<i>({{/if~}}
|
|
{{name}}
|
|
{{~#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~}}
|
|
{{~/unless~}}
|
|
{{~#if (op "<=" glossary.length 1)~}}
|
|
{{#each glossary}}{{#multiLine}}{{.}}{{/multiLine}}{{/each}}
|
|
{{~else if @root.compactGlossaries~}}
|
|
{{#each glossary}}{{#multiLine}}{{.}}{{/multiLine}}{{#unless @last}} | {{/unless}}{{/each}}
|
|
{{~else~}}
|
|
<ul>{{#each glossary}}<li>{{#multiLine}}{{.}}{{/multiLine}}</li>{{/each}}</ul>
|
|
{{~/if~}}
|
|
{{~#set "previousDictionary" dictionary~}}{{~/set~}}
|
|
{{/inline}}
|
|
{{>>>>>>>}}
|
|
|
|
{{<<<<<<<}}
|
|
{{#*inline "glossary"}}
|
|
<div style="text-align: left;">
|
|
{{~#if modeKanji~}}
|
|
{{~#if definition.glossary.[1]~}}
|
|
<ol>{{#each definition.glossary}}<li>{{.}}</li>{{/each}}</ol>
|
|
{{~else~}}
|
|
{{definition.glossary.[0]}}
|
|
{{~/if~}}
|
|
{{~else~}}
|
|
{{~#if group~}}
|
|
{{~#if definition.definitions.[1]~}}
|
|
<ol>{{#each definition.definitions}}<li>{{> glossary-single brief=../brief compactGlossaries=../compactGlossaries data=../.}}</li>{{/each}}</ol>
|
|
{{~else~}}
|
|
{{~> glossary-single definition.definitions.[0] brief=brief compactGlossaries=compactGlossaries data=.~}}
|
|
{{~/if~}}
|
|
{{~else if merge~}}
|
|
{{~#if definition.definitions.[1]~}}
|
|
<ol>{{#each definition.definitions}}<li>{{> glossary-single brief=../brief compactGlossaries=../compactGlossaries data=../.}}</li>{{/each}}</ol>
|
|
{{~else~}}
|
|
{{~> glossary-single definition.definitions.[0] brief=brief compactGlossaries=compactGlossaries data=.~}}
|
|
{{~/if~}}
|
|
{{~else~}}
|
|
{{~> glossary-single definition brief=brief compactGlossaries=compactGlossaries data=.~}}
|
|
{{~/if~}}
|
|
{{~/if~}}
|
|
</div>
|
|
{{/inline}}
|
|
{{=======}}
|
|
{{~#*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-no-dictionary"}}
|
|
{{~> glossary noDictionaryTag=true ~}}
|
|
{{/inline}}
|
|
{{>>>>>>>}}
|