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