diff options
author | Alex Yatskov <alex@foosoft.net> | 2017-01-23 21:12:46 -0800 |
---|---|---|
committer | Alex Yatskov <alex@foosoft.net> | 2017-01-23 21:12:46 -0800 |
commit | da33d00e45ee3a028886fe90fca329282731aaa5 (patch) | |
tree | 357683d54d38f082e342d650e5610da3d0a4317c /tmpl | |
parent | c5a2543aa11c81ebb3e2826ab81cdff1015c642b (diff) |
WIP
Diffstat (limited to 'tmpl')
-rw-r--r-- | tmpl/fields.html | 54 |
1 files changed, 41 insertions, 13 deletions
diff --git a/tmpl/fields.html b/tmpl/fields.html index c4ea3586..c4c2ef03 100644 --- a/tmpl/fields.html +++ b/tmpl/fields.html @@ -1,48 +1,76 @@ +{{#*inline "definition"}} + {{#if html}} + {{#if definition.tags}} + (<div>{{#each definition.tags}}{{name}}{{#unless @last}}, {{/unless}}{{/each}}</div>) + {{/if}} + {{#if definition.glossary.[1]}} + <ul>{{#each definition.glossary}}<li>>{{#multiLine}}{{.}}{{/multiLine}}></li>{{/each}}</ul> + {{else}} + <div>{{#multiLine}}{{definition.glossary.[0]}}{{/multiLine}}</div> + {{/if}} + {{else}} + {{#if definition.tags}}({{#each definition.tags}}{{name}}{{#unless @last}}, {{/unless}}{{/each}}) {{/if}}{{#if definition.glossary.[1]}}{{#each definition.glossary}}{{.}}{{#unless @last}}, {{/unless}}{{/each}}{{else}}{{definition.glossary.[0]}}{{/if}} + {{/if}} +{{/inline}} + {{#*inline "audio"}}{{/inline}} {{#*inline "character"}} -{{definition.character}} + {{definition.character}} {{/inline}} {{#*inline "dictionary"}} -{{definition.dictionary}} + {{definition.dictionary}} {{/inline}} {{#*inline "expression"}} -{{#if modeTermKana}}{{#if definition.reading}}{{definition.reading}}{{else}}{{definition.expression}}{{/if}}{{/if}} -{{#if modeTermKanji}}{{definition.expression}}{{/if}} + {{#if modeTermKana}}{{#if definition.reading}}{{definition.reading}}{{else}}{{definition.expression}}{{/if}}{{else}}{{definition.expression}}{{/if}} {{/inline}} {{#*inline "furigana"}} -{{#if definition.reading}}<ruby>{{definition.expression}}<rt>{{definition.reading}}</rt></ruby>{{else}}{{definition.expression}}{{/if}} + {{#if definition.reading}}<ruby>{{definition.expression}}<rt>{{definition.reading}}</rt></ruby>{{else}}{{definition.expression}}{{/if}} {{/inline}} {{#*inline "glossary"}} -glossary +<div style="text-align: left;"> +{{#if grouped}} + {{#if definitions.[1]}} + <ol> + {{#each definitions}} + <li>{{> definition}}</li> + {{/each}} + </ol> + {{else}} + {{> definition definitions.[0]}} + {{/if}} +{{else}} + {{> definition}} +{{/if}} +</div> {{/inline}} {{#*inline "kunyomi"}} -{{definition.kunyomi}} + {{definition.kunyomi}} {{/inline}} {{#*inline "onyomi"}} -{{definition.onyomi}} + {{definition.onyomi}} {{/inline}} {{#*inline "reading"}} -{{definition.reading}} + {{definition.reading}} {{/inline}} {{#*inline "sentence"}} -{{definition.sentence}} + {{definition.sentence}} {{/inline}} {{#*inline "tags"}} -{{#each definition.tags}}{{name}}{{#unless @last}}, {{/unless}}{{/each}} + {{#each definition.tags}}{{name}}{{#unless @last}}, {{/unless}}{{/each}} {{/inline}} {{#*inline "url"}} -{{#if html}}<a href="{{definition.url}}">{{definition.url}}</a>{{else}}{{definition.url}}{{/if}} + {{#if html}}<a href="{{definition.url}}">{{definition.url}}</a>{{else}}{{definition.url}}{{/if}} {{/inline}} -{{> (lookup . 'marker') }} +{{> (lookup . "marker") }} |