aboutsummaryrefslogtreecommitdiff
path: root/tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'tmpl')
-rw-r--r--tmpl/footer.html3
-rw-r--r--tmpl/header.html14
-rw-r--r--tmpl/kanji-link.html1
-rw-r--r--tmpl/kanji-list.html5
-rw-r--r--tmpl/kanji.html43
-rw-r--r--tmpl/term-list.html5
-rw-r--r--tmpl/term.html40
7 files changed, 111 insertions, 0 deletions
diff --git a/tmpl/footer.html b/tmpl/footer.html
new file mode 100644
index 00000000..3840600f
--- /dev/null
+++ b/tmpl/footer.html
@@ -0,0 +1,3 @@
+ <script src="{{root}}/js/frame.js"></script>
+ </body>
+</html>
diff --git a/tmpl/header.html b/tmpl/header.html
new file mode 100644
index 00000000..2256b08a
--- /dev/null
+++ b/tmpl/header.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="UTF-8">
+ <title></title>
+ <style>
+ @font-face {
+ font-family: "KanjiStrokeOrders";
+ src: url("{{root}}/ttf/kanji-stroke-orders.ttf");
+ }
+ </style>
+ <link rel="stylesheet" href="{{root}}/css/frame.css">
+ </head>
+ <body>
diff --git a/tmpl/kanji-link.html b/tmpl/kanji-link.html
new file mode 100644
index 00000000..f4f8dc69
--- /dev/null
+++ b/tmpl/kanji-link.html
@@ -0,0 +1 @@
+<a href="#" class="kanji-link">{{kanji}}</a>
diff --git a/tmpl/kanji-list.html b/tmpl/kanji-list.html
new file mode 100644
index 00000000..b5d0b627
--- /dev/null
+++ b/tmpl/kanji-list.html
@@ -0,0 +1,5 @@
+{{> header.html}}
+{{#each defs}}
+{{> kanji.html root=../root options=../options sequence=../sequence}}
+{{/each}}
+{{> footer.html}}
diff --git a/tmpl/kanji.html b/tmpl/kanji.html
new file mode 100644
index 00000000..7a5affb7
--- /dev/null
+++ b/tmpl/kanji.html
@@ -0,0 +1,43 @@
+<div class="kanji-definition">
+ {{#with options}}
+ {{#if enableAnkiConnect}}
+ <div class="action-bar">
+ <a href="#" title="Add Kanji" class="action-link disabled" data-sequence="{{../sequence}}" data-mode="kanji" data-index="{{@index}}"><img src="{{../root}}/img/add_kanji.png"></a>
+ </div>
+ {{/if}}
+ {{/with}}
+
+ <div class="kanji-glyph">{{character}}</div>
+
+ <div class="kanji-info">
+ <dl>
+ {{#if glossary}}
+ <dt>Meanings</dt>
+ <dd>
+ {{#each glossary}}
+ {{.}}{{#unless @last}}, {{/unless}}
+ {{/each}}
+ </dd>
+ {{/if}}
+
+ {{#if kunyomi}}
+ <dt>Kunyomi</dt>
+ <dd>
+ {{#each kunyomi}}
+ {{.}}{{#unless @last}}, {{/unless}}
+ {{/each}}
+ </dd>
+ {{/if}}
+
+ {{#if onyomi}}
+ <dt>Onyomi</dt>
+ <dd>
+ {{#each onyomi}}
+ {{.}}{{#unless @last}}, {{/unless}}
+ {{/each}}
+ </dd>
+ {{/if}}
+ </dl>
+ </div>
+</div>
+</div>
diff --git a/tmpl/term-list.html b/tmpl/term-list.html
new file mode 100644
index 00000000..5581b679
--- /dev/null
+++ b/tmpl/term-list.html
@@ -0,0 +1,5 @@
+{{> header.html}}
+{{#each defs}}
+{{> term.html root=../root options=../options sequence=../sequence}}
+{{/each}}
+{{> footer.html}}
diff --git a/tmpl/term.html b/tmpl/term.html
new file mode 100644
index 00000000..216ccf0a
--- /dev/null
+++ b/tmpl/term.html
@@ -0,0 +1,40 @@
+<div class="term-definition">
+ {{#with options}}
+ {{#if enableAnkiConnect}}
+ <div class="action-bar">
+ <a href="#" title="Add term as expression" class="action-link disabled" data-sequence="{{../sequence}}" data-mode="vocabExp" data-index="{{@index}}"><img src="{{../root}}/img/add_expression.png"></a>
+ <a href="#" title="Add term as reading" class="action-link disabled" data-sequence="{{../sequence}}" data-mode="vocabReading" data-index="{{@index}}"><img src="{{../root}}/img/add_reading.png"></a>
+ </div>
+ {{/if}}
+ {{/with}}
+
+ {{#if reading}}
+ <div class="term-expression"><ruby>{{#kanjiLinks}}{{expression}}{{/kanjiLinks}}<rt>{{reading}}</rt></ruby></div>
+ {{else}}
+ <div class="term-expression">{{#kanjiLinks}}{{expression}}{{/kanjiLinks}}</div>
+ {{/if}}
+
+ {{#if rules}}
+ <div class="term-rules">
+ {{#each rules}}
+ <span class="rule">{{.}}</span> {{#unless @last}}&laquo;{{/unless}}
+ {{/each}}
+ </div>
+ {{/if}}
+
+ {{#if tags}}
+ <div class="term-tags">
+ {{#each tags}}
+ <span class="tag tag-{{class}}" title="{{desc}}">{{name}}</span>
+ {{/each}}
+ </div>
+ {{/if}}
+
+ <div class="term-glossary">
+ <ol>
+ {{#each glossary}}
+ <li><span>{{.}}</span></li>
+ {{/each}}
+ </ol>
+ </div>
+</div>