From 99f58b49f6324441c1abd010a92cd0ceb1f889ea Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Thu, 9 Apr 2020 21:56:00 -0400 Subject: Use data-expression-multi instead of data-multi --- ext/mixed/css/display.css | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'ext/mixed/css/display.css') diff --git a/ext/mixed/css/display.css b/ext/mixed/css/display.css index a4432016..ac17e2ec 100644 --- a/ext/mixed/css/display.css +++ b/ext/mixed/css/display.css @@ -298,13 +298,13 @@ button.action-button { content: "\3001"; } -.term-expression-list[data-multi=true]>.term-expression:last-of-type:after { +.entry[data-expression-multi=true] .term-expression-list>.term-expression:last-of-type:after { font-size: 2em; content: "\3000"; visibility: hidden; } -.term-expression-list[data-multi=true] .term-expression-details { +.entry[data-expression-multi=true] .term-expression-list .term-expression-details { display: inline-block; position: relative; width: 0; @@ -313,21 +313,21 @@ button.action-button { z-index: 1; } -.term-expression-list[data-multi=true] .term-expression:hover .term-expression-details { +.entry[data-expression-multi=true] .term-expression:hover .term-expression-details { visibility: visible; } -.term-expression-list[data-multi=true] .term-expression-details>.action-play-audio { +.entry[data-expression-multi=true] .term-expression-list .term-expression-details>.action-play-audio { position: absolute; left: 0; bottom: 0.5em; } -.term-expression-list:not([data-multi=true]) .term-expression-details>.action-play-audio { +.entry:not([data-expression-multi=true]) .term-expression-list .term-expression-details>.action-play-audio { display: none; } -.term-expression-list[data-multi=true] .term-expression-details>.tags { +.entry[data-expression-multi=true] .term-expression-list .term-expression-details>.tags { display: block; position: absolute; left: 0; @@ -335,7 +335,7 @@ button.action-button { white-space: nowrap; } -.term-expression-list[data-multi=true] .term-expression-details>.frequencies { +.entry[data-expression-multi=true] .term-expression-list .term-expression-details>.frequencies { display: block; position: absolute; left: 0; -- cgit v1.2.3 From bb37b74288cf0653f42bbb149e3c563adcf2ead5 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Thu, 9 Apr 2020 22:19:58 -0400 Subject: Rename "only" to "disambiguation" to match naming convention used for pitch accents --- ext/mixed/css/display.css | 10 +++++----- ext/mixed/display-templates.html | 4 ++-- ext/mixed/js/display-generator.js | 12 ++++++------ 3 files changed, 13 insertions(+), 13 deletions(-) (limited to 'ext/mixed/css/display.css') diff --git a/ext/mixed/css/display.css b/ext/mixed/css/display.css index ac17e2ec..e10c9379 100644 --- a/ext/mixed/css/display.css +++ b/ext/mixed/css/display.css @@ -365,19 +365,19 @@ button.action-button { list-style-type: circle; } -.term-definition-only-list[data-count="0"] { +.term-definition-disambiguation-list[data-count="0"] { display: none; } -.term-definition-only-list:before { +.term-definition-disambiguation-list:before { content: "("; } -.term-definition-only-list:after { +.term-definition-disambiguation-list:after { content: " only)"; } -.term-definition-only+.term-definition-only:before { +.term-definition-disambiguation+.term-definition-disambiguation:before { content: ", "; } @@ -399,7 +399,7 @@ button.action-button { } :root[data-compact-glossaries=true] .term-definition-tag-list, -:root[data-compact-glossaries=true] .term-definition-only-list:not([data-count="0"]) { +:root[data-compact-glossaries=true] .term-definition-disambiguation-list:not([data-count="0"]) { display: inline; } diff --git a/ext/mixed/display-templates.html b/ext/mixed/display-templates.html index b8d52d15..3baa8293 100644 --- a/ext/mixed/display-templates.html +++ b/ext/mixed/display-templates.html @@ -30,10 +30,10 @@ - + diff --git a/ext/mixed/js/display-generator.js b/ext/mixed/js/display-generator.js index 5c4b330d..6ae727e0 100644 --- a/ext/mixed/js/display-generator.js +++ b/ext/mixed/js/display-generator.js @@ -176,13 +176,13 @@ class DisplayGenerator { const node = this._templateHandler.instantiate('term-definition-item'); const tagListContainer = node.querySelector('.term-definition-tag-list'); - const onlyListContainer = node.querySelector('.term-definition-only-list'); + const onlyListContainer = node.querySelector('.term-definition-disambiguation-list'); const glossaryContainer = node.querySelector('.term-glossary-list'); node.dataset.dictionary = details.dictionary; this._appendMultiple(tagListContainer, this._createTag.bind(this), details.definitionTags); - this._appendMultiple(onlyListContainer, this._createTermOnly.bind(this), details.only); + this._appendMultiple(onlyListContainer, this._createTermDisambiguation.bind(this), details.only); this._appendMultiple(glossaryContainer, this._createTermGlossaryItem.bind(this), details.glossary); return node; @@ -197,10 +197,10 @@ class DisplayGenerator { return node; } - _createTermOnly(only) { - const node = this._templateHandler.instantiate('term-definition-only'); - node.dataset.only = only; - node.textContent = only; + _createTermDisambiguation(disambiguation) { + const node = this._templateHandler.instantiate('term-definition-disambiguation'); + node.dataset.term = disambiguation; + node.textContent = disambiguation; return node; } -- cgit v1.2.3