templates: cyphar: update styling to be nicer on the eyes
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
This commit is contained in:
parent
8a1437772f
commit
317a5a9828
|
@ -60,40 +60,38 @@
|
|||
|
||||
<script>
|
||||
/*
|
||||
Paints the question word according to its Pitch Accent number.
|
||||
blue for 平板
|
||||
red for 頭高
|
||||
orange for 中高
|
||||
green for 尾高
|
||||
* Paints the question word according to its Pitch Accent number.
|
||||
* - blue for 平板
|
||||
* - red for 頭高
|
||||
* - orange for 中高
|
||||
* - green for 尾高
|
||||
*/
|
||||
|
||||
function markPitch() {
|
||||
var pitchNumber = document.getElementById("pitchnum_hidden");
|
||||
if (pitchNumber === null) {
|
||||
let pitchNumber = document.getElementById("pitchnum_hidden");
|
||||
if (pitchNumber === null)
|
||||
return;
|
||||
} else {
|
||||
else
|
||||
pitchNumber = pitchNumber.innerHTML.match(/\d/);
|
||||
}
|
||||
if (pitchNumber === null) {
|
||||
|
||||
if (pitchNumber === null)
|
||||
return;
|
||||
} else {
|
||||
else
|
||||
pitchNumber = Number(pitchNumber);
|
||||
}
|
||||
|
||||
/* Then decide what color to use and change font color accordingly. */
|
||||
if (pitchNumber == 0) {
|
||||
// use blue for 平板
|
||||
paintTargetWord("#3366CC");
|
||||
paintTargetWord("#59b2ff");
|
||||
} else if (pitchNumber == 1) {
|
||||
// use red for 頭高
|
||||
paintTargetWord("red");
|
||||
paintTargetWord("#ef4c4c");
|
||||
} else if (pitchNumber > 1) {
|
||||
if (odaka(pitchNumber)) {
|
||||
// use green for 尾高
|
||||
paintTargetWord("green");
|
||||
paintTargetWord("#34ff9a");
|
||||
} else {
|
||||
// use orange for 中高
|
||||
paintTargetWord("#ff6207");
|
||||
paintTargetWord("#ff9b54");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -142,7 +140,7 @@ Paints the question word according to its Pitch Accent number.
|
|||
else
|
||||
any_valid = true;
|
||||
} catch {
|
||||
// ...
|
||||
// ignore bad links
|
||||
}
|
||||
}
|
||||
if (!any_valid) {
|
||||
|
|
|
@ -6,14 +6,9 @@
|
|||
.card {
|
||||
background-color: #FFFAF0;
|
||||
color: #2A1B0A;
|
||||
font-family: "Noto Serif",
|
||||
"Noto Serif CJK JP",
|
||||
Yu Mincho,
|
||||
"Liberation Serif",
|
||||
"Times New Roman",
|
||||
Times,
|
||||
Georgia,
|
||||
Serif;
|
||||
font-family: "Noto Serif", "Noto Serif CJK JP", "Yu Mincho",
|
||||
"Liberation Serif", "Times New Roman", Times,
|
||||
Georgia, Serif;
|
||||
font-size: 24px;
|
||||
text-align: left;
|
||||
line-height: 1.4;
|
||||
|
@ -137,7 +132,6 @@ ul, ol {
|
|||
.vocab ol > li:after { content: "・"; }
|
||||
.vocab ol > li:last-child:after { content: ""; }
|
||||
|
||||
|
||||
/* Night Mode */
|
||||
|
||||
.nightMode .tags {
|
||||
|
@ -158,23 +152,10 @@ ul, ol {
|
|||
background: #FFFFFF;
|
||||
}
|
||||
|
||||
.nightMode.card {
|
||||
color: #FFFFFF;
|
||||
background-color: #2F2F31
|
||||
}
|
||||
|
||||
.nightMode a {
|
||||
color: gray;
|
||||
}
|
||||
|
||||
.nightMode a:hover {
|
||||
color: #722a2a;
|
||||
}
|
||||
|
||||
.nightMode .jpsentence b, .nightMode .jpsentence strong {
|
||||
color: gray;
|
||||
}
|
||||
|
||||
.nightMode .images > img {
|
||||
filter: sepia(0%);
|
||||
color: lightgray;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue