diff options
author | Alex Yatskov <alex@foosoft.net> | 2017-09-21 20:52:18 -0700 |
---|---|---|
committer | Alex Yatskov <alex@foosoft.net> | 2017-09-21 20:52:18 -0700 |
commit | a55576260a3f2d5acfd256ac93a58302dd761624 (patch) | |
tree | 8795ddca168ab69710960adc034ebd3c1375eb48 /tmpl | |
parent | 2ba01d2910fb0992b372d74854e2624541233127 (diff) |
work on kanji page
Diffstat (limited to 'tmpl')
-rw-r--r-- | tmpl/kanji.html | 67 |
1 files changed, 35 insertions, 32 deletions
diff --git a/tmpl/kanji.html b/tmpl/kanji.html index c46ce6a7..7c801355 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"> @@ -31,52 +46,40 @@ <table class="table table-condensed glyph-data"> <tr> - <th>Readings</th> <th>Glossary</th> - <th>Statistics</th> + <th>On'Yomi</th> + <th>Kun'Yomi</th> </tr> <tr> - <td class="reading"> - <dl> - {{#each kunyomi}} - <dd>{{.}}</dd> - {{/each}} - {{#each onyomi}} - <dd>{{.}}</dd> - {{/each}} - </dl> - </td> <td class="glossary"> {{#if glossary.[1]}} - <ol> - {{#each glossary}} - <li><span class="glossary-item">{{.}}</span></li> - {{/each}} - </ol> + <ol>{{#each glossary}}<li><span class="glossary-item">{{.}}</span></li>{{/each}}</ol> {{else}} <span class="glossary-item">{{glossary.[0]}}</span> {{/if}} </td> - <td></td> + <td class="reading"> + <dl>{{#each onyomi}}<dd>{{.}}</dd>{{/each}}</dl> + </td> + <td class="reading"> + <dl>{{#each kunyomi}}<dd>{{.}}</dd>{{/each}}</dl> + </td> + </tr> + <tr> + <th>Stats</th> + <th>Query</th> + <th>Code</th> + </tr> + <tr> + <td>{{> table data=stats.misc}}</td> + <td>{{> table data=stats.query}}</td> + <td>{{> table data=stats.code}}</td> </tr> <tr> <th colspan="3">Dictionary Indices</th> </tr> <tr> - <td colspan="3"> - {{#if stats.index}} - <table class="info-output"> - {{#each stats.index}} - <tr> - <th>{{#if notes}}{{notes}}{{else}}{{name}}{{/if}}</th> - <td>{{value}}</td> - </tr> - {{/each}} - </table> - {{else}} - No index data found - {{/if}} - </td> + <td colspan="3">{{> table data=stats.index}}</td> </tr> </table> |