From 69b9cac8af448e9769c5d3f50fac785b46800b79 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sun, 6 Oct 2019 20:50:59 -0400 Subject: [PATCH 1/3] Create SVG icons --- ext/mixed/img/add-term-kana.svg | 23 + ext/mixed/img/add-term-kanji.svg | 24 + ext/mixed/img/entry-current.svg | 16 + ext/mixed/img/play-audio.svg | 27 + ext/mixed/img/source-term.svg | 31 ++ ext/mixed/img/view-note.svg | 22 + resources/icons.svg | 892 +++++++++++++++++++++++++++++++ 7 files changed, 1035 insertions(+) create mode 100644 ext/mixed/img/add-term-kana.svg create mode 100644 ext/mixed/img/add-term-kanji.svg create mode 100644 ext/mixed/img/entry-current.svg create mode 100644 ext/mixed/img/play-audio.svg create mode 100644 ext/mixed/img/source-term.svg create mode 100644 ext/mixed/img/view-note.svg create mode 100644 resources/icons.svg diff --git a/ext/mixed/img/add-term-kana.svg b/ext/mixed/img/add-term-kana.svg new file mode 100644 index 00000000..bb964476 --- /dev/null +++ b/ext/mixed/img/add-term-kana.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ext/mixed/img/add-term-kanji.svg b/ext/mixed/img/add-term-kanji.svg new file mode 100644 index 00000000..3737eaec --- /dev/null +++ b/ext/mixed/img/add-term-kanji.svg @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ext/mixed/img/entry-current.svg b/ext/mixed/img/entry-current.svg new file mode 100644 index 00000000..abf3f76d --- /dev/null +++ b/ext/mixed/img/entry-current.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/ext/mixed/img/play-audio.svg b/ext/mixed/img/play-audio.svg new file mode 100644 index 00000000..1d5e2d9c --- /dev/null +++ b/ext/mixed/img/play-audio.svg @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ext/mixed/img/source-term.svg b/ext/mixed/img/source-term.svg new file mode 100644 index 00000000..a70938f2 --- /dev/null +++ b/ext/mixed/img/source-term.svg @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ext/mixed/img/view-note.svg b/ext/mixed/img/view-note.svg new file mode 100644 index 00000000..3e6f1dce --- /dev/null +++ b/ext/mixed/img/view-note.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/icons.svg b/resources/icons.svg new file mode 100644 index 00000000..4bc46c02 --- /dev/null +++ b/resources/icons.svg @@ -0,0 +1,892 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 7c826fdd0bffe2df49bdb3d783e496af41908f13 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sun, 6 Oct 2019 21:05:27 -0400 Subject: [PATCH 2/3] Switch from using PNGs to SVGs --- ext/bg/guide.html | 2 +- ext/bg/js/templates.js | 16 ++++++++-------- tmpl/kanji.html | 8 ++++---- tmpl/terms.html | 14 +++++++------- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/ext/bg/guide.html b/ext/bg/guide.html index 7ec1d8d9..2a602f1f 100644 --- a/ext/bg/guide.html +++ b/ext/bg/guide.html @@ -23,7 +23,7 @@
  • Click on the monkey wrench icon in the middle to open the options page.
  • Import the dictionaries you wish to use for term and Kanji searches.
  • Hold down Shift key or the middle mouse button as you move your mouse over text to display definitions.
  • -
  • Click on the icon to hear the term pronounced by a native speaker.
  • +
  • Click on the icon to hear the term pronounced by a native speaker.
  • Click on individual Kanji in the term definition results to view additional information about those characters.
  • diff --git a/ext/bg/js/templates.js b/ext/bg/js/templates.js index e12d1bf3..c61f5d7f 100644 --- a/ext/bg/js/templates.js +++ b/ext/bg/js/templates.js @@ -61,7 +61,7 @@ templates['kanji.html'] = template({"1":function(container,depth0,helpers,partia return "
    \n
    \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 : "") + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.source : depth0),{"name":"if","hash":{},"fn":container.program(13, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") - + " \n
    \n\n
    " + + " \n
    \n\n
    " + 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))) + "
    \n\n" + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.frequencies : depth0),{"name":"if","hash":{},"fn":container.program(15, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") @@ -85,9 +85,9 @@ 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(31, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + "
    \n"; },"11":function(container,depth0,helpers,partials,data) { - return " \n \n"; + return " \n \n"; },"13":function(container,depth0,helpers,partials,data) { - return " \n"; + return " \n"; },"15":function(container,depth0,helpers,partials,data) { var stack1; @@ -290,7 +290,7 @@ templates['terms.html'] = template({"1":function(container,depth0,helpers,partia + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.addable : depth0),{"name":"if","hash":{},"fn":container.program(23, 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(25, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.source : depth0),{"name":"if","hash":{},"fn":container.program(28, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") - + " \n \n\n" + + " \n \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(49, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") @@ -302,15 +302,15 @@ 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(65, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") + "\n"; },"23":function(container,depth0,helpers,partials,data) { - return " \n \n \n"; + return " \n \n \n"; },"25":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(26, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); },"26":function(container,depth0,helpers,partials,data) { - return " \n"; + return " \n"; },"28":function(container,depth0,helpers,partials,data) { - return " \n"; + return " \n"; },"30":function(container,depth0,helpers,partials,data,blockParams,depths) { var stack1; @@ -342,7 +342,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 ""; + return ""; },"37":function(container,depth0,helpers,partials,data) { var stack1; diff --git a/tmpl/kanji.html b/tmpl/kanji.html index a4bd95ee..0888d141 100644 --- a/tmpl/kanji.html +++ b/tmpl/kanji.html @@ -17,13 +17,13 @@ No data found
    {{#if addable}} - - + + {{/if}} {{#if source}} - + {{/if}} - +
    {{character}}
    diff --git a/tmpl/terms.html b/tmpl/terms.html index b9e5e0ad..0b967bb5 100644 --- a/tmpl/terms.html +++ b/tmpl/terms.html @@ -30,26 +30,26 @@
    {{#if addable}} - - - + + + {{/if}} {{#unless merged}} {{#if playback}} - + {{/if}} {{/unless}} {{#if source}} - + {{/if}} - +
    {{#if merged}} {{~#each expressions~}}
    {{#kanjiLinks}}{{#furigana}}{{{.}}}{{/furigana}}{{/kanjiLinks}}
    {{~#if ../playback~}} - + {{~/if~}} {{~#if termTags~}}
    From 205c7d88d071d2c9328ff103ca90edfecf793919 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sun, 6 Oct 2019 21:07:57 -0400 Subject: [PATCH 3/3] Remove PNG icons --- ext/mixed/img/add-kanji.png | Bin 733 -> 0 bytes ext/mixed/img/add-term-kana.png | Bin 286 -> 0 bytes ext/mixed/img/add-term-kanji.png | Bin 733 -> 0 bytes ext/mixed/img/entry-current.png | Bin 743 -> 0 bytes ext/mixed/img/play-audio.png | Bin 610 -> 0 bytes ext/mixed/img/source-term.png | Bin 680 -> 0 bytes ext/mixed/img/view-note.png | Bin 622 -> 0 bytes 7 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 ext/mixed/img/add-kanji.png delete mode 100644 ext/mixed/img/add-term-kana.png delete mode 100644 ext/mixed/img/add-term-kanji.png delete mode 100644 ext/mixed/img/entry-current.png delete mode 100644 ext/mixed/img/play-audio.png delete mode 100644 ext/mixed/img/source-term.png delete mode 100644 ext/mixed/img/view-note.png diff --git a/ext/mixed/img/add-kanji.png b/ext/mixed/img/add-kanji.png deleted file mode 100644 index 6332fefea4be19eeadf211b0b202b272e8564898..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 733 zcmV<30wVp1P)9VHk(~TedF+gQSL8D5xnVSSWAVY>J9b+m>@{iq7_KE}go~11+5s4;8hc+i0Xa zI1j@EX5!S+Me6HNqKzU5YQwL;-W5$p%ZMKMeR<%zp69-~?<4?8|C8S?bklXr4v&Ov zb&06v2|-x?qB`90yn>Qi%Sh2^G4n)$ZdyvTPf9}1)_buUT7>`e2G&2VU@~Bb(o+Mz zi4)>IxlSY${Dj4k={-9RzU^W5g9|2V5RZ2ZulL9s2xQbZ@r6eP9Ra5u(s|C0Nj#&4>wTSkb?%#=9?@ z^oxDy-O@tyN{L@by(WWvQ3%CyEu8x{+#Jb4-h&K9Owi)2pgg+heWDyked|3R$$kL@A z#sp1v-r+=G4B8D6DqsDH0@7OztA7aT9qc1Py{()w`m``?Y0&gi2=ROcc-9+nU^I6< zT=e_Y=vSnG@?3Ue{BW5ONFttcE!R-R_W4O01|0-|K-YNXLo2`4Qv z`r1LxR6#yf3FB%T95gJnaKKivA~Z}S9A(ZxEDK}O3T04USJ P00000NkvXXu0mjf^IS-S diff --git a/ext/mixed/img/add-term-kana.png b/ext/mixed/img/add-term-kana.png deleted file mode 100644 index 41ff8335b06be000bc6912c2bbd9d3c572c8a9da..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 286 zcmV+(0pb3MP)9VHk(~TedF+gQSL8D5xnVSSWAVY>J9b+m>@{iq7_KE}go~11+5s4;8hc+i0Xa zI1j@EX5!S+Me6HNqKzU5YQwL;-W5$p%ZMKMeR<%zp69-~?<4?8|C8S?bklXr4v&Ov zb&06v2|-x?qB`90yn>Qi%Sh2^G4n)$ZdyvTPf9}1)_buUT7>`e2G&2VU@~Bb(o+Mz zi4)>IxlSY${Dj4k={-9RzU^W5g9|2V5RZ2ZulL9s2xQbZ@r6eP9Ra5u(s|C0Nj#&4>wTSkb?%#=9?@ z^oxDy-O@tyN{L@by(WWvQ3%CyEu8x{+#Jb4-h&K9Owi)2pgg+heWDyked|3R$$kL@A z#sp1v-r+=G4B8D6DqsDH0@7OztA7aT9qc1Py{()w`m``?Y0&gi2=ROcc-9+nU^I6< zT=e_Y=vSnG@?3Ue{BW5ONFttcE!R-R_W4O01|0-|K-YNXLo2`4Qv z`r1LxR6#yf3FB%T95gJnaKKivA~Z}S9A(ZxEDK}O3T04USJ P00000NkvXXu0mjf^IS-S diff --git a/ext/mixed/img/entry-current.png b/ext/mixed/img/entry-current.png deleted file mode 100644 index bab7cc9bcc64f4f58a40019ab29bc90c98d5510c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 743 zcmV?P)rx$R<IWI`!e`47o+X|cM zhswMI)6H-!+|Ry*GtmT2KZBZTgf*vuh@Iv~E3-o`X2T^+DyW5TGfmLUU@4QG+c^0c z#zg&+`J#c@0((YV&ur`*Iawk7JMET#>EkfEJtz9cD4oNF6e!0Aw?I&|=qKwHAy9XoQ zA^YBJr@&gw)O7(`yrYQGx{Yirh2eMScnk9(q^&}_PQ*$`FTOgh0*()5P;Djfw78dp Z{0&Uoz&aZx@__&V002ovPDHLkV1iM?Q(XW6 diff --git a/ext/mixed/img/play-audio.png b/ext/mixed/img/play-audio.png deleted file mode 100644 index 6056d234a9818d248987389d4a621e5c83ce0851..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 610 zcmV-o0-gPdP)FDRfPcVFW5d%9V=z{?A#;oriL5xO+n6O2X~nf!lQuE^VWXpgu83qI(qCF{ zS}dqc=wWy-JjhR6YYDxINHb)T^nMSh)vA20R`F7)lzCSCZF94My}d73T>N+m zpyXWPL`#FF;s+j3t(LL2R!6+EP98p9G9EaJe<5S)o@#CPu0JyV*YBbiNC<>y{C`3_2 zFc^fUC0P=`0GC2D0rmxry!i<{eh#|t2UjSV*w|QyY37m5W)KQZKoA6m%^;bK|K7sb zq~^Y!1U(%y>Cs5W^^bz?JUQeR7IK)M&$43OYdMwDJVcVBtSjl_Ar8Hmr2)a$eK-tv zNC4d)(7D`Piq~gVUR7m2k$BH5O6=$i%I6Kpa_sVNy!&j)9UKPT@*VWNNNm+UIUciF wPJ00!a`S;oH}3WS@hUTDnx*^y9@F3E2OYGed{u8eJ^%m!07*qoM6N<$f+a~A3jhEB diff --git a/ext/mixed/img/source-term.png b/ext/mixed/img/source-term.png deleted file mode 100644 index 2e53c6980f00026b22e0d3710edf048e021b4da5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 680 zcmV;Z0$2TsP)r3gZ6sTvbKG`S=Qf*6}Nf4;Z7Z{zN!O--ANbYb~sXZM@=W_MPrR;$>|(APVL z9?v<)29FSdeXBlhS+G{-_{fQm(s$|pt3F04wDk%Eai0K>nDfCMZg4J%Tm>-+#q|66 z8(eUXMZynJwbm5eoE>%wcnw@1t#WGynhm$k?XL&soFn!ri`4f$cVy<%2mLsExU->z zZx*xss|zVtj$|^aY{nS+ySuS>yS}Tnbt?kCHpJucS_vZi7oW4eS02jdvmho#X{ij; zASmWb3g!Cg&?GXM48q|syk4&gstfW5ufx~d(b5UV8T>6lg%x6ea*97xpv5pT@eDFq zp-_Nnno3HNxizp%!hp9l*G6j*sWM<7rm?Hgq>7h^v`h)1B=y2@X=W?ZT z$YtMx?9VKI<#P?vWl4;(2C}r%>Gaw&UVVOfffyvn3OyrEa&l~WX&F&m?+<#OqiY~^j9wuSWM=zzA_@B9}<+jo_mWWEvr O0000YeaZ-G+53gSTz{SPWVdFiPaPX+$~@n)fi9>qgJ zh4fN-QcEhq^wI<|vImjml9)pF*W2zl+qWbTPaSyKyqWKt`DS)j3xa?yVgf%ewhl|m zA$_0x^Rx4E@d&=>uRoSN*Cm&aL#`7&zr0;L(pKMn1G#$ZszFkMC^?B8f`0w&-UD$u zd-(?iK6#!;xZ`>J^A9DGiTfguewDOKwDEKoL}`ZE_M}0=xvsgf$usmJeV$oo28d0#yu!pdgpag$giC zhlKP!CMX3wsPMGgZ5n>Xg+hV--ENofAcH61#0B7Hvl-7Il}g2A6;lfG`FxbX8A>p$ z0P;GW4il9Mr9jO9)xB^Rgy%*CSTdQ6D;kDDnM{U{5Q21FA4#ZM71$_Dba8z<-Y_Na zS@|v#c0PZNDux9AoXD-ZoWP~q)7QrC`G