AnkiNoteTemplate/templates/Japanese words/template.css
Ren Tatsumoto e7b7831bc1 update japanese words
use local mincho fonts if possible
2022-12-30 22:39:22 +03:00

304 lines
5.4 KiB
CSS

@charset "utf-8";
@font-face {
font-family: "KanjiStrokeOrders";
src: local("KanjiStrokeOrders"), url("_kso.ttf");
}
@font-face {
font-family: "Local Mincho";
src: local("Yu Mincho"), local("游明朝"), local("IPAexMincho"), local("IPAex明朝"), local("IPAMincho"), local("IPA明朝"), local("IPAPMincho"), local("IPA P明朝"), local("TakaoExMincho"), local("TakaoEx明朝"), url("_yumin.ttf");
font-weight: normal;
}
@font-face {
font-family: "Local Mincho";
src: local("Noto Serif CJK JP SemiBold"), local("Noto Serif CJK JP DemiLight"), local("Yu Mincho Demibold"), local("游明朝 Demibold"), url("_yumindb.ttf");
font-weight: 600;
}
@font-face {
font-family: "acgyosyo";
src: local("acgyosyo"), local("英椎行書"), url("_acgyosyo.ttf");
}
*,
*::before,
*::after {
box-sizing: border-box;
padding: 0;
margin: 0;
}
b,
strong {
font-weight: 600;
}
.card {
font-size: 24px;
text-align: left;
background-color: #fffaf0;
color: #2a1b0a;
max-width: 800px;
margin: 0 auto;
}
.card,
ruby rt {
font-family: "Noto Serif", "Noto Serif CJK JP", "IPAexMincho", "Yu Mincho", "Local Mincho", "Liberation Serif", "Times New Roman", Times, Georgia, Serif;
}
@media screen and (min-width: 820px) {
.card {
background-color: #e5d7c9;
display: flex;
justify-content: center;
}
.wrap {
width: 800px;
padding: 0 5px 0;
background-color: #fffaf0;
border-left: 1px solid #c9bcbc;
border-right: 1px solid #c9bcbc;
min-height: 100vh;
}
.wrap .wrap {
width: auto;
padding: 0;
min-height: 0;
border: 0;
}
}
/* links */
a {
color: #532f2f;
text-decoration: none;
}
a:hover {
color: #722a2a;
}
/* header */
header {
display: flex;
clear: both;
}
header > div:not(:last-child) {
margin-right: 3px;
}
header .tags {
border-radius: 0px 0px 3px 3px;
}
/* question */
#question {
font-family: "acgyosyo", "Noto Serif", "Noto Serif CJK JP", "IPAexMincho", "Yu Mincho", "Local Mincho", "Liberation Serif", "Times New Roman", Times, Georgia, Serif;
}
.japanese {
text-align: center;
font-size: 40px;
}
.definition,
.notes {
text-align: left;
margin: 10px 0;
line-height: 1.5;
font-weight: 300;
}
.pronunciation {
text-align: center;
margin: 8px 0;
}
.pronunciation br {
display: none;
}
hr {
margin: 2px 0;
clear: both;
border: 0;
border-top: 1px solid #c9bcbc;
}
/*
Images
Up to 3 columns, rows added automatically.
*/
.images {
margin: 10px 0;
display: grid;
justify-items: center;
align-items: start;
align-content: start;
justify-content: space-around;
gap: 5px;
grid-auto-columns: minmax(100px, 1fr);
grid-auto-rows: minmax(100px, auto);
}
.images br, .images > * {
display: none;
}
.images img {
display: block;
border-radius: 4px;
filter: sepia(33%);
max-width: 100%;
max-height: 95vh;
}
.images img:nth-child(3n+1) {
grid-column: 1;
}
.images img:nth-child(3n+2) {
grid-column: 2;
}
.images img:nth-child(3n+3) {
grid-column: 3;
}
/* Footer */
footer {
font-size: 16px;
text-align: center;
}
footer > a:after {
content: "·";
color: brown;
display: inline-block;
width: 6px;
}
footer > a:last-child:after {
content: "";
width: 0;
}
.tags {
font-family: "Noto Sans", "Noto Sans CJK JP", "Liberation Sans", Arial, Sans, IPAGothic, Yu Gothic, sans-serif;
text-align: center;
display: inline-block;
text-transform: lowercase;
background-color: #333;
color: #fffaf0;
font-weight: bold;
padding: 1px 3px;
cursor: pointer;
border-radius: 3px;
font-size: 12px;
line-height: 14px;
}
/*
AnkiDroid peplay button
.replaybutton is an <a> tag with a <span> that has an <svg> inside
*/
.replaybutton {
margin: 0;
margin-right: 3px;
text-decoration: none;
}
.replaybutton span {
padding: 0;
font-size: 16px;
}
.replaybutton span svg {
fill: #fffaf0;
background: #333;
border-radius: 3px;
vertical-align: top;
min-width: 16px;
min-height: 16px;
}
/* PC peplay button */
a.replay-button {
top: -0.125em;
position: relative;
}
a.replay-button svg {
height: 1em;
width: 1em;
}
a.replay-button svg path {
fill: #fffaf0;
}
a.replay-button svg circle {
fill: #333;
}
/* Fix for Yomichan */
ul,
ol {
list-style-type: none;
display: inline;
margin: 0px;
padding: 0px;
}
ul li + li,
ol li + li {
margin-block-start: 0.33em;
}
.pronunciation ol > li {
display: inline;
}
.pronunciation ol > li:after {
content: "・";
}
.pronunciation ol > li:last-child:after {
content: "";
}
/* Night Mode */
.nightMode.card,
.nightMode .wrap {
color: #FFFFFF;
background-color: #2F2F31;
}
.nightMode .tags {
background-color: #FFFFFF;
color: #2F2F31;
}
.nightMode a.replay-button svg path {
fill: #2F2F31;
}
.nightMode a.replay-button svg circle {
fill: #FFFFFF;
}
.nightMode .replaybutton span svg {
fill: #2F2F31;
background: #FFFFFF;
}
.nightMode a {
color: #c7493a;
}
.nightMode a:hover {
color: #a33327;
}
.nightMode .images > img {
filter: sepia(0%);
}
/* Dim furigana color on the front (if present) */
.japanese.question ruby rt {
opacity: 0.15;
transition: opacity 0.15s;
}
.japanese.question:hover ruby rt {
opacity: 1;
}