diff options
author | Alex Yatskov <alex@foosoft.net> | 2016-04-24 19:23:13 -0700 |
---|---|---|
committer | Alex Yatskov <alex@foosoft.net> | 2016-04-24 19:23:13 -0700 |
commit | 6908d9e7e345f46e2b4c635fbfe1fbed924ab5bd (patch) | |
tree | ad62798e5ab9df57849a7fb6c01fa4b8bc267a40 /util/tmpl | |
parent | 8292be0243c3478845a851aadcbf476660d86d7f (diff) |
WIP
Diffstat (limited to 'util/tmpl')
-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> |