This commit is contained in:
Alex Yatskov 2016-04-16 22:54:19 -07:00
parent f7fa1bc51c
commit c353ec04bc
4 changed files with 31 additions and 30 deletions

View File

@ -34,19 +34,17 @@ templates['term.html'] = template({"1":function(container,depth0,helpers,partial
+ 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))) + 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"; + "</div>\n";
},"5":function(container,depth0,helpers,partials,data) { },"5":function(container,depth0,helpers,partials,data) {
var stack1, helper, alias1=depth0 != null ? depth0 : {}; var stack1;
return "<div class=\"rules\">\n" return "<div class=\"rules\">\n"
+ ((stack1 = helpers.each.call(alias1,(depth0 != null ? depth0.rules : depth0),{"name":"each","hash":{},"fn":container.program(6, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + ((stack1 = helpers.each.call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.rules : depth0),{"name":"each","hash":{},"fn":container.program(6, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
+ " &laquo;\n " + "</div>\n";
+ container.escapeExpression(((helper = (helper = helpers.source || (depth0 != null ? depth0.source : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(alias1,{"name":"source","hash":{},"data":data}) : helper)))
+ "\n</div>\n";
},"6":function(container,depth0,helpers,partials,data) { },"6":function(container,depth0,helpers,partials,data) {
var stack1; var stack1;
return " " return " <span class=\"rule\">"
+ container.escapeExpression(container.lambda(depth0, depth0)) + container.escapeExpression(container.lambda(depth0, depth0))
+ " " + "</span> "
+ ((stack1 = helpers.unless.call(depth0 != null ? depth0 : {},(data && data.last),{"name":"unless","hash":{},"fn":container.program(7, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + ((stack1 = helpers.unless.call(depth0 != null ? depth0 : {},(data && data.last),{"name":"unless","hash":{},"fn":container.program(7, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
+ "\n"; + "\n";
},"7":function(container,depth0,helpers,partials,data) { },"7":function(container,depth0,helpers,partials,data) {
@ -58,15 +56,10 @@ templates['term.html'] = template({"1":function(container,depth0,helpers,partial
+ ((stack1 = helpers.each.call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.tags : depth0),{"name":"each","hash":{},"fn":container.program(10, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + ((stack1 = helpers.each.call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.tags : depth0),{"name":"each","hash":{},"fn":container.program(10, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
+ "</div>\n"; + "</div>\n";
},"10":function(container,depth0,helpers,partials,data) { },"10":function(container,depth0,helpers,partials,data) {
var stack1; return " <span class=\"tag\">"
return " "
+ container.escapeExpression(container.lambda(depth0, depth0)) + container.escapeExpression(container.lambda(depth0, depth0))
+ ((stack1 = helpers.unless.call(depth0 != null ? depth0 : {},(data && data.last),{"name":"unless","hash":{},"fn":container.program(11, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + "</span>\n";
+ "\n"; },"12":function(container,depth0,helpers,partials,data) {
},"11":function(container,depth0,helpers,partials,data) {
return ",";
},"13":function(container,depth0,helpers,partials,data) {
return " <li><span>" return " <li><span>"
+ container.escapeExpression(container.lambda(depth0, depth0)) + container.escapeExpression(container.lambda(depth0, depth0))
+ "</span></li>\n"; + "</span></li>\n";
@ -79,7 +72,7 @@ templates['term.html'] = template({"1":function(container,depth0,helpers,partial
+ "\n" + "\n"
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.tags : depth0),{"name":"if","hash":{},"fn":container.program(9, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.tags : depth0),{"name":"if","hash":{},"fn":container.program(9, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
+ "\n<div class=\"glossary\">\n <ol>\n" + "\n<div class=\"glossary\">\n <ol>\n"
+ ((stack1 = helpers.each.call(alias1,(depth0 != null ? depth0.glossary : depth0),{"name":"each","hash":{},"fn":container.program(13, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + ((stack1 = helpers.each.call(alias1,(depth0 != null ? depth0.glossary : depth0),{"name":"each","hash":{},"fn":container.program(12, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
+ " </ol>\n</div>\n"; + " </ol>\n</div>\n";
},"useData":true}); },"useData":true});
})(); })();

View File

@ -18,13 +18,11 @@
iframe.yomichan-popup { iframe.yomichan-popup {
all: initial; all: initial;
background-color: #fff;
border: 1px solid #999; border: 1px solid #999;
box-shadow: 0 0 10px rgba(0, 0, 0, .5); box-shadow: 0 0 10px rgba(0, 0, 0, .5);
height: 300px; height: 300px;
width: 500px; width: 500px;
resize: both; resize: both;
overflow-y: auto;
position: fixed; position: fixed;
visibility: hidden; visibility: hidden;
z-index: 256; z-index: 256;

View File

@ -18,14 +18,16 @@
body { body {
background-color: #fff; background-color: #fff;
color: #000; color: #333;
font-family: sans-serif; font-family: helvetica neue,helvetica,arial,sans-serif;
font-size: 12pt; font-size: 14px;
line-height: 1.42857143;
overflow-y: auto;
} }
.expression { .expression {
font-family: serif; font-family: serif;
font-size: 18pt; font-size: 24px;
display: inline-block; display: inline-block;
} }
@ -34,12 +36,22 @@ body {
display: inline-block; display: inline-block;
} }
.tags { .tag {
color: #777; background-color: #777;
border-radius: 0.25em;
color: #fff;
display: inline;
font-size: 75%;
font-weight: 700;
line-height: 1;
padding: 0.2em 0.6em 0.3em;
text-align: center;
vertical-align: baseline;
white-space: nowrap;
} }
.glossary { ol {
font-size: 12pt; padding-left: 1.2em;
} }
li { li {

View File

@ -7,17 +7,15 @@
{{#if rules}} {{#if rules}}
<div class="rules"> <div class="rules">
{{#each rules}} {{#each rules}}
{{.}} {{#unless @last}}&laquo;{{/unless}} <span class="rule">{{.}}</span> {{#unless @last}}&laquo;{{/unless}}
{{/each}} {{/each}}
&laquo;
{{source}}
</div> </div>
{{/if}} {{/if}}
{{#if tags}} {{#if tags}}
<div class="tags"> <div class="tags">
{{#each tags}} {{#each tags}}
{{.}}{{#unless @last}},{{/unless}} <span class="tag">{{.}}</span>
{{/each}} {{/each}}
</div> </div>
{{/if}} {{/if}}