diff options
Diffstat (limited to 'tmpl')
-rw-r--r-- | tmpl/terms.html | 50 |
1 files changed, 26 insertions, 24 deletions
diff --git a/tmpl/terms.html b/tmpl/terms.html index 0b967bb5..3dee43d7 100644 --- a/tmpl/terms.html +++ b/tmpl/terms.html @@ -1,29 +1,31 @@ {{#*inline "definition"}} -{{#if definitionTags}} -<div {{#if compactGlossaries}}class="compact-info"{{/if}}> - {{#each definitionTags}} - <span class="label label-default tag-{{category}}" title="{{notes}}">{{name}}</span> - {{/each}} -</div> -{{/if}} -{{#if only}} -<div {{#if compactGlossaries}}class="compact-info"{{/if}}> - ( - {{~#each only~}} - {{{.}}}{{#unless @last}}, {{/unless}} - {{/each}} - only) +<div class="dict-{{#sanitizeCssClass}}{{dictionary}}{{/sanitizeCssClass}}"> + {{#if definitionTags}} + <div {{#if compactGlossaries}}class="compact-info"{{/if}}> + {{#each definitionTags}} + <span class="label label-default tag-{{category}}" title="{{notes}}">{{name}}</span> + {{/each}} + </div> + {{/if}} + {{#if only}} + <div {{#if compactGlossaries}}class="compact-info"{{/if}}> + ( + {{~#each only~}} + {{{.}}}{{#unless @last}}, {{/unless}} + {{/each}} + only) + </div> + {{/if}} + {{#if glossary.[1]}} + <ul {{#if compactGlossaries}}class="compact-glossary"{{/if}}> + {{#each glossary}} + <li><span class="glossary-item">{{#multiLine}}{{.}}{{/multiLine}}</span></li> + {{/each}} + </ul> + {{else}} + <div class="glossary-item {{#if compactGlossaries}}compact-glossary{{/if}}">{{#multiLine}}{{glossary.[0]}}{{/multiLine}}</div> + {{/if}} </div> -{{/if}} -{{#if glossary.[1]}} -<ul {{#if compactGlossaries}}class="compact-glossary"{{/if}}> - {{#each glossary}} - <li><span class="glossary-item">{{#multiLine}}{{.}}{{/multiLine}}</span></li> - {{/each}} -</ul> -{{else}} -<div class="glossary-item {{#if compactGlossaries}}compact-glossary{{/if}}">{{#multiLine}}{{glossary.[0]}}{{/multiLine}}</div> -{{/if}} {{/inline}} {{#*inline "term"}} |