aboutsummaryrefslogtreecommitdiff
path: root/tmpl/kanji.html
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2017-01-22 19:22:53 -0800
committerAlex Yatskov <alex@foosoft.net>2017-01-22 19:22:53 -0800
commitf808221470b607996aa1554ebd15afa26bcfabd1 (patch)
tree9cc1a3fa0985eee61f99d192b808ab538db78ff4 /tmpl/kanji.html
parent985c5df328ccff8492576d005a00fae828f56bab (diff)
wip
Diffstat (limited to 'tmpl/kanji.html')
-rw-r--r--tmpl/kanji.html59
1 files changed, 59 insertions, 0 deletions
diff --git a/tmpl/kanji.html b/tmpl/kanji.html
new file mode 100644
index 00000000..3f6d8084
--- /dev/null
+++ b/tmpl/kanji.html
@@ -0,0 +1,59 @@
+{{#*inline "kanji"}}
+<div class="kanji-definition">
+ <div class="action-bar">
+ {{#if addable}}
+ <a href="#" title="Add Kanji" class="action-add-note pending disabled" data-mode="kanji" data-index="{{@index}}"><img src="img/add_kanji.png"></a>
+ {{/if}}
+ </div>
+
+ <div class="kanji-glyph">{{character}}</div>
+
+ <div class="kanji-reading">
+ <table>
+ <tr>
+ <th>Kunyomi:</th>
+ <td>
+ {{#each kunyomi}}
+ {{.}}{{#unless @last}}, {{/unless}}
+ {{/each}}
+ </td>
+ </tr>
+ <tr>
+ <th>Onyomi:</th>
+ <td>
+ {{#each onyomi}}
+ {{.}}{{#unless @last}}, {{/unless}}
+ {{/each}}
+ </td>
+ </tr>
+ </table>
+ </div>
+
+ <div class="kanji-tags">
+ {{#each tags}}
+ <span class="tag tag-{{category}}" title="{{notes}}">{{name}}</span>
+ {{/each}}
+ </div>
+
+ <div class="kanji-glossary">
+ {{#if glossary.[1]}}
+ <ol "kanji-glossary-group">
+ {{#each glossary}}
+ <li><span class="kanji-glossary-item">{{#multiLine}}{{.}}{{/multiLine}}</span></li>
+ {{/each}}
+ </ol>
+ {{else}}
+ <div class="kanji-glossary-group kanji-glossary-item">{{#multiLine}}{{glossary.[0]}}{{/multiLine}}</div>
+ {{/if}}
+ </div>
+</div>
+{{/inline}}
+
+{{#if definitions}}
+ {{#each definitions}}
+ {{#unless @first}}<hr>{{/unless}}
+ {{> kanji addable=../addable root=../root}}
+ {{/each}}
+{{else}}
+ <p>No results found</p>
+{{/if}}