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-04 04:25:14 +00:00
<p>
<div class="actions">
2017-01-09 06:44:13 +00:00
{{#if addable}}
<a href="#" title="Add term as expression" class="action-add-note pending disabled" data-mode="term_kanji" data-index="{{@index}}"><img src="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="img/add_term_kana.png"></a>
{{/if}}
{{#if playback}}
<a href="#" title="Play audio" class="action-play-audio" data-index="{{@index}}"><img src="img/play_audio.png"></a>
{{/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-04 04:25:14 +00:00
</p>
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}}
<p>No results found</p>
{{/if}}