SanYeCao-blog/src/styles/global.css

198 lines
3.6 KiB
CSS
Raw Normal View History

2026-03-26 15:50:30 +00:00
@import url("https://unpkg.com/@fontsource/maple-mono@5.2.6/400.css");
@import url("https://unpkg.com/@fontsource/maple-mono@5.2.6/400-italic.css");
@import url("https://unpkg.com/@fontsource/maple-mono@5.2.6/700.css");
/* @font-face {
2026-03-24 19:32:44 +00:00
font-family: "Maple Mono";
src: url("/fonts/MapleMono-Regular.ttf.woff2") format("woff2");
font-weight: 400;
font-style: normal;
font-display: swap;
}
2026-03-24 22:28:23 +00:00
@font-face {
font-family: "Maple Mono";
src: url("/fonts/MapleMono-Italic.ttf.woff2") format("woff2");
font-weight: 400;
font-style: italic;
font-display: swap;
}
2026-03-24 19:32:44 +00:00
@font-face {
font-family: "Maple Mono";
src: url("/fonts/MapleMono-Bold.ttf.woff2") format("woff2");
font-weight: 700;
font-style: normal;
font-display: swap;
2026-03-26 15:50:30 +00:00
} */
2026-03-24 19:32:44 +00:00
2026-03-24 22:28:23 +00:00
@font-face {
font-family: "Maple Mono CN";
src: url("/fonts/subset/MapleMono-CN-Regular.woff2") format("woff2");
font-weight: 400;
font-style: normal;
font-display: swap;
}
@font-face {
font-family: "Maple Mono CN";
src: url("/fonts/subset/MapleMono-CN-Italic.woff2") format("woff2");
font-weight: 400;
font-style: italic;
font-display: swap;
}
@font-face {
font-family: "Maple Mono CN";
src: url("/fonts/subset/MapleMono-CN-Bold.woff2") format("woff2");
font-weight: 700;
font-style: normal;
font-display: swap;
}
2026-03-25 09:01:09 +00:00
@font-face {
font-family: "Recursive Mono";
src: url("/fonts/RecursiveMonoCslSt-Bold.woff2") format("woff2");
font-weight: 700;
font-style: normal;
font-display: swap;
}
@font-face {
font-family: "Recursive Mono";
src: url("/fonts/RecursiveMonoCslSt-Regular.woff2") format("woff2");
font-weight: 400;
font-style: normal;
font-display: swap;
}
@font-face {
font-family: "Recursive Mono";
src: url("/fonts/RecursiveMonoCslSt-Italic.woff2") format("woff2");
font-weight: 400;
font-style: italic;
font-display: swap;
}
2026-03-26 13:54:03 +00:00
pre {
padding: 1rem;
border-radius: 0.5rem;
overflow-x: auto;
line-height: 1.6;
margin: 1rem 0;
}
code {
font-family: "Maple Mono", monospace;
font-size: 0.92rem;
}
/* 行内代码 */
p code,
li code,
blockquote code,
td code {
padding: 0.15em 0.4em;
border-radius: 0.25rem;
background: rgba(127, 127, 127, 0.12);
}
2026-03-24 17:33:01 +00:00
html {
2026-03-24 22:28:23 +00:00
font-family: "Maple Mono", "Maple Mono CN", monospace;
background-color: #ffffff;
color: #1f2328;
2026-03-24 17:33:01 +00:00
}
body {
margin: 0 auto;
width: 100%;
2026-03-26 17:35:50 +00:00
max-width: 90ch;
2026-03-24 17:33:01 +00:00
padding: 1rem;
2026-03-24 22:28:23 +00:00
line-height: 1.7;
2026-03-24 17:33:01 +00:00
}
2026-03-28 19:17:09 +00:00
body::after {
content: "";
position: fixed;
right: 0;
bottom: 0;
width: 400px;
/* 按需调整大小 */
height: 400px;
/* 按需调整大小 */
background-image: url("https://files.seeusercontent.com/2026/03/28/Zd0m/bc7e804dc2c8ecaf407c9d665414ff72.jpg");
background-repeat: no-repeat;
background-position: right bottom;
background-size: contain;
opacity: 0.35;
pointer-events: none;
z-index: -1;
}
html.dark body::after {
background-image: url("https://files.seeusercontent.com/2026/03/28/nd1W/pasted-image-1774730083896.webp");
}
2026-03-29 09:36:07 +00:00
@media (max-width: 768px) {
body::after {
2026-03-29 20:47:01 +00:00
opacity: 0.06;
2026-03-29 09:36:07 +00:00
}
}
2026-03-24 17:33:01 +00:00
* {
box-sizing: border-box;
}
h1 {
margin: 1rem 0;
2026-03-24 22:50:33 +00:00
font-size: 1.5rem;
2026-03-24 22:28:23 +00:00
line-height: 1.2;
}
2026-03-24 22:50:33 +00:00
2026-03-24 22:28:23 +00:00
a {
color: #416bd6;
2026-03-24 22:28:23 +00:00
font-weight: 700;
text-decoration: none;
}
a:hover,
a:focus {
text-decoration: underline;
2026-03-24 18:01:45 +00:00
}
html.dark {
2026-03-24 22:28:23 +00:00
background-color: #1e1e1e;
color: #e6e6e6;
2026-03-24 18:01:45 +00:00
}
.dark .menu {
2026-03-24 22:28:23 +00:00
background-color: #2a2a2a;
color: #e6e6e6;
}
.dark .nav-links a {
color: #9ecbff;
font-weight: 700;
2026-03-24 18:01:45 +00:00
}
.dark .nav-links a:hover,
.dark .nav-links a:focus {
2026-03-24 22:28:23 +00:00
color: #c2deff;
2026-03-24 18:01:45 +00:00
}
2026-03-24 22:28:23 +00:00
.dark a {
color: #9ecbff;
font-weight: 700;
2026-03-24 18:01:45 +00:00
}
2026-03-24 22:28:23 +00:00
.dark a:hover,
.dark a:focus {
color: #c2deff;
2026-03-25 17:41:06 +00:00
}
img {
max-width: 100%;
height: auto;
display: block;
2026-03-24 17:33:01 +00:00
}