From 36e9a332dfe8ea60f0149100ff990f9c5e58b449 Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Tue, 3 May 2016 22:18:03 -0700 Subject: WIP --- util/tmpl/kanji-list.html | 2 +- util/tmpl/kanji.html | 22 +++++++++++++--------- util/tmpl/term-list.html | 2 +- util/tmpl/term.html | 32 ++++++++++++++++++-------------- 4 files changed, 33 insertions(+), 25 deletions(-) (limited to 'util/tmpl') diff --git a/util/tmpl/kanji-list.html b/util/tmpl/kanji-list.html index 23e4d13f..094441f2 100644 --- a/util/tmpl/kanji-list.html +++ b/util/tmpl/kanji-list.html @@ -1,5 +1,5 @@ {{> header.html}} {{#each defs}} -{{> kanji.html root=../root}} +{{> kanji.html root=../root options=../options}} {{/each}} {{> footer.html}} diff --git a/util/tmpl/kanji.html b/util/tmpl/kanji.html index 7f797c4b..8aab5f18 100644 --- a/util/tmpl/kanji.html +++ b/util/tmpl/kanji.html @@ -1,13 +1,17 @@
-
- {{#with addable}} - {{#if kanji}} - - {{else}} - - {{/if}} - {{/with}} -
+ {{#with options}} + {{#if enableAnkiConnect}} +
+ {{#with ../addable}} + {{#if kanji}} + + {{else}} + + {{/if}} + {{/with}} +
+ {{/if}} + {{/with}}
{{character}}
diff --git a/util/tmpl/term-list.html b/util/tmpl/term-list.html index 9199092c..e4944a2f 100644 --- a/util/tmpl/term-list.html +++ b/util/tmpl/term-list.html @@ -1,5 +1,5 @@ {{> header.html}} {{#each defs}} -{{> term.html root=../root}} +{{> term.html root=../root options=../options}} {{/each}} {{> footer.html}} diff --git a/util/tmpl/term.html b/util/tmpl/term.html index 3d3d4eb0..b1ff1fd8 100644 --- a/util/tmpl/term.html +++ b/util/tmpl/term.html @@ -1,19 +1,23 @@
-
- {{#with addable}} - {{#if vocabExp}} - - {{else}} - - {{/if}} + {{#with options}} + {{#if enableAnkiConnect}} +
+ {{#with ../addable}} + {{#if vocabExp}} + + {{else}} + + {{/if}} - {{#if vocabReading}} - - {{else}} - - {{/if}} - {{/with}} -
+ {{#if vocabReading}} + + {{else}} + + {{/if}} + {{/with}} +
+ {{/if}} + {{/with}} {{#if reading}}
{{#kanjiLinks}}{{expression}}{{/kanjiLinks}}{{reading}}
-- cgit v1.2.3