From 60e23ab42c86fbc74a6e16d6fd29fcc6761bfb36 Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Sun, 8 Jan 2017 22:44:13 -0800 Subject: simplify templates --- tmpl/term-list.html | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 64 insertions(+), 1 deletion(-) (limited to 'tmpl/term-list.html') diff --git a/tmpl/term-list.html b/tmpl/term-list.html index 1315d132..3c85b547 100644 --- a/tmpl/term-list.html +++ b/tmpl/term-list.html @@ -1,7 +1,70 @@ +{{#*inline "definition"}} + {{#if tags}} +
+ {{#each tags}} + {{name}} + {{/each}} +
+ {{/if}} + {{#if glossary.[1]}} + + {{else}} +
{{glossary.[0]}}
+ {{/if}} +{{/inline}} + +{{#*inline "term"}} +
+
+ {{#if addable}} + + + {{/if}} + {{#if playback}} + + {{/if}} +
+ + {{#if reading}} +
{{#kanjiLinks}}{{expression}}{{/kanjiLinks}}{{reading}}
+ {{else}} +
{{#kanjiLinks}}{{expression}}{{/kanjiLinks}}
+ {{/if}} + + {{#if reasons}} +
+ {{#each reasons}} + {{.}} {{#unless @last}}«{{/unless}} + {{/each}} +
+ {{/if}} + +
+ {{#if grouped}} + {{#if definitions.[1]}} +
    + {{#each definitions}} +
  1. {{> definition}}
  2. + {{/each}} +
+ {{else}} + {{> definition definitions.[0]}} + {{/if}} + {{else}} + {{> definition}} + {{/if}} +
+
+{{/inline}} + {{#if definitions}} {{#each definitions}} {{#unless @first}}
{{/unless}} - {{> term.html addable=../addable playback=../playback}} + {{> term grouped=../grouped addable=../addable playback=../playback}} {{/each}} {{else}}

No results found

-- cgit v1.2.3