diff options
Diffstat (limited to 'tmpl')
-rw-r--r-- | tmpl/term-definition.html | 16 | ||||
-rw-r--r-- | tmpl/term-grouped-list.html | 1 | ||||
-rw-r--r-- | tmpl/term-grouped.html | 19 | ||||
-rw-r--r-- | tmpl/term-list.html | 1 | ||||
-rw-r--r-- | tmpl/term.html | 18 |
5 files changed, 22 insertions, 33 deletions
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}} +<div class="term-tags"> + {{#each tags}} + <span class="tag tag-{{category}}" title="{{notes}}">{{name}}</span> + {{/each}} +</div> +{{/if}} +{{#if glossary.[1]}} +<ul class="term-glossary-group"> + {{#each glossary}} + <li><span class="term-glossary-item">{{.}}</span></li> + {{/each}} +</ul> +{{else}} +<div class="term-glossary-group term-glossary-item">{{glossary.[0]}}</div> +{{/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}} + <br> {{/each}} {{else}} <p>No results found</p> 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 @@ <div class="term-glossary"> <ol> {{#each definitions}} - <li> - {{#if tags}} - <div class="term-tags"> - {{#each tags}} - <span class="tag tag-{{category}}" title="{{notes}}">{{name}}</span> - {{/each}} - </div> - {{/if}} - {{#if glossary.[1]}} - <ul class="term-glossary-group"> - {{#each glossary}} - <li><span class="term-glossary-item">{{.}}</span></li> - {{/each}} - </ul> - {{else}} - <div class="term-glossary-group term-glossary-item">{{glossary.[0]}}</div> - {{/if}} - </li> + <li>{{> term-definition.html}}</li> {{/each}} </ol> </div> 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}} + <br> {{/each}} {{else}} <p>No results found</p> 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 @@ <div class="term-expression">{{#kanjiLinks}}{{expression}}{{/kanjiLinks}}</div> {{/if}} + {{#if reasons}} <div class="term-reasons"> {{#each reasons}} <span class="reasons">{{.}}</span> {{#unless @last}}«{{/unless}} {{/each}} </div> - - <div class="term-tags"> - {{#each tags}} - <span class="tag tag-{{category}}" title="{{notes}}">{{name}}</span> - {{/each}} - </div> + {{/if}} <div class="term-glossary"> - {{#if glossary.[1]}} - <ol> - {{#each glossary}} - <li><span class="term-glossary-item">{{.}}</span></li> - {{/each}} - </ol> - {{else}} - <p>{{glossary.[0]}}</p> - {{/if}} + {{> term-definition.html}} </div> </div> |