Update search tags to always be displayed in a consistent manner (#1645)
This commit is contained in:
parent
8ee470caa0
commit
c433819c1b
@ -879,9 +879,6 @@ button.action-button[data-icon=source-term]::before {
|
|||||||
.headword-details {
|
.headword-details {
|
||||||
display: inline;
|
display: inline;
|
||||||
}
|
}
|
||||||
.headword-tag-list {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
.headword-list-details {
|
.headword-list-details {
|
||||||
display: inline;
|
display: inline;
|
||||||
}
|
}
|
||||||
@ -1103,16 +1100,6 @@ button.action-button[data-icon=source-term]::before {
|
|||||||
:root:not([data-result-output-mode=merge]) .headword-list .headword-details>.action-play-audio {
|
:root:not([data-result-output-mode=merge]) .headword-list .headword-details>.action-play-audio {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
:root[data-result-output-mode=merge] .headword-list .headword-tag-list {
|
|
||||||
display: block;
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
bottom: -0.5em;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
:root[data-result-output-mode=merge] .entry[data-type=term] .headword-list-tag-list>.tag[data-category=search] {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Definitions */
|
/* Definitions */
|
||||||
|
@ -43,7 +43,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="headword-details">
|
<div class="headword-details">
|
||||||
<button class="action-button action-play-audio" data-icon="play-audio" title="Play audio" data-title-default="Play audio" data-hotkey='["playAudio",["title","data-title-default"],"Play audio ({0})"]' data-menu-position="right below h-cover v-cover"><div class="action-button-badge icon" hidden></div></button>
|
<button class="action-button action-play-audio" data-icon="play-audio" title="Play audio" data-title-default="Play audio" data-hotkey='["playAudio",["title","data-title-default"],"Play audio ({0})"]' data-menu-position="right below h-cover v-cover"><div class="action-button-badge icon" hidden></div></button>
|
||||||
<div class="headword-tag-list tag-list"></div>
|
|
||||||
</div>
|
</div>
|
||||||
</div></template>
|
</div></template>
|
||||||
<template id="definition-item-template" data-remove-whitespace-text="true"><li class="definition-item">
|
<template id="definition-item-template" data-remove-whitespace-text="true"><li class="definition-item">
|
||||||
|
@ -238,14 +238,9 @@ class DisplayGenerator {
|
|||||||
_createTermHeadword(headword, headwordIndex, pronunciations) {
|
_createTermHeadword(headword, headwordIndex, pronunciations) {
|
||||||
const {term, reading, tags} = headword;
|
const {term, reading, tags} = headword;
|
||||||
|
|
||||||
const searchQueries = [];
|
|
||||||
if (term) { searchQueries.push(term); }
|
|
||||||
if (reading) { searchQueries.push(reading); }
|
|
||||||
|
|
||||||
const node = this._templates.instantiate('headword');
|
const node = this._templates.instantiate('headword');
|
||||||
|
|
||||||
const termContainer = node.querySelector('.headword-term');
|
const termContainer = node.querySelector('.headword-term');
|
||||||
const tagContainer = node.querySelector('.headword-tag-list');
|
|
||||||
|
|
||||||
node.dataset.readingIsSame = `${reading === term}`;
|
node.dataset.readingIsSame = `${reading === term}`;
|
||||||
node.dataset.frequency = DictionaryDataUtil.getTermFrequency(tags);
|
node.dataset.frequency = DictionaryDataUtil.getTermFrequency(tags);
|
||||||
@ -262,7 +257,6 @@ class DisplayGenerator {
|
|||||||
this._setTextContent(node.querySelector('.headword-reading'), reading);
|
this._setTextContent(node.querySelector('.headword-reading'), reading);
|
||||||
|
|
||||||
this._appendFurigana(termContainer, term, reading, this._appendKanjiLinks.bind(this));
|
this._appendFurigana(termContainer, term, reading, this._appendKanjiLinks.bind(this));
|
||||||
this._appendMultiple(tagContainer, this._createSearchTag.bind(this), searchQueries);
|
|
||||||
|
|
||||||
return node;
|
return node;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user