From 2c4983da46c076298532f6357c594d81d4676eee Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sat, 28 Mar 2020 12:31:41 -0400 Subject: [PATCH] Update styles --- ext/mixed/css/display-dark.css | 3 +++ ext/mixed/css/display-default.css | 3 +++ ext/mixed/css/display.css | 11 +++++++++++ ext/mixed/display-templates.html | 4 ++-- ext/mixed/js/display-generator.js | 2 +- 5 files changed, 20 insertions(+), 3 deletions(-) diff --git a/ext/mixed/css/display-dark.css b/ext/mixed/css/display-dark.css index 8e5d2f51..7f49ca40 100644 --- a/ext/mixed/css/display-dark.css +++ b/ext/mixed/css/display-dark.css @@ -41,6 +41,7 @@ h2 { border-bottom-color: #2f2f2f; } .tag[data-category=frequency] { background-color: #489148; } .tag[data-category=partOfSpeech] { background-color: #565656; } .tag[data-category=search] { background-color: #69696e; } +.tag[data-category=pitch-accent-dictionary] { background-color: #6640be; } .term-reasons { color: #888888; } @@ -77,6 +78,8 @@ h2 { border-bottom-color: #2f2f2f; } color: #1e1e1e; } +.term-pitch-accent-container { border-bottom-color: #2f2f2f; } + .term-pitch-accent-character:before { border-color: #ffffff; } .term-pitch-accent-graph-line, diff --git a/ext/mixed/css/display-default.css b/ext/mixed/css/display-default.css index 893e7bc1..38e1bf19 100644 --- a/ext/mixed/css/display-default.css +++ b/ext/mixed/css/display-default.css @@ -41,6 +41,7 @@ h2 { border-bottom-color: #eeeeee; } .tag[data-category=frequency] { background-color: #5cb85c; } .tag[data-category=partOfSpeech] { background-color: #565656; } .tag[data-category=search] { background-color: #8a8a91; } +.tag[data-category=pitch-accent-dictionary] { background-color: #6640be; } .term-reasons { color: #777777; } @@ -77,6 +78,8 @@ h2 { border-bottom-color: #eeeeee; } color: #ffffff; } +.term-pitch-accent-container { border-bottom-color: #eeeeee; } + .term-pitch-accent-character:before { border-color: #000000; } .term-pitch-accent-graph-line, diff --git a/ext/mixed/css/display.css b/ext/mixed/css/display.css index 1e385abb..aeb88a1a 100644 --- a/ext/mixed/css/display.css +++ b/ext/mixed/css/display.css @@ -441,6 +441,17 @@ button.action-button { * Pitch accent styles */ +.entry[data-pitch-accent-count='0'] .term-pitch-accent-container { + display: none; +} + +.term-pitch-accent-container { + border-bottom-width: 0.05714285714285714em; /* 14px * 1.25em => 1px */ + border-bottom-style: solid; + padding-bottom: 0.25em; + margin-bottom: 0.25em; +} + .term-pitch-accent-group-list { margin: 0; padding: 0; diff --git a/ext/mixed/display-templates.html b/ext/mixed/display-templates.html index e2f55c22..09f173b4 100644 --- a/ext/mixed/display-templates.html +++ b/ext/mixed/display-templates.html @@ -18,8 +18,8 @@
-

Pitch Accents

    -

    Definitions

      +
        +
          
           
          diff --git a/ext/mixed/js/display-generator.js b/ext/mixed/js/display-generator.js
          index 90361328..30c82472 100644
          --- a/ext/mixed/js/display-generator.js
          +++ b/ext/mixed/js/display-generator.js
          @@ -294,7 +294,7 @@ class DisplayGenerator {
                   node.dataset.pitchesMulti = 'true';
                   node.dataset.pitchesCount = `${dictionaryPitches.length}`;
           
          -        const tag = this.createTag({notes: '', name: dictionary, category: 'dictionary'});
          +        const tag = this.createTag({notes: '', name: dictionary, category: 'pitch-accent-dictionary'});
                   node.querySelector('.term-pitch-accent-group-tag-list').appendChild(tag);
           
                   const n = node.querySelector('.term-pitch-accent-list');