Skip to content
This repository has been archived by the owner on Feb 25, 2023. It is now read-only.

Commit

Permalink
Update icons to have a fixed size
Browse files Browse the repository at this point in the history
  • Loading branch information
toasted-nutbread committed Jan 12, 2020
1 parent 16d34f6 commit 1505990
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 23 deletions.
20 changes: 10 additions & 10 deletions ext/bg/js/templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ templates['kanji.html'] = template({"1":function(container,depth0,helpers,partia

return "<div class=\"entry\" data-type=\"kanji\">\n <div class=\"actions\">\n"
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.addable : depth0),{"name":"if","hash":{},"fn":container.program(11, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
+ " <img src=\"/mixed/img/entry-current.svg\" class=\"current\" title=\"Current entry (Alt + Up/Down/Home/End/PgUp/PgDn)\" alt>\n </div>\n\n <div class=\"glyph expression-scan-toggle\">"
+ " <img src=\"/mixed/img/entry-current.svg\" class=\"icon-image current\" title=\"Current entry (Alt + Up/Down/Home/End/PgUp/PgDn)\" alt>\n </div>\n\n <div class=\"glyph expression-scan-toggle\">"
+ container.escapeExpression(((helper = (helper = helpers.character || (depth0 != null ? depth0.character : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(alias1,{"name":"character","hash":{},"data":data}) : helper)))
+ "</div>\n\n"
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.frequencies : depth0),{"name":"if","hash":{},"fn":container.program(13, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
Expand All @@ -57,7 +57,7 @@ templates['kanji.html'] = template({"1":function(container,depth0,helpers,partia
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.debug : depth0),{"name":"if","hash":{},"fn":container.program(29, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
+ "</div>\n";
},"11":function(container,depth0,helpers,partials,data) {
return " <a href=\"#\" class=\"action-view-note pending disabled\"><img src=\"/mixed/img/view-note.svg\" title=\"View added note (Alt + V)\" alt></a>\n <a href=\"#\" class=\"action-add-note pending disabled\" data-mode=\"kanji\"><img src=\"/mixed/img/add-term-kanji.svg\" title=\"Add Kanji (Alt + K)\" alt></a>\n";
return " <a href=\"#\" class=\"action-view-note pending disabled\"><img src=\"/mixed/img/view-note.svg\" class=\"icon-image\" title=\"View added note (Alt + V)\" alt></a>\n <a href=\"#\" class=\"action-add-note pending disabled\" data-mode=\"kanji\"><img src=\"/mixed/img/add-term-kanji.svg\" class=\"icon-image\" title=\"Add Kanji (Alt + K)\" alt></a>\n";
},"13":function(container,depth0,helpers,partials,data) {
var stack1;

Expand Down Expand Up @@ -136,9 +136,9 @@ templates['kanji.html'] = template({"1":function(container,depth0,helpers,partia

return "<div class=\"term-navigation\">\n <a href=\"#\" "
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.source : depth0),{"name":"if","hash":{},"fn":container.program(33, data, 0, blockParams, depths),"inverse":container.program(35, data, 0, blockParams, depths),"data":data})) != null ? stack1 : "")
+ "><img src=\"/mixed/img/source-term.svg\" title=\"Source term (Alt + B)\" alt></a>\n <a href=\"#\" "
+ "><img src=\"/mixed/img/source-term.svg\" class=\"icon-image\" title=\"Source term (Alt + B)\" alt></a>\n <a href=\"#\" "
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.next : depth0),{"name":"if","hash":{},"fn":container.program(37, data, 0, blockParams, depths),"inverse":container.program(39, data, 0, blockParams, depths),"data":data})) != null ? stack1 : "")
+ "><img src=\"/mixed/img/source-term.svg\" style=\"transform: scaleX(-1);\" title=\"Next term (Alt + F)\" alt></a>\n</div>\n"
+ "><img src=\"/mixed/img/source-term.svg\" class=\"icon-image\" style=\"transform: scaleX(-1);\" title=\"Next term (Alt + F)\" alt></a>\n</div>\n"
+ ((stack1 = helpers.each.call(alias1,(depth0 != null ? depth0.definitions : depth0),{"name":"each","hash":{},"fn":container.program(41, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "");
},"33":function(container,depth0,helpers,partials,data) {
return "class=\"source-term\"";
Expand Down Expand Up @@ -316,7 +316,7 @@ templates['terms.html'] = template({"1":function(container,depth0,helpers,partia
return "<div class=\"entry\" data-type=\"term\">\n <div class=\"actions\">\n"
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.addable : depth0),{"name":"if","hash":{},"fn":container.program(25, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "")
+ ((stack1 = helpers.unless.call(alias1,(depth0 != null ? depth0.merged : depth0),{"name":"unless","hash":{},"fn":container.program(27, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "")
+ " <img src=\"/mixed/img/entry-current.svg\" class=\"current\" title=\"Current entry (Alt + Up/Down/Home/End/PgUp/PgDn)\" alt>\n </div>\n\n"
+ " <img src=\"/mixed/img/entry-current.svg\" class=\"icon-image current\" title=\"Current entry (Alt + Up/Down/Home/End/PgUp/PgDn)\" alt>\n </div>\n\n"
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.merged : depth0),{"name":"if","hash":{},"fn":container.program(30, data, 0, blockParams, depths),"inverse":container.program(45, data, 0, blockParams, depths),"data":data})) != null ? stack1 : "")
+ "\n"
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.reasons : depth0),{"name":"if","hash":{},"fn":container.program(48, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "")
Expand All @@ -328,13 +328,13 @@ templates['terms.html'] = template({"1":function(container,depth0,helpers,partia
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.debug : depth0),{"name":"if","hash":{},"fn":container.program(64, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "")
+ "</div>\n";
},"25":function(container,depth0,helpers,partials,data) {
return " <a href=\"#\" class=\"action-view-note pending disabled\"><img src=\"/mixed/img/view-note.svg\" title=\"View added note (Alt + V)\" alt></a>\n <a href=\"#\" class=\"action-add-note pending disabled\" data-mode=\"term-kanji\"><img src=\"/mixed/img/add-term-kanji.svg\" title=\"Add expression (Alt + E)\" alt></a>\n <a href=\"#\" class=\"action-add-note pending disabled\" data-mode=\"term-kana\"><img src=\"/mixed/img/add-term-kana.svg\" title=\"Add reading (Alt + R)\" alt></a>\n";
return " <a href=\"#\" class=\"action-view-note pending disabled\"><img src=\"/mixed/img/view-note.svg\" class=\"icon-image\" title=\"View added note (Alt + V)\" alt></a>\n <a href=\"#\" class=\"action-add-note pending disabled\" data-mode=\"term-kanji\"><img src=\"/mixed/img/add-term-kanji.svg\" class=\"icon-image\" title=\"Add expression (Alt + E)\" alt></a>\n <a href=\"#\" class=\"action-add-note pending disabled\" data-mode=\"term-kana\"><img src=\"/mixed/img/add-term-kana.svg\" class=\"icon-image\" title=\"Add reading (Alt + R)\" alt></a>\n";
},"27":function(container,depth0,helpers,partials,data) {
var stack1;

return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.playback : depth0),{"name":"if","hash":{},"fn":container.program(28, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "");
},"28":function(container,depth0,helpers,partials,data) {
return " <a href=\"#\" class=\"action-play-audio\"><img src=\"/mixed/img/play-audio.svg\" title=\"Play audio (Alt + P)\" alt></a>\n";
return " <a href=\"#\" class=\"action-play-audio\"><img src=\"/mixed/img/play-audio.svg\" class=\"icon-image\" title=\"Play audio (Alt + P)\" alt></a>\n";
},"30":function(container,depth0,helpers,partials,data,blockParams,depths) {
var stack1;

Expand Down Expand Up @@ -366,7 +366,7 @@ templates['terms.html'] = template({"1":function(container,depth0,helpers,partia

return ((stack1 = container.lambda(depth0, depth0)) != null ? stack1 : "");
},"35":function(container,depth0,helpers,partials,data) {
return "<a href=\"#\" class=\"action-play-audio\"><img src=\"/mixed/img/play-audio.svg\" title=\"Play audio\" alt></a>";
return "<a href=\"#\" class=\"action-play-audio\"><img src=\"/mixed/img/play-audio.svg\" class=\"icon-image\" title=\"Play audio\" alt></a>";
},"37":function(container,depth0,helpers,partials,data) {
var stack1;

Expand Down Expand Up @@ -484,9 +484,9 @@ templates['terms.html'] = template({"1":function(container,depth0,helpers,partia

return "<div class=\"term-navigation\">\n <a href=\"#\" "
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.source : depth0),{"name":"if","hash":{},"fn":container.program(67, data, 0, blockParams, depths),"inverse":container.program(69, data, 0, blockParams, depths),"data":data})) != null ? stack1 : "")
+ "><img src=\"/mixed/img/source-term.svg\" title=\"Source term (Alt + B)\" alt></a>\n <a href=\"#\" "
+ "><img src=\"/mixed/img/source-term.svg\" class=\"icon-image\" title=\"Source term (Alt + B)\" alt></a>\n <a href=\"#\" "
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.next : depth0),{"name":"if","hash":{},"fn":container.program(71, data, 0, blockParams, depths),"inverse":container.program(73, data, 0, blockParams, depths),"data":data})) != null ? stack1 : "")
+ "><img src=\"/mixed/img/source-term.svg\" style=\"transform: scaleX(-1);\" title=\"Next term (Alt + F)\" alt></a>\n</div>\n"
+ "><img src=\"/mixed/img/source-term.svg\" class=\"icon-image\" style=\"transform: scaleX(-1);\" title=\"Next term (Alt + F)\" alt></a>\n</div>\n"
+ ((stack1 = helpers.each.call(alias1,(depth0 != null ? depth0.definitions : depth0),{"name":"each","hash":{},"fn":container.program(75, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "");
},"67":function(container,depth0,helpers,partials,data) {
return "class=\"source-term\"";
Expand Down
5 changes: 5 additions & 0 deletions ext/mixed/css/display.css
Original file line number Diff line number Diff line change
Expand Up @@ -261,3 +261,8 @@ div.glossary-item.compact-glossary {
vertical-align: baseline;
border-radius: 0.25em;
}

.icon-image {
width: 1.14285714em;
height: 1.14285714em;
}
10 changes: 5 additions & 5 deletions tmpl/kanji.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
<div class="entry" data-type="kanji">
<div class="actions">
{{#if addable}}
<a href="#" class="action-view-note pending disabled"><img src="/mixed/img/view-note.svg" title="View added note (Alt + V)" alt></a>
<a href="#" class="action-add-note pending disabled" data-mode="kanji"><img src="/mixed/img/add-term-kanji.svg" title="Add Kanji (Alt + K)" alt></a>
<a href="#" class="action-view-note pending disabled"><img src="/mixed/img/view-note.svg" class="icon-image" title="View added note (Alt + V)" alt></a>
<a href="#" class="action-add-note pending disabled" data-mode="kanji"><img src="/mixed/img/add-term-kanji.svg" class="icon-image" title="Add Kanji (Alt + K)" alt></a>
{{/if}}
<img src="/mixed/img/entry-current.svg" class="current" title="Current entry (Alt + Up/Down/Home/End/PgUp/PgDn)" alt>
<img src="/mixed/img/entry-current.svg" class="icon-image current" title="Current entry (Alt + Up/Down/Home/End/PgUp/PgDn)" alt>
</div>

<div class="glyph expression-scan-toggle">{{character}}</div>
Expand Down Expand Up @@ -89,8 +89,8 @@

{{#if definitions}}
<div class="term-navigation">
<a href="#" {{#if source}}class="source-term"{{else}}class="source-term invisible"{{/if}}><img src="/mixed/img/source-term.svg" title="Source term (Alt + B)" alt></a>
<a href="#" {{#if next}}class="next-term"{{else}}class="next-term invisible"{{/if}}><img src="/mixed/img/source-term.svg" style="transform: scaleX(-1);" title="Next term (Alt + F)" alt></a>
<a href="#" {{#if source}}class="source-term"{{else}}class="source-term invisible"{{/if}}><img src="/mixed/img/source-term.svg" class="icon-image" title="Source term (Alt + B)" alt></a>
<a href="#" {{#if next}}class="next-term"{{else}}class="next-term invisible"{{/if}}><img src="/mixed/img/source-term.svg" class="icon-image" style="transform: scaleX(-1);" title="Next term (Alt + F)" alt></a>
</div>
{{#each definitions}}
{{#unless @first}}<hr>{{/unless}}
Expand Down
16 changes: 8 additions & 8 deletions tmpl/terms.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,23 @@
<div class="entry" data-type="term">
<div class="actions">
{{#if addable}}
<a href="#" class="action-view-note pending disabled"><img src="/mixed/img/view-note.svg" title="View added note (Alt + V)" alt></a>
<a href="#" class="action-add-note pending disabled" data-mode="term-kanji"><img src="/mixed/img/add-term-kanji.svg" title="Add expression (Alt + E)" alt></a>
<a href="#" class="action-add-note pending disabled" data-mode="term-kana"><img src="/mixed/img/add-term-kana.svg" title="Add reading (Alt + R)" alt></a>
<a href="#" class="action-view-note pending disabled"><img src="/mixed/img/view-note.svg" class="icon-image" title="View added note (Alt + V)" alt></a>
<a href="#" class="action-add-note pending disabled" data-mode="term-kanji"><img src="/mixed/img/add-term-kanji.svg" class="icon-image" title="Add expression (Alt + E)" alt></a>
<a href="#" class="action-add-note pending disabled" data-mode="term-kana"><img src="/mixed/img/add-term-kana.svg" class="icon-image" title="Add reading (Alt + R)" alt></a>
{{/if}}
{{#unless merged}}
{{#if playback}}
<a href="#" class="action-play-audio"><img src="/mixed/img/play-audio.svg" title="Play audio (Alt + P)" alt></a>
<a href="#" class="action-play-audio"><img src="/mixed/img/play-audio.svg" class="icon-image" title="Play audio (Alt + P)" alt></a>
{{/if}}
{{/unless}}
<img src="/mixed/img/entry-current.svg" class="current" title="Current entry (Alt + Up/Down/Home/End/PgUp/PgDn)" alt>
<img src="/mixed/img/entry-current.svg" class="icon-image current" title="Current entry (Alt + Up/Down/Home/End/PgUp/PgDn)" alt>
</div>

{{#if merged}}
{{~#each expressions~}}
<div class="expression expression-scan-toggle"><span class="expression-{{termFrequency}}">{{#kanjiLinks}}{{#furigana}}{{{.}}}{{/furigana}}{{/kanjiLinks}}</span><div class="peek-wrapper">
{{~#if ../playback~}}
<a href="#" class="action-play-audio"><img src="/mixed/img/play-audio.svg" title="Play audio" alt></a>
<a href="#" class="action-play-audio"><img src="/mixed/img/play-audio.svg" class="icon-image" title="Play audio" alt></a>
{{~/if~}}
{{~#if termTags~}}
<div class="tags">
Expand Down Expand Up @@ -127,8 +127,8 @@

{{#if definitions}}
<div class="term-navigation">
<a href="#" {{#if source}}class="source-term"{{else}}class="source-term invisible"{{/if}}><img src="/mixed/img/source-term.svg" title="Source term (Alt + B)" alt></a>
<a href="#" {{#if next}}class="next-term"{{else}}class="next-term invisible"{{/if}}><img src="/mixed/img/source-term.svg" style="transform: scaleX(-1);" title="Next term (Alt + F)" alt></a>
<a href="#" {{#if source}}class="source-term"{{else}}class="source-term invisible"{{/if}}><img src="/mixed/img/source-term.svg" class="icon-image" title="Source term (Alt + B)" alt></a>
<a href="#" {{#if next}}class="next-term"{{else}}class="next-term invisible"{{/if}}><img src="/mixed/img/source-term.svg" class="icon-image" style="transform: scaleX(-1);" title="Next term (Alt + F)" alt></a>
</div>
{{#each definitions}}
{{#unless @first}}<hr>{{/unless}}
Expand Down

0 comments on commit 1505990

Please sign in to comment.