AnkiNoteTemplate/templates/Japanese sentences/template.css
2023-05-18 20:05:25 +03:00

561 lines
8.7 KiB
CSS

@charset "utf-8";
@font-face {
font-family: "KanjiStrokeOrders";
src:
local("KanjiStrokeOrders"),
url("_kso.woff2") format("woff2");
}
@font-face {
font-family: "Local Mincho";
src:
local("Yu Mincho"),
local("游明朝"),
local("Noto Serif CJK JP"),
local("IPAexMincho"),
local("IPAex明朝"),
local("IPAMincho"),
local("IPA明朝"),
local("IPAPMincho"),
local("IPA P明朝"),
local("TakaoExMincho"),
local("TakaoEx明朝"),
url("_yumin.woff2") format("woff2");
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.woff2") format("woff2");
font-weight: 600;
}
*,
*::before,
*::after {
box-sizing: border-box;
padding: 0;
margin: 0;
}
b,
strong {
font-weight: 600;
}
.jpsentence b,
.jpsentence strong {
color: #f026cb;
}
.card {
background-color: #fffaf0;
color: #2a1b0a;
font-family:
"Noto Serif",
"Noto Serif CJK JP",
"IPAexMincho",
"Yu Mincho",
"Local Mincho",
"Liberation Serif",
"Times New Roman",
Times,
Georgia,
Serif;
font-size: 24px;
text-align: left;
line-height: 1.4;
margin: 0 auto;
}
.card1 {
color: inherit;
}
.card2 .jpsentence ruby rt {
opacity: 0;
}
.card2 .jpsentence:hover ruby rt {
opacity: 1;
}
@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;
}
}
hr {
margin: 8px 0;
clear: both;
border: 0;
border-top: 1px solid #c9bcbc;
}
/* links */
a {
color: #532f2f;
}
a:hover {
color: #722a2a;
}
a.hint {
text-decoration: none;
text-align: center;
display: block;
}
/* Hide furigana on front */
nokana ruby rt {
opacity: 0;
font-size: 0;
display: none;
}
notext b,
notext strong {
background-color: black;
color: transparent;
}
/* Top */
header {
display: flex;
clear: both;
margin: 0 0 8px;
}
header .tags {
border-radius: 0px 0px 3px 3px;
}
header>div:not(:last-child) {
margin-right: 3px;
}
/* Space between elements */
.sent-center {
display: flex;
align-items: center;
justify-content: center;
flex-flow: column nowrap;
}
/* Japanese sentence */
.jpsentence {
font-size: 35px;
}
.jpsentence b {
display: inline-block;
}
/* Hide front side when the back is shown. */
.fside .jpsentence,
.fside .images {
display: none;
}
/* English */
div.ensentence>a.hint {
color: #555;
font-size: 14px;
display: block;
border: 1px solid #ccc;
border-radius: 2.2px;
padding: 2px 10px;
margin: 4px 0;
}
div.ensentence>a.hint:hover {
color: #111;
background-color: rgba(0, 0, 0, 0.03);
}
/* Definition */
.definitions,
.notes {
font-weight: 300;
}
/* Tags */
.pitch_number,
.tags {
font-family:
"Noto Sans",
"Droid Sans",
"DejaVu Sans",
"Liberation Sans",
Roboto,
Cantarell,
"Segoe UI",
Arial,
Meiryo,
Oxygen,
Ubuntu,
"Helvetica Neue",
Helvetica,
"Noto Color Emoji",
"Noto Sans CJK JP",
Sans,
sans-serif;
text-align: center;
display: inline-block;
text-transform: lowercase;
background-color: #333;
color: #fffaf0;
font-weight: bold;
padding: 1px 3px;
margin: 0;
cursor: pointer;
border-radius: 3px;
font-size: 12px;
line-height: 14px;
user-select: none;
}
/* AnkiDroid replay button */
/* a.replaybutton > span > svg */
.replaybutton {
margin: 0;
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 replay button */
/* a.replay-button > svg */
a.replay-button {
top: -0.125em;
position: relative;
margin: 0;
user-select: none;
cursor: pointer;
}
a.replay-button svg {
height: 1em;
width: 1em;
user-select: none;
}
a.replay-button svg path {
fill: #fffaf0;
}
a.replay-button svg circle {
fill: #333;
}
/* Footer and links */
footer {
font-size: 16px;
word-break: keep-all;
text-align: center;
display: flex;
flex-flow: row wrap;
justify-content: center;
align-items: center;
}
footer>a {
text-decoration: none;
cursor: pointer;
}
footer>a:not(:last-child)::after {
content: "·";
color: brown;
display: inline-block;
padding: 0 2px;
}
/* Vocab */
.vocab {
display: flex;
flex-flow: row wrap;
margin-top: 16px;
align-items: center;
gap: 5px;
}
.vocab>.reading,
.vocab>.target_word {
word-break: keep-all;
}
.vocab>.target_word::before {
content: "【";
}
.vocab>.target_word::after {
content: "】";
}
.vocab div {
display: inline-block;
}
.vocab br {
display: none;
}
.vocab .pitch_number,
.vocab .tags {
align-self: flex-start;
vertical-align: top;
}
.notes .tags {
vertical-align: bottom;
}
/* Images */
.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);
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.images br,
.images> :not(img) {
display: none;
visibility: hidden;
}
.images img {
display: block;
border-radius: 4px;
filter: sepia(33%);
max-height: 95vh;
width: 100%;
object-fit: contain;
}
.images img:only-of-type {
width: auto;
}
/* Images on front, toggled by JavaScript if "imageonfront" tag is set. */
.images.on-front {
display: none;
}
/* Production cards */
.production b,
.production strong {
visibility: hidden;
}
.strokeorder {
text-align: center;
font-size: 150px;
font-family: KanjiStrokeOrders;
}
/* Morphman coloring */
.fside .jpsentence:hover [mtype="unknown"] {
background-color: #ffff99;
}
.fside .jpsentence:hover [mtype="seen"] {
background-color: #ffd1b3;
}
.fside .jpsentence:hover [mtype="known"] {
background-color: #b3e6cc;
}
.fside .jpsentence:hover [mtype="mature"] {
background-color: transparent;
}
.fside .jpsentence:hover [priority="true"] {
color: inherit;
}
.fside .jpsentence:hover [frequency="true"] {
color: inherit;
}
del.MorphManHide,
del.morphmanhide {
display: none;
}
/* Fix for Yomichan defs */
ul,
ol {
list-style-type: none;
display: inline;
margin: 0px;
padding: 0px;
}
/* Fix for Yomichan pitch accents */
.vocab ol>li {
display: inline;
}
.vocab ol>li:after {
content: "・";
}
.vocab ol>li:last-child:after {
content: "";
}
/* Night Mode */
.nightMode.card {
background-color: #2f2f31;
}
.nightMode .wrap {
color: #ffffff;
background-color: inherit;
}
.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 .jpsentence b,
.nightMode .jpsentence strong {
color: gray;
}
.nightMode .images>img {
filter: sepia(0%);
}
.nightMode div.ensentence>a.hint {
color: #ffffff;
border: 1px solid #ffffff;
}
.nightMode div.ensentence>a.hint:hover {
color: gray;
background-color: rgba(0, 0, 0, 0.2);
}
/* Fix: Don't select furigana */
ruby rt {
user-select: none;
}
.jpsentence {
position: relative;
}
.jpsentence>.overlay {
position: absolute;
/* Some versions of Anki don't understand inset. */
top: 0;
right: 0;
bottom: 0;
left: 0;
}
.jpsentence>.background,
.jpsentence>.overlay ruby rt {
visibility: hidden;
}
.jpsentence>.background ruby rt {
visibility: visible;
}
/* Outline editable fields */
div[contenteditable="true"] {
background-color: white;
border: 1px solid gray;
padding: 3px;
box-shadow: 10px 5px 5px gray;
}