yomichan/tmpl/terms.html

72 lines
2.2 KiB
HTML
Raw Normal View History

2017-01-09 06:44:13 +00:00
{{#*inline "definition"}}
{{#if tags}}
2017-03-04 04:25:14 +00:00
<div>
2017-01-09 06:44:13 +00:00
{{#each tags}}
2017-03-04 04:25:14 +00:00
<span class="label label-default tag-{{category}}" title="{{notes}}">{{name}}</span>
2017-01-09 06:44:13 +00:00
{{/each}}
</div>
{{/if}}
{{#if glossary.[1]}}
2017-03-04 04:25:14 +00:00
<ul>
2017-01-09 06:44:13 +00:00
{{#each glossary}}
2017-03-04 04:25:14 +00:00
<li><span class="glossary-item">{{#multiLine}}{{.}}{{/multiLine}}</span></li>
2017-01-09 06:44:13 +00:00
{{/each}}
</ul>
{{else}}
2017-03-04 04:25:14 +00:00
<div class="glossary-item">{{#multiLine}}{{glossary.[0]}}{{/multiLine}}</div>
2017-01-09 06:44:13 +00:00
{{/if}}
{{/inline}}
{{#*inline "term"}}
2017-03-18 03:45:47 +00:00
<div class="entry">
2017-03-04 04:25:14 +00:00
<div class="actions">
2017-01-09 06:44:13 +00:00
{{#if addable}}
2017-03-05 03:53:28 +00:00
<a href="#" title="Add term as expression" class="action-add-note pending disabled" data-mode="term-kanji" data-index="{{@index}}"><img src="/mixed/img/add-term-kanji.png"></a>
<a href="#" title="Add term as reading" class="action-add-note pending disabled" data-mode="term-kana" data-index="{{@index}}"><img src="/mixed/img/add-term-kana.png"></a>
2017-01-09 06:44:13 +00:00
{{/if}}
{{#if playback}}
2017-03-05 03:53:28 +00:00
<a href="#" title="Play audio" class="action-play-audio" data-index="{{@index}}"><img src="/mixed/img/play-audio.png"></a>
2017-01-09 06:44:13 +00:00
{{/if}}
</div>
{{#if reading}}
2017-03-04 04:25:14 +00:00
<div class="expression"><ruby>{{#kanjiLinks}}{{expression}}{{/kanjiLinks}}<rt>{{reading}}</rt></ruby></div>
2017-01-09 06:44:13 +00:00
{{else}}
2017-03-04 04:25:14 +00:00
<div class="expression">{{#kanjiLinks}}{{expression}}{{/kanjiLinks}}</div>
2017-01-09 06:44:13 +00:00
{{/if}}
{{#if reasons}}
2017-03-04 04:25:14 +00:00
<div class="reasons">
2017-01-09 06:44:13 +00:00
{{#each reasons}}
<span class="reasons">{{.}}</span> {{#unless @last}}&laquo;{{/unless}}
{{/each}}
</div>
{{/if}}
2017-03-04 04:25:14 +00:00
<div class="glossary">
2017-01-09 06:44:13 +00:00
{{#if grouped}}
{{#if definitions.[1]}}
<ol>
{{#each definitions}}
<li>{{> definition}}</li>
{{/each}}
</ol>
{{else}}
{{> definition definitions.[0]}}
{{/if}}
{{else}}
{{> definition}}
{{/if}}
</div>
2017-03-18 03:45:47 +00:00
</div>
2017-01-09 06:44:13 +00:00
{{/inline}}
2016-11-14 02:06:49 +00:00
{{#if definitions}}
{{#each definitions}}
2017-01-09 03:03:48 +00:00
{{#unless @first}}<hr>{{/unless}}
2017-01-09 06:44:13 +00:00
{{> term grouped=../grouped addable=../addable playback=../playback}}
2016-11-14 02:06:49 +00:00
{{/each}}
{{else}}
2017-03-04 19:53:55 +00:00
<p>No results found.</p>
2016-11-14 02:06:49 +00:00
{{/if}}