aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/bg/js/templates.js36
-rw-r--r--tmpl/kanji.html6
-rw-r--r--tmpl/term.html6
3 files changed, 42 insertions, 6 deletions
diff --git a/ext/bg/js/templates.js b/ext/bg/js/templates.js
index 1e35f17e..c9d0052c 100644
--- a/ext/bg/js/templates.js
+++ b/ext/bg/js/templates.js
@@ -73,9 +73,21 @@ templates['kanji.html'] = template({"1":function(container,depth0,helpers,partia
+ alias4(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"name","hash":{},"data":data}) : helper)))
+ "</span>\n";
},"8":function(container,depth0,helpers,partials,data) {
+ var stack1;
+
+ return " <ol>\n"
+ + ((stack1 = helpers.each.call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.glossary : depth0),{"name":"each","hash":{},"fn":container.program(9, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
+ + " </ol>\n";
+},"9":function(container,depth0,helpers,partials,data) {
return " <li><span>"
+ container.escapeExpression(container.lambda(depth0, depth0))
+ "</span></li>\n";
+},"11":function(container,depth0,helpers,partials,data) {
+ var stack1;
+
+ return " <p>\n "
+ + container.escapeExpression(container.lambda(((stack1 = (depth0 != null ? depth0.glossary : depth0)) != null ? stack1["0"] : stack1), depth0))
+ + "\n </p>\n";
},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
var stack1, helper, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression;
@@ -91,9 +103,9 @@ templates['kanji.html'] = template({"1":function(container,depth0,helpers,partia
+ ((stack1 = helpers.each.call(alias1,(depth0 != null ? depth0.onyomi : depth0),{"name":"each","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
+ " </td>\n </tr>\n </table>\n </div>\n\n <div class=\"kanji-tags\">\n"
+ ((stack1 = helpers.each.call(alias1,(depth0 != null ? depth0.tags : depth0),{"name":"each","hash":{},"fn":container.program(6, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
- + " </div>\n\n <div class=\"kanji-glossary\">\n <ol>\n"
- + ((stack1 = helpers.each.call(alias1,(depth0 != null ? depth0.glossary : depth0),{"name":"each","hash":{},"fn":container.program(8, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
- + " </ol>\n </div>\n</div>\n";
+ + " </div>\n\n <div class=\"kanji-glossary\">\n"
+ + ((stack1 = helpers["if"].call(alias1,((stack1 = (depth0 != null ? depth0.glossary : depth0)) != null ? stack1["1"] : stack1),{"name":"if","hash":{},"fn":container.program(8, data, 0),"inverse":container.program(11, data, 0),"data":data})) != null ? stack1 : "")
+ + " </div>\n</div>\n";
},"useData":true});
templates['kanji-link.html'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
var helper;
@@ -197,9 +209,21 @@ templates['term.html'] = template({"1":function(container,depth0,helpers,partial
+ alias4(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"name","hash":{},"data":data}) : helper)))
+ "</span>\n";
},"15":function(container,depth0,helpers,partials,data) {
+ var stack1;
+
+ return " <ol>\n"
+ + ((stack1 = helpers.each.call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.glossary : depth0),{"name":"each","hash":{},"fn":container.program(16, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
+ + " </ol>\n";
+},"16":function(container,depth0,helpers,partials,data) {
return " <li><span>"
+ container.escapeExpression(container.lambda(depth0, depth0))
+ "</span></li>\n";
+},"18":function(container,depth0,helpers,partials,data) {
+ var stack1;
+
+ return " <p>\n "
+ + container.escapeExpression(container.lambda(((stack1 = (depth0 != null ? depth0.glossary : depth0)) != null ? stack1["0"] : stack1), depth0))
+ + "\n </p>\n";
},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
var stack1, helper, alias1=depth0 != null ? depth0 : {};
@@ -214,9 +238,9 @@ templates['term.html'] = template({"1":function(container,depth0,helpers,partial
+ ((stack1 = helpers.each.call(alias1,(depth0 != null ? depth0.rules : depth0),{"name":"each","hash":{},"fn":container.program(10, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
+ " </div>\n\n <div class=\"term-tags\">\n"
+ ((stack1 = helpers.each.call(alias1,(depth0 != null ? depth0.tags : depth0),{"name":"each","hash":{},"fn":container.program(13, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
- + " </div>\n\n <div class=\"term-glossary\">\n <ol>\n"
- + ((stack1 = helpers.each.call(alias1,(depth0 != null ? depth0.glossary : depth0),{"name":"each","hash":{},"fn":container.program(15, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
- + " </ol>\n </div>\n</div>\n";
+ + " </div>\n\n <div class=\"term-glossary\">\n"
+ + ((stack1 = helpers["if"].call(alias1,((stack1 = (depth0 != null ? depth0.glossary : depth0)) != null ? stack1["1"] : stack1),{"name":"if","hash":{},"fn":container.program(15, data, 0),"inverse":container.program(18, data, 0),"data":data})) != null ? stack1 : "")
+ + " </div>\n</div>\n";
},"useData":true});
templates['term-list.html'] = template({"1":function(container,depth0,helpers,partials,data,blockParams,depths) {
var stack1;
diff --git a/tmpl/kanji.html b/tmpl/kanji.html
index 380e16ff..e22dd660 100644
--- a/tmpl/kanji.html
+++ b/tmpl/kanji.html
@@ -35,10 +35,16 @@
</div>
<div class="kanji-glossary">
+ {{#if glossary.[1]}}
<ol>
{{#each glossary}}
<li><span>{{.}}</span></li>
{{/each}}
</ol>
+ {{else}}
+ <p>
+ {{glossary.[0]}}
+ </p>
+ {{/if}}
</div>
</div>
diff --git a/tmpl/term.html b/tmpl/term.html
index 36f8f4fc..6185ca25 100644
--- a/tmpl/term.html
+++ b/tmpl/term.html
@@ -28,10 +28,16 @@
</div>
<div class="term-glossary">
+ {{#if glossary.[1]}}
<ol>
{{#each glossary}}
<li><span>{{.}}</span></li>
{{/each}}
</ol>
+ {{else}}
+ <p>
+ {{glossary.[0]}}
+ </p>
+ {{/if}}
</div>
</div>