diff options
author | Alex Yatskov <FooSoft@users.noreply.github.com> | 2017-07-16 11:01:33 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-16 11:01:33 -0700 |
commit | 49695ca35bf41ad47d6af4d79510c926ac55a898 (patch) | |
tree | 0f21a50bfe85ab38a0d467f5af94d2b3810fa965 /tmpl | |
parent | 1ed8997240ba5d8ee4fe57062d2dbe8ba46436e2 (diff) | |
parent | ede139097c670f16ca3c332d8a79e9009b23bfac (diff) |
Merge pull request #65 from dequis/glossary-without-tags
Add glossary-brief anki field, like glossary but without tags
Diffstat (limited to 'tmpl')
-rw-r--r-- | tmpl/fields.html | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/tmpl/fields.html b/tmpl/fields.html index ab1a9722..944a43e6 100644 --- a/tmpl/fields.html +++ b/tmpl/fields.html @@ -1,13 +1,17 @@ {{#*inline "glossary-single"}} {{~#if html~}} - {{~#if tags~}}<i>({{#each tags}}{{name}}{{#unless @last}}, {{/unless}}{{/each}})</i> {{/if~}} + {{~#unless brief~}} + {{~#if tags~}}<i>({{#each tags}}{{name}}{{#unless @last}}, {{/unless}}{{/each}})</i> {{/if~}} + {{~/unless~}} {{~#if glossary.[1]~}} <ul>{{#each glossary}}<li>{{#multiLine}}{{.}}{{/multiLine}}</li>{{/each}}</ul> {{~else~}} {{~#multiLine}}{{glossary.[0]}}{{/multiLine~}} {{~/if~}} {{~else~}} - {{~#if tags~}}({{#each tags}}{{name}}{{#unless @last}}, {{/unless}}{{/each}}) {{/if~}} + {{~#unless brief~}} + {{~#if tags~}}({{#each tags}}{{name}}{{#unless @last}}, {{/unless}}{{/each}}) {{/if~}} + {{~/unless~}} {{~#if glossary.[1]~}} {{#each glossary}}{{.}}{{#unless @last}}, {{/unless}}{{/each}} {{~else~}} @@ -58,18 +62,22 @@ {{~else~}} {{~#if group~}} {{~#if definition.definitions.[1]~}} - {{~#if html}}<ol>{{#each definition.definitions}}<li>{{> glossary-single html=../html}}</li>{{/each}}</ol> - {{~else}}{{#each definition.definitions}} * {{> glossary-single html=../html}}{{/each}}{{/if~}} + {{~#if html}}<ol>{{#each definition.definitions}}<li>{{> glossary-single html=../html brief=../brief}}</li>{{/each}}</ol> + {{~else}}{{#each definition.definitions}} * {{> glossary-single html=../html brief=../brief}}{{/each}}{{/if~}} {{~else~}} - {{~> glossary-single definition.definitions.[0] html=html~}} + {{~> glossary-single definition.definitions.[0] html=html brief=brief~}} {{~/if~}} {{~else~}} - {{~> glossary-single definition html=html~}} + {{~> glossary-single definition html=html brief=brief~}} {{~/if~}} {{~/if~}} {{~#if html}}</div>{{/if~}} {{/inline}} +{{#*inline "glossary-brief"}} + {{~> glossary brief=true ~}} +{{/inline}} + {{#*inline "kunyomi"}} {{~#each definition.kunyomi}}{{.}}{{#unless @last}}, {{/unless}}{{/each~}} {{/inline}} |