summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/bg/js/templates.js17
-rw-r--r--ext/fg/css/popup.css2
-rw-r--r--ext/fg/footer.html21
-rw-r--r--ext/fg/header.html21
-rw-r--r--util/tmpl/kanji.html13
-rw-r--r--util/tmpl/term.html4
6 files changed, 31 insertions, 47 deletions
diff --git a/ext/bg/js/templates.js b/ext/bg/js/templates.js
index c278a574..0d32b7da 100644
--- a/ext/bg/js/templates.js
+++ b/ext/bg/js/templates.js
@@ -14,10 +14,23 @@ templates['header.html'] = template({"compiler":[7,">= 4.0.0"],"main":function(c
+ container.escapeExpression(((helper = (helper = helpers.root || (depth0 != null ? depth0.root : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : {},{"name":"root","hash":{},"data":data}) : helper)))
+ "/css/popup.css\">\n </head>\n <body>\n <div class=\"dictionary\">\n <a href=\"javascript:setActiveDict('edict');\">単</a><a href=\"javascript:setActiveDict('enamdict')\">名</a><a href=\"javascript:setActiveDict('kanjidic');\">漢</a>\n </div>\n";
},"useData":true});
+templates['kanji.html'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
+ var helper, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression;
+
+ return "<div class=\"kanji\">"
+ + alias4(((helper = (helper = helpers.character || (depth0 != null ? depth0.character : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"character","hash":{},"data":data}) : helper)))
+ + "</div>\n\n<div class=\"reading\">\n "
+ + alias4(((helper = (helper = helpers.kunyomi || (depth0 != null ? depth0.kunyomi : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"kunyomi","hash":{},"data":data}) : helper)))
+ + "\n</div>\n\n<div class=\"reading\">\n "
+ + alias4(((helper = (helper = helpers.onyomi || (depth0 != null ? depth0.onyomi : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"onyomi","hash":{},"data":data}) : helper)))
+ + "\n</div>\n\n<div class=\"glossary\">\n "
+ + alias4(((helper = (helper = helpers.glossary || (depth0 != null ? depth0.glossary : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"glossary","hash":{},"data":data}) : helper)))
+ + "\n</div>\n";
+},"useData":true});
templates['term.html'] = template({"1":function(container,depth0,helpers,partials,data) {
var helper, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression;
- return "<div class=\"expression\"><ruby>"
+ return "<div class=\"term\"><ruby>"
+ alias4(((helper = (helper = helpers.expression || (depth0 != null ? depth0.expression : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"expression","hash":{},"data":data}) : helper)))
+ "<rt>"
+ alias4(((helper = (helper = helpers.reading || (depth0 != null ? depth0.reading : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"reading","hash":{},"data":data}) : helper)))
@@ -25,7 +38,7 @@ templates['term.html'] = template({"1":function(container,depth0,helpers,partial
},"3":function(container,depth0,helpers,partials,data) {
var helper;
- return "<div class=\"expression\">"
+ return "<div class=\"term\">"
+ container.escapeExpression(((helper = (helper = helpers.expression || (depth0 != null ? depth0.expression : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : {},{"name":"expression","hash":{},"data":data}) : helper)))
+ "</div>\n";
},"5":function(container,depth0,helpers,partials,data) {
diff --git a/ext/fg/css/popup.css b/ext/fg/css/popup.css
index 668ad867..4e8dc5f7 100644
--- a/ext/fg/css/popup.css
+++ b/ext/fg/css/popup.css
@@ -25,7 +25,7 @@ body {
overflow-y: auto;
}
-.expression {
+.term {
font-family: serif;
font-size: 24px;
display: inline-block;
diff --git a/ext/fg/footer.html b/ext/fg/footer.html
deleted file mode 100644
index 3f37d8bd..00000000
--- a/ext/fg/footer.html
+++ /dev/null
@@ -1,21 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
- <head>
- <meta charset="UTF-8">
- <title></title>
- <link rel="stylesheet" href="{{root}}/css/popup.css">
- </head>
- <body>
- <div class="dictionary">
- <a href="javascript:setActiveDict('edict');">単</a><a href="javascript:setActiveDict('enamdict')">名</a><a href="javascript:setActiveDict('kanjidic');">漢</a>
- </div>
-
- {{#each defs}}
- <div class="definition">
- {{> term.html}}
- </div>
- {{/each}}
-
- <script src="{{root}}/js/popup.js"></script>
- </body>
-</html>
diff --git a/ext/fg/header.html b/ext/fg/header.html
deleted file mode 100644
index 3f37d8bd..00000000
--- a/ext/fg/header.html
+++ /dev/null
@@ -1,21 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
- <head>
- <meta charset="UTF-8">
- <title></title>
- <link rel="stylesheet" href="{{root}}/css/popup.css">
- </head>
- <body>
- <div class="dictionary">
- <a href="javascript:setActiveDict('edict');">単</a><a href="javascript:setActiveDict('enamdict')">名</a><a href="javascript:setActiveDict('kanjidic');">漢</a>
- </div>
-
- {{#each defs}}
- <div class="definition">
- {{> term.html}}
- </div>
- {{/each}}
-
- <script src="{{root}}/js/popup.js"></script>
- </body>
-</html>
diff --git a/util/tmpl/kanji.html b/util/tmpl/kanji.html
new file mode 100644
index 00000000..66e4647e
--- /dev/null
+++ b/util/tmpl/kanji.html
@@ -0,0 +1,13 @@
+<div class="kanji">{{character}}</div>
+
+<div class="reading">
+ {{kunyomi}}
+</div>
+
+<div class="reading">
+ {{onyomi}}
+</div>
+
+<div class="glossary">
+ {{glossary}}
+</div>
diff --git a/util/tmpl/term.html b/util/tmpl/term.html
index 6894dde3..6c4d31ed 100644
--- a/util/tmpl/term.html
+++ b/util/tmpl/term.html
@@ -1,7 +1,7 @@
{{#if reading}}
-<div class="expression"><ruby>{{expression}}<rt>{{reading}}</rt></ruby></div>
+<div class="term"><ruby>{{expression}}<rt>{{reading}}</rt></ruby></div>
{{else}}
-<div class="expression">{{expression}}</div>
+<div class="term">{{expression}}</div>
{{/if}}
{{#if rules}}