summaryrefslogtreecommitdiff
path: root/tmpl/terms.html
diff options
context:
space:
mode:
authorsiikamiika <siikamiika@users.noreply.github.com>2017-10-15 09:45:00 +0300
committersiikamiika <siikamiika@users.noreply.github.com>2017-10-15 09:45:00 +0300
commit0404b42f6188c22e09afd073a755af749a9d0810 (patch)
treee03f076ce6d886b91505574ca826a08119f0f308 /tmpl/terms.html
parent03f7ca23e118c5ca804eef35cea05070e69779c7 (diff)
compact glossaries, line break after tags: on/off
Diffstat (limited to 'tmpl/terms.html')
-rw-r--r--tmpl/terms.html35
1 files changed, 17 insertions, 18 deletions
diff --git a/tmpl/terms.html b/tmpl/terms.html
index f35caed4..eaae7384 100644
--- a/tmpl/terms.html
+++ b/tmpl/terms.html
@@ -1,13 +1,13 @@
{{#*inline "definition"}}
{{#if definitionTags}}
-<div>
+<div {{#unless tagLineBreak}}style="display: inline-block;"{{/unless}}>
{{#each definitionTags}}
<span class="label label-default tag-{{category}}" title="{{notes}}">{{name}}</span>
{{/each}}
</div>
{{/if}}
{{#if only}}
-<div>
+<div {{#if compactGlossaries}}style="display: inline-block;"{{/if}}>
(
{{~#each only~}}
{{{.}}}{{#unless @last}}, {{/unless}}
@@ -16,13 +16,13 @@
</div>
{{/if}}
{{#if glossary.[1]}}
-<ul>
+<ul {{#if compactGlossaries}}class="compact"{{/if}}>
{{#each glossary}}
<li><span class="glossary-item">{{#multiLine}}{{.}}{{/multiLine}}</span></li>
{{/each}}
</ul>
{{else}}
-<div class="glossary-item">{{#multiLine}}{{glossary.[0]}}{{/multiLine}}</div>
+<div class="glossary-item {{#if compactGlossaries}}compact{{/if}}">{{#multiLine}}{{glossary.[0]}}{{/multiLine}}</div>
{{/if}}
{{/inline}}
@@ -70,6 +70,13 @@
{{/each}}
{{else}}
<div class="expression">{{#kanjiLinks}}{{#furigana}}{{{.}}}{{/furigana}}{{/kanjiLinks}}</div>
+ {{#if termTags}}
+ <div style="display: inline-block;">
+ {{#each termTags}}
+ <span class="label label-default tag-{{category}}" title="{{notes}}">{{name}}</span>
+ {{/each}}
+ </div>
+ {{/if}}
{{/if}}
{{#if reasons}}
@@ -80,14 +87,6 @@
</div>
{{/if}}
- {{#if termTags}}
- <div>
- {{#each termTags}}
- <span class="label label-default tag-{{category}}" title="{{notes}}">{{name}}</span>
- {{/each}}
- </div>
- {{/if}}
-
{{#if frequencies}}
<div>
{{#each frequencies}}
@@ -101,24 +100,24 @@
{{#if definitions.[1]}}
<ol>
{{#each definitions}}
- <li>{{> definition}}</li>
+ <li>{{> definition tagLineBreak=../tagLineBreak compactGlossaries=../compactGlossaries}}</li>
{{/each}}
</ol>
{{else}}
- {{> definition definitions.[0]}}
+ {{> definition definitions.[0] tagLineBreak=tagLineBreak compactGlossaries=compactGlossaries}}
{{/if}}
{{else if merged}}
{{#if definitions.[1]}}
<ol>
{{#each definitions}}
- <li>{{> definition}}</li>
+ <li>{{> definition tagLineBreak=../tagLineBreak compactGlossaries=../compactGlossaries}}</li>
{{/each}}
</ol>
{{else}}
- {{> definition definitions.[0]}}
+ {{> definition definitions.[0] tagLineBreak=tagLineBreak compactGlossaries=compactGlossaries}}
{{/if}}
{{else}}
- {{> definition}}
+ {{> definition tagLineBreak=tagLineBreak compactGlossaries=compactGlossaries}}
{{/if}}
</div>
@@ -131,7 +130,7 @@
{{#if definitions}}
{{#each definitions}}
{{#unless @first}}<hr>{{/unless}}
-{{> term debug=../debug grouped=../grouped merged=../merged addable=../addable playback=../playback}}
+{{> term debug=../debug grouped=../grouped merged=../merged addable=../addable playback=../playback tagLineBreak=../tagLineBreak compactGlossaries=../compactGlossaries}}
{{/each}}
{{else}}
<p class="note">No results found.</p>