diff options
Diffstat (limited to 'util')
-rw-r--r-- | util/tmpl/kanji-list.html | 4 | ||||
-rw-r--r-- | util/tmpl/kanji.html | 36 | ||||
-rw-r--r-- | util/tmpl/term-list.html | 4 | ||||
-rw-r--r-- | util/tmpl/term.html | 52 |
4 files changed, 56 insertions, 40 deletions
diff --git a/util/tmpl/kanji-list.html b/util/tmpl/kanji-list.html index b0e43634..542a5e2f 100644 --- a/util/tmpl/kanji-list.html +++ b/util/tmpl/kanji-list.html @@ -1,7 +1,5 @@ {{> header.html}} {{#each defs}} -<div class="definition"> - {{> kanji.html}} -</div> +{{> kanji.html}} {{/each}} {{> footer.html}} diff --git a/util/tmpl/kanji.html b/util/tmpl/kanji.html index 66e4647e..0e85e966 100644 --- a/util/tmpl/kanji.html +++ b/util/tmpl/kanji.html @@ -1,13 +1,31 @@ -<div class="kanji">{{character}}</div> +<div class="definition"> + <div class="kanji">{{character}}</div> -<div class="reading"> - {{kunyomi}} -</div> + <div class="readings"> + {{#if kunyomi}} + <dl> + <dt>Kunyomi</dt> + {{#each kunyomi}} + <dd>{{.}}</dd> + {{/each}} + </dl> + {{/if}} -<div class="reading"> - {{onyomi}} -</div> + {{#if onyomi}} + <dl> + <dt>Onyomi</dt> + {{#each onyomi}} + <dd>{{.}}</dd> + {{/each}} + </dl> + {{/if}} + </div> -<div class="glossary"> - {{glossary}} + <div class="glossary"> + <ol> + {{#each glossary}} + <li><span>{{.}}</span></li> + {{/each}} + </ol> + </div> </div> diff --git a/util/tmpl/term-list.html b/util/tmpl/term-list.html index 9e55a80e..6206f323 100644 --- a/util/tmpl/term-list.html +++ b/util/tmpl/term-list.html @@ -1,7 +1,5 @@ {{> header.html}} {{#each defs}} -<div class="definition"> - {{> term.html}} -</div> +{{> term.html}} {{/each}} {{> footer.html}} diff --git a/util/tmpl/term.html b/util/tmpl/term.html index 054f7510..00a9d156 100644 --- a/util/tmpl/term.html +++ b/util/tmpl/term.html @@ -1,29 +1,31 @@ -{{#if reading}} -<div class="term"><ruby>{{#kanjiLinks}}{{expression}}{{/kanjiLinks}}<rt>{{reading}}</rt></ruby></div> -{{else}} -<div class="term">{{#kanjiLinks}}{{expression}}{{/kanjiLinks}}</div> -{{/if}} +<div class="definition"> + {{#if reading}} + <div class="term"><ruby>{{#kanjiLinks}}{{expression}}{{/kanjiLinks}}<rt>{{reading}}</rt></ruby></div> + {{else}} + <div class="term">{{#kanjiLinks}}{{expression}}{{/kanjiLinks}}</div> + {{/if}} -{{#if rules}} -<div class="rules"> - {{#each rules}} - <span class="rule">{{.}}</span> {{#unless @last}}«{{/unless}} - {{/each}} -</div> -{{/if}} - -{{#if tags}} -<div class="tags"> - {{#each tags}} - <span class="tag tag-{{class}}" title="{{desc}}">{{name}}</span> - {{/each}} -</div> -{{/if}} + {{#if rules}} + <div class="rules"> + {{#each rules}} + <span class="rule">{{.}}</span> {{#unless @last}}«{{/unless}} + {{/each}} + </div> + {{/if}} -<div class="glossary"> - <ol> - {{#each glossary}} - <li><span>{{.}}</span></li> + {{#if tags}} + <div class="tags"> + {{#each tags}} + <span class="tag tag-{{class}}" title="{{desc}}">{{name}}</span> {{/each}} - </ol> + </div> + {{/if}} + + <div class="glossary"> + <ol> + {{#each glossary}} + <li><span>{{.}}</span></li> + {{/each}} + </ol> + </div> </div> |