From 67ca7adc4cabb79a87b51ebd9b112e641de31af9 Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Sun, 8 Jan 2017 18:39:59 -0800 Subject: WIP --- tmpl/term-definition.html | 16 ++++++++++++++++ tmpl/term-grouped-list.html | 1 + tmpl/term-grouped.html | 19 +------------------ tmpl/term-list.html | 1 + tmpl/term.html | 18 +++--------------- 5 files changed, 22 insertions(+), 33 deletions(-) create mode 100644 tmpl/term-definition.html (limited to 'tmpl') diff --git a/tmpl/term-definition.html b/tmpl/term-definition.html new file mode 100644 index 00000000..03356a59 --- /dev/null +++ b/tmpl/term-definition.html @@ -0,0 +1,16 @@ +{{#if tags}} +
+ {{#each tags}} + {{name}} + {{/each}} +
+{{/if}} +{{#if glossary.[1]}} + +{{else}} +
{{glossary.[0]}}
+{{/if}} diff --git a/tmpl/term-grouped-list.html b/tmpl/term-grouped-list.html index 6156ab7b..d927abc4 100644 --- a/tmpl/term-grouped-list.html +++ b/tmpl/term-grouped-list.html @@ -1,6 +1,7 @@ {{#if definitions}} {{#each definitions}} {{> term-grouped.html addable=../addable playback=../playback}} +
{{/each}} {{else}}

No results found

diff --git a/tmpl/term-grouped.html b/tmpl/term-grouped.html index ac15a126..0de22bb9 100644 --- a/tmpl/term-grouped.html +++ b/tmpl/term-grouped.html @@ -26,24 +26,7 @@
    {{#each definitions}} -
  1. - {{#if tags}} -
    - {{#each tags}} - {{name}} - {{/each}} -
    - {{/if}} - {{#if glossary.[1]}} -
      - {{#each glossary}} -
    • {{.}}
    • - {{/each}} -
    - {{else}} -
    {{glossary.[0]}}
    - {{/if}} -
  2. +
  3. {{> term-definition.html}}
  4. {{/each}}
diff --git a/tmpl/term-list.html b/tmpl/term-list.html index b4c9d997..ab03c7c2 100644 --- a/tmpl/term-list.html +++ b/tmpl/term-list.html @@ -1,6 +1,7 @@ {{#if definitions}} {{#each definitions}} {{> term.html addable=../addable playback=../playback}} +
{{/each}} {{else}}

No results found

diff --git a/tmpl/term.html b/tmpl/term.html index a6ae2d26..59ac80df 100644 --- a/tmpl/term.html +++ b/tmpl/term.html @@ -15,27 +15,15 @@
{{#kanjiLinks}}{{expression}}{{/kanjiLinks}}
{{/if}} + {{#if reasons}}
{{#each reasons}} {{.}} {{#unless @last}}«{{/unless}} {{/each}}
- -
- {{#each tags}} - {{name}} - {{/each}} -
+ {{/if}}
- {{#if glossary.[1]}} -
    - {{#each glossary}} -
  1. {{.}}
  2. - {{/each}} -
- {{else}} -

{{glossary.[0]}}

- {{/if}} + {{> term-definition.html}}
-- cgit v1.2.3