From 803a464fb9df5160a1be1e2b1b4d42fd2bbecf2d Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sun, 1 Mar 2020 14:20:11 -0500 Subject: [PATCH] Add support for accent graph --- ext/mixed/css/display-dark.css | 13 +++++++++ ext/mixed/css/display-default.css | 13 +++++++++ ext/mixed/css/display.css | 38 ++++++++++++++++++++++++++ ext/mixed/display-templates.html | 9 ++++++- ext/mixed/js/display-generator.js | 45 +++++++++++++++++++++++++++++++ 5 files changed, 117 insertions(+), 1 deletion(-) diff --git a/ext/mixed/css/display-dark.css b/ext/mixed/css/display-dark.css index dc344099..8e5d2f51 100644 --- a/ext/mixed/css/display-dark.css +++ b/ext/mixed/css/display-dark.css @@ -78,3 +78,16 @@ h2 { border-bottom-color: #2f2f2f; } } .term-pitch-accent-character:before { border-color: #ffffff; } + +.term-pitch-accent-graph-line, +.term-pitch-accent-graph-line-tail, +#term-pitch-accent-graph-dot, +#term-pitch-accent-graph-dot-downstep, +#term-pitch-accent-graph-triangle { + stroke: #ffffff; +} + +#term-pitch-accent-graph-dot, +#term-pitch-accent-graph-dot-downstep>circle:last-of-type { + fill: #ffffff; +} diff --git a/ext/mixed/css/display-default.css b/ext/mixed/css/display-default.css index 81623ebc..893e7bc1 100644 --- a/ext/mixed/css/display-default.css +++ b/ext/mixed/css/display-default.css @@ -78,3 +78,16 @@ h2 { border-bottom-color: #eeeeee; } } .term-pitch-accent-character:before { border-color: #000000; } + +.term-pitch-accent-graph-line, +.term-pitch-accent-graph-line-tail, +#term-pitch-accent-graph-dot, +#term-pitch-accent-graph-dot-downstep, +#term-pitch-accent-graph-triangle { + stroke: #000000; +} + +#term-pitch-accent-graph-dot, +#term-pitch-accent-graph-dot-downstep>circle:last-of-type { + fill: #000000; +} diff --git a/ext/mixed/css/display.css b/ext/mixed/css/display.css index 0a1ba658..7bd82785 100644 --- a/ext/mixed/css/display.css +++ b/ext/mixed/css/display.css @@ -537,6 +537,44 @@ button.action-button { } +/* + * Pitch accent graph styles + */ + +.term-pitch-accent-graph { + display: block; + height: 1.5em; + transform: translateY(-0.875em); +} +.term-pitch-accent-graph-line, +.term-pitch-accent-graph-line-tail { + fill: none; + stroke: #000000; + stroke-width: 5; +} +.term-pitch-accent-graph-line-tail { + stroke-dasharray: 5 5; +} +#term-pitch-accent-graph-dot { + fill: #000000; + stroke: #000000; + stroke-width: 5; +} +#term-pitch-accent-graph-dot-downstep { + fill: none; + stroke: #000000; + stroke-width: 5; +} +#term-pitch-accent-graph-dot-downstep>circle:last-of-type { + fill: #000000; +} +#term-pitch-accent-graph-triangle { + fill: none; + stroke: #000000; + stroke-width: 5; +} + + /* * Kanji */ diff --git a/ext/mixed/display-templates.html b/ext/mixed/display-templates.html index c6f208a8..e2f55c22 100644 --- a/ext/mixed/display-templates.html +++ b/ext/mixed/display-templates.html @@ -37,9 +37,16 @@ + - +