This commit is contained in:
Alex Yatskov 2016-04-17 18:35:22 -07:00
parent 6f45cc2871
commit 52a8e2207c
6 changed files with 31 additions and 47 deletions

View File

@ -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) {

View File

@ -25,7 +25,7 @@ body {
overflow-y: auto;
}
.expression {
.term {
font-family: serif;
font-size: 24px;
display: inline-block;

View File

@ -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>

View File

@ -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>

13
util/tmpl/kanji.html Normal file
View File

@ -0,0 +1,13 @@
<div class="kanji">{{character}}</div>
<div class="reading">
{{kunyomi}}
</div>
<div class="reading">
{{onyomi}}
</div>
<div class="glossary">
{{glossary}}
</div>

View File

@ -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}}