summaryrefslogtreecommitdiff
path: root/tmpl/terms.html
diff options
context:
space:
mode:
authorsiikamiika <siikamiika@users.noreply.github.com>2019-10-13 21:50:29 +0300
committersiikamiika <siikamiika@users.noreply.github.com>2019-10-13 21:50:29 +0300
commitf3ab7673f98f8721030d5513459e5e842b812e80 (patch)
treec0e08bb159adf2882f1aaa6e30c3fbe010749628 /tmpl/terms.html
parent7bae3824e74461fbd5c9f66f921b05a47a40cbf4 (diff)
add css class for dictionary name
Can be used for dictionary specific styling
Diffstat (limited to 'tmpl/terms.html')
-rw-r--r--tmpl/terms.html50
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"}}