From 6908d9e7e345f46e2b4c635fbfe1fbed924ab5bd Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Sun, 24 Apr 2016 19:23:13 -0700 Subject: WIP --- util/tmpl/kanji-list.html | 4 +--- util/tmpl/kanji.html | 36 ++++++++++++++++++++++++-------- util/tmpl/term-list.html | 4 +--- util/tmpl/term.html | 52 ++++++++++++++++++++++++----------------------- 4 files changed, 56 insertions(+), 40 deletions(-) (limited to 'util/tmpl') 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}} -
- {{> kanji.html}} -
+{{> 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 @@ -
{{character}}
+
+
{{character}}
-
- {{kunyomi}} -
+
+ {{#if kunyomi}} +
+
Kunyomi
+ {{#each kunyomi}} +
{{.}}
+ {{/each}} +
+ {{/if}} -
- {{onyomi}} -
+ {{#if onyomi}} +
+
Onyomi
+ {{#each onyomi}} +
{{.}}
+ {{/each}} +
+ {{/if}} +
-
- {{glossary}} +
+
    + {{#each glossary}} +
  1. {{.}}
  2. + {{/each}} +
+
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}} -
- {{> term.html}} -
+{{> 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}} -
{{#kanjiLinks}}{{expression}}{{/kanjiLinks}}{{reading}}
-{{else}} -
{{#kanjiLinks}}{{expression}}{{/kanjiLinks}}
-{{/if}} +
+ {{#if reading}} +
{{#kanjiLinks}}{{expression}}{{/kanjiLinks}}{{reading}}
+ {{else}} +
{{#kanjiLinks}}{{expression}}{{/kanjiLinks}}
+ {{/if}} -{{#if rules}} -
- {{#each rules}} - {{.}} {{#unless @last}}«{{/unless}} - {{/each}} -
-{{/if}} - -{{#if tags}} -
- {{#each tags}} - {{name}} - {{/each}} -
-{{/if}} + {{#if rules}} +
+ {{#each rules}} + {{.}} {{#unless @last}}«{{/unless}} + {{/each}} +
+ {{/if}} -
-
    - {{#each glossary}} -
  1. {{.}}
  2. + {{#if tags}} +
    + {{#each tags}} + {{name}} {{/each}} -
+
+ {{/if}} + +
+
    + {{#each glossary}} +
  1. {{.}}
  2. + {{/each}} +
+
-- cgit v1.2.3