summaryrefslogtreecommitdiff
path: root/ext/bg/js/options.js
diff options
context:
space:
mode:
authorsiikamiika <siikamiika@users.noreply.github.com>2017-10-24 12:49:10 +0300
committersiikamiika <siikamiika@users.noreply.github.com>2017-10-24 12:49:10 +0300
commit8400f0e4c0d0dc8253fbf1efcd7459c218a6886c (patch)
tree4ea28b3c5080c5cd34189b65289d0aca47c64e13 /ext/bg/js/options.js
parente034ca3ad4f88282e8dfec27df5cb7c55e0a47c6 (diff)
Anki: use CSS classes for term frequency color
Diffstat (limited to 'ext/bg/js/options.js')
-rw-r--r--ext/bg/js/options.js13
1 files changed, 11 insertions, 2 deletions
diff --git a/ext/bg/js/options.js b/ext/bg/js/options.js
index 87609fcb..2cb7dbec 100644
--- a/ext/bg/js/options.js
+++ b/ext/bg/js/options.js
@@ -19,6 +19,15 @@
function optionsFieldTemplates() {
return `
+<style>
+.expression-popular {
+ color: #0275d8;
+}
+
+.expression-rare {
+ color: #999;
+}
+</style>
{{#*inline "glossary-single"}}
{{~#unless brief~}}
{{~#if definitionTags~}}<i>({{#each definitionTags}}{{name}}{{#unless @last}}, {{/unless}}{{/each}})</i> {{/if~}}
@@ -79,7 +88,7 @@ function optionsFieldTemplates() {
{{#*inline "furigana"}}
{{~#if merge~}}
{{~#each definition.expressions~}}
- <span style="color: {{#termFrequencyColor}}{{termFrequency}}{{/termFrequencyColor}}">{{~#furigana}}{{{.}}}{{/furigana~}}</span>
+ <span class="expression-{{termFrequency}}">{{~#furigana}}{{{.}}}{{/furigana~}}</span>
{{~#unless @last}}、{{/unless~}}
{{~/each~}}
{{~else~}}
@@ -90,7 +99,7 @@ function optionsFieldTemplates() {
{{#*inline "furigana-plain"}}
{{~#if merge~}}
{{~#each definition.expressions~}}
- <span style="color: {{#termFrequencyColor}}{{termFrequency}}{{/termFrequencyColor}}">{{~#furiganaPlain}}{{{.}}}{{/furiganaPlain~}}</span>
+ <span class="expression-{{termFrequency}}">{{~#furiganaPlain}}{{{.}}}{{/furiganaPlain~}}</span>
{{~#unless @last}}、{{/unless~}}
{{~/each~}}
{{~else~}}