aboutsummaryrefslogtreecommitdiff
path: root/tmpl/kanji.html
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2017-09-23 12:42:02 -0700
committerAlex Yatskov <alex@foosoft.net>2017-09-23 12:42:02 -0700
commit327027d820759c62f50454822c11c0b8859c1d04 (patch)
tree3a13a25634b7eaf702634a3d6baeb8806c48ab02 /tmpl/kanji.html
parent2eb85cb835a4aece7839eba25c0030e9eb186f85 (diff)
parentd13cb09fae53834baaac254d7b55d02a26f4a5c0 (diff)
Merge branch 'dev'
Diffstat (limited to 'tmpl/kanji.html')
-rw-r--r--tmpl/kanji.html94
1 files changed, 63 insertions, 31 deletions
diff --git a/tmpl/kanji.html b/tmpl/kanji.html
index bb62f488..a4bd95ee 100644
--- a/tmpl/kanji.html
+++ b/tmpl/kanji.html
@@ -1,3 +1,18 @@
+{{#*inline "table"}}
+{{#if data}}
+<table class="info-output">
+ {{#each data}}
+ <tr>
+ <th>{{#if notes}}{{notes}}{{else}}{{name}}{{/if}}</th>
+ <td>{{value}}</td>
+ </tr>
+ {{/each}}
+</table>
+{{else}}
+No data found
+{{/if}}
+{{/inline}}
+
{{#*inline "kanji"}}
<div class="entry" data-type="kanji">
<div class="actions">
@@ -13,44 +28,61 @@
<div class="glyph">{{character}}</div>
- <div class="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>
+ {{#if frequencies}}
+ <div>
+ {{#each frequencies}}
+ <span class="label label-default tag-frequency">{{dictionary}}:{{frequency}}</span>
+ {{/each}}
</div>
+ {{/if}}
+ {{#if tags}}
<div>
{{#each tags}}
<span class="label label-default tag-{{category}}" title="{{notes}}">{{name}}</span>
{{/each}}
</div>
+ {{/if}}
- <div class="glossary">
- {{#if glossary.[1]}}
- <ol>
- {{#each glossary}}
- <li><span class="glossary-item">{{#multiLine}}{{.}}{{/multiLine}}</span></li>
- {{/each}}
- </ol>
- {{else}}
- <div class="glossary-item">{{#multiLine}}{{glossary.[0]}}{{/multiLine}}</div>
- {{/if}}
- </div>
+ <table class="table table-condensed glyph-data">
+ <tr>
+ <th>Glossary</th>
+ <th>Readings</th>
+ <th>Statistics</th>
+ </tr>
+ <tr>
+ <td class="glossary">
+ {{#if glossary.[1]}}
+ <ol>{{#each glossary}}<li><span class="glossary-item">{{.}}</span></li>{{/each}}</ol>
+ {{else}}
+ <span class="glossary-item">{{glossary.[0]}}</span>
+ {{/if}}
+ </td>
+ <td class="reading">
+ {{#if onyomi}}<dl>{{#each onyomi}}<dd>{{.}}</dd>{{/each}}</dl>{{/if}}
+ {{#if kunyomi}}<dl>{{#each kunyomi}}<dd>{{.}}</dd>{{/each}}</dl>{{/if}}
+ </td>
+ <td>{{> table data=stats.misc}}</td>
+ </tr>
+ <tr>
+ <th colspan="3">Classifications</th>
+ </tr>
+ <tr>
+ <td colspan="3">{{> table data=stats.class}}</td>
+ </tr>
+ <tr>
+ <th colspan="3">Codepoints</th>
+ </tr>
+ <tr>
+ <td colspan="3">{{> table data=stats.code}}</td>
+ </tr>
+ <tr>
+ <th colspan="3">Dictionary Indices</th>
+ </tr>
+ <tr>
+ <td colspan="3">{{> table data=stats.index}}</td>
+ </tr>
+ </table>
{{#if debug}}
<pre>{{#dumpObject}}{{{.}}}{{/dumpObject}}</pre>
@@ -64,5 +96,5 @@
{{> kanji debug=../debug addable=../addable source=../source root=../root}}
{{/each}}
{{else}}
-<p class="note">No results found.</p>
+<p class="note">No results found</p>
{{/if}}