Files
hakyll-coflat/assets/css/default.css

375 lines
5.7 KiB
CSS
Raw Normal View History

2026-04-07 23:22:48 +08:00
:root {
--color-text: black;
--color-tag1: gray;
--color-bg: white;
--color-notice: #fb4f4f;
--color-link: #0645ad;
--color-link-visited: #551a8b;
2026-04-22 13:41:53 +08:00
--layout-max-width: 1350px;
--mobile-max-width: 876px;
--content-max-width: 800px;
--toc-width: 33%;
--toc-width-no-sidenotes: 18rem;
2026-04-07 23:22:48 +08:00
}
html {
font-size: 110%;
2026-04-22 13:41:53 +08:00
scroll-behavior: smooth;
scrollbar-gutter: stable;
2026-04-07 23:22:48 +08:00
}
body {
2026-04-22 13:41:53 +08:00
font-family:
"Lato",
-apple-system,
BlinkMacSystemFont,
"PingFang SC",
"Microsoft YaHei",
sans-serif;
2026-04-07 23:22:48 +08:00
font-optical-sizing: auto;
font-size: 1rem;
2026-04-22 13:41:53 +08:00
line-height: 1.4;
2026-04-07 23:22:48 +08:00
color: var(--color-text);
background-color: var(--color-bg);
text-rendering: optimizeLegibility;
}
2026-04-22 13:41:53 +08:00
a {
color: var(--color-link);
2026-04-07 23:22:48 +08:00
text-decoration: none;
}
2026-04-22 13:41:53 +08:00
a:visited {
color: var(--color-link-visited);
}
2026-04-22 13:41:53 +08:00
a[href^="#"]:visited {
color: var(--color-link);
}
2026-04-22 13:41:53 +08:00
a:hover {
2026-04-07 23:22:48 +08:00
text-decoration: underline;
}
2026-04-22 13:41:53 +08:00
2026-04-07 23:22:48 +08:00
details {
padding-left: 1em;
border: 2px solid var(--color-text);
}
2026-04-22 13:41:53 +08:00
2026-04-07 23:22:48 +08:00
summary:hover {
cursor: pointer;
}
2026-04-22 13:41:53 +08:00
/* Math */
.htmlmathparagraph,
math,
mtext {
2026-04-07 23:22:48 +08:00
font-family: Lete Sans Math;
}
2026-04-22 13:41:53 +08:00
#math-container,
.math-container {
display: block;
overflow-x: auto;
overflow-y: hidden;
padding: 0.5em;
}
2026-04-07 23:22:48 +08:00
.equation {
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
align-items: center;
column-gap: 1em;
2026-04-22 13:41:53 +08:00
margin: 0.5em 0;
2026-04-07 23:22:48 +08:00
}
.equation .math-container {
min-width: 0;
}
.equation-number {
font-style: normal;
2026-04-22 13:41:53 +08:00
white-space: nowrap;
2026-04-07 23:22:48 +08:00
}
2026-04-22 13:41:53 +08:00
/* Text */
2026-04-07 23:22:48 +08:00
.text-space .langtag {
color: var(--color-tag1);
}
.sc {
font-variant-caps: small-caps;
}
2026-04-22 13:41:53 +08:00
.uri,
2026-04-07 23:22:48 +08:00
a.url {
2026-04-22 13:41:53 +08:00
overflow-wrap: break-word;
2026-04-07 23:22:48 +08:00
word-break: break-all;
2026-04-22 13:41:53 +08:00
white-space: normal;
2026-04-07 23:22:48 +08:00
}
2026-04-22 13:41:53 +08:00
.post-list {
list-style: none;
2026-04-07 23:22:48 +08:00
padding-left: 1em;
}
header {
margin-top: 1rem;
2026-04-22 13:41:53 +08:00
font-size: 2rem;
font-weight: 400;
line-height: 1.2;
2026-04-07 23:22:48 +08:00
}
footer {
font-size: 0.8rem;
margin-top: 2em;
padding-right: 1em;
2026-04-22 13:41:53 +08:00
text-align: right;
2026-04-07 23:22:48 +08:00
}
.pagetitle {
font-size: 2rem;
2026-04-22 13:41:53 +08:00
font-weight: 400;
line-height: 1;
2026-04-07 23:22:48 +08:00
text-align: left;
}
2026-04-22 13:41:53 +08:00
.subtitle {
font-size: 1.2rem;
margin-top: 0;
text-align: left;
}
.draft-notice {
color: var(--color-notice);
margin: 1em auto;
text-align: center;
}
h1,
h2,
h3 {
2026-04-07 23:22:48 +08:00
margin-top: 1em;
font-style: normal;
2026-04-22 13:41:53 +08:00
font-weight: 700;
}
h1 {
font-size: 1.44rem;
2026-04-07 23:22:48 +08:00
}
h2 {
font-size: 1.2rem;
}
h3 {
font-size: 1rem;
}
section.body {
margin-top: 2rem;
}
.ascii-art {
font-family: monospace;
line-height: normal;
}
2026-04-22 13:41:53 +08:00
/* Tables */
2026-04-07 23:22:48 +08:00
table {
2026-04-22 13:41:53 +08:00
border-collapse: collapse;
border: 2px solid rgb(140 140 140);
font-size: 1rem;
2026-04-07 23:22:48 +08:00
}
caption {
2026-04-22 13:41:53 +08:00
caption-side: bottom;
padding: 10px;
font-weight: 700;
2026-04-07 23:22:48 +08:00
}
thead,
tfoot {
2026-04-22 13:41:53 +08:00
background-color: rgb(228 240 245);
2026-04-07 23:22:48 +08:00
}
th,
td {
2026-04-22 13:41:53 +08:00
border: 1px solid rgb(160 160 160);
padding: 8px 10px;
2026-04-07 23:22:48 +08:00
}
td:last-of-type {
2026-04-22 13:41:53 +08:00
text-align: center;
2026-04-07 23:22:48 +08:00
}
tbody > tr:nth-of-type(even) {
2026-04-22 13:41:53 +08:00
background-color: rgb(237 238 242);
2026-04-07 23:22:48 +08:00
}
tfoot th {
2026-04-22 13:41:53 +08:00
text-align: right;
2026-04-07 23:22:48 +08:00
}
tfoot td {
2026-04-22 13:41:53 +08:00
font-weight: 700;
2026-04-07 23:22:48 +08:00
}
2026-04-22 13:41:53 +08:00
/* Media */
2026-04-07 23:22:48 +08:00
figure {
display: flex;
flex-flow: column;
max-width: 80%;
2026-04-22 13:41:53 +08:00
margin: auto;
padding: 5px;
2026-04-07 23:22:48 +08:00
}
.centerimg img {
display: block;
2026-04-22 13:41:53 +08:00
margin: 0 auto;
2026-04-07 23:22:48 +08:00
}
2026-04-22 13:41:53 +08:00
.highlight,
2026-04-07 23:22:48 +08:00
pre code {
2026-04-22 13:41:53 +08:00
display: block;
2026-04-07 23:22:48 +08:00
margin: auto;
padding: 10px;
overflow: auto;
}
code {
display: inline-block;
2026-04-22 13:41:53 +08:00
margin: 0 auto;
padding: 0 2px;
2026-04-07 23:22:48 +08:00
border-radius: 2px;
2026-04-22 13:41:53 +08:00
font-family: "IosevkaC", monospace;
2026-04-07 23:22:48 +08:00
font-variant-ligatures: none;
font-kerning: none;
text-rendering: optimizeSpeed;
}
.gallery {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 12px;
2026-04-22 13:41:53 +08:00
margin-top: 2em;
2026-04-07 23:22:48 +08:00
}
.gallery img {
2026-04-22 13:41:53 +08:00
display: block;
2026-04-07 23:22:48 +08:00
width: 100%;
max-width: 320px;
}
2026-04-22 13:41:53 +08:00
/* Layout */
.toc {
display: none;
}
2026-04-07 23:22:48 +08:00
@media (max-width: 768px) {
body {
2026-04-22 13:41:53 +08:00
max-width: var(--mobile-max-width);
2026-04-07 23:22:48 +08:00
margin: auto;
padding: 0 5%;
text-align: left;
}
2026-04-22 13:41:53 +08:00
mjx-container[display="true"] {
2026-04-07 23:22:48 +08:00
overflow-x: auto;
overflow-y: hidden;
}
}
@media (min-width: 769px) {
body {
2026-04-22 13:41:53 +08:00
display: flex;
2026-04-07 23:22:48 +08:00
flex-flow: row wrap;
width: 95%;
2026-04-22 13:41:53 +08:00
max-width: var(--layout-max-width);
2026-04-07 23:22:48 +08:00
margin: auto;
2026-04-22 13:41:53 +08:00
padding-right: 5%;
2026-04-07 23:22:48 +08:00
}
.toc {
2026-04-22 13:41:53 +08:00
display: block;
width: var(--toc-width);
2026-04-07 23:22:48 +08:00
margin-top: 5rem;
}
2026-04-22 13:41:53 +08:00
#contents ul,
#contents-big ul {
list-style: none;
margin: 0.5em 0;
2026-04-07 23:22:48 +08:00
padding-left: 1em;
line-height: 1.2;
}
2026-04-22 13:41:53 +08:00
#contents-big li + li {
margin-top: 0.5em;
2026-04-07 23:22:48 +08:00
}
2026-04-22 13:41:53 +08:00
#contents-big .toc-section-number {
margin-right: 0.2em;
}
2026-04-22 13:41:53 +08:00
#contents-big {
2026-04-07 23:22:48 +08:00
position: sticky;
top: 5rem;
2026-04-22 13:41:53 +08:00
left: 100%;
clear: both;
max-width: 60%;
margin-right: 4em;
padding-left: 1rem;
font-size: 80%;
text-align: left;
2026-04-07 23:22:48 +08:00
}
2026-04-22 13:41:53 +08:00
#contents-big .mini-header {
2026-04-07 23:22:48 +08:00
margin: 0;
font-variant: small-caps;
2026-04-22 13:41:53 +08:00
font-weight: 700;
2026-04-07 23:22:48 +08:00
}
.text-space {
width: 66%;
2026-04-22 13:41:53 +08:00
max-width: var(--content-max-width);
min-width: 0;
}
}
@media (min-width: 769px) and (max-width: 1199px) {
.toc {
flex: 0 0 var(--toc-width-no-sidenotes);
width: var(--toc-width-no-sidenotes);
}
#contents-big {
max-width: none;
margin-right: 2rem;
}
.text-space {
flex: 1 1 0;
width: auto;
max-width: none;
2026-04-07 23:22:48 +08:00
}
}
2026-04-22 13:41:53 +08:00
2026-04-07 23:22:48 +08:00
@media (min-width: 1200px) {
body {
width: 75%;
padding-right: 25%;
}
}
@media print {
.no-print,
.no-print * {
display: none !important;
}
body {
margin: auto;
}
}