3957e36c41
- 详情页补齐原站 MDX 组件:左侧目录(2xl 固定定位、滚动高亮 top≤96、 点击平滑滚动)、标题锚点(hover #、点击复制链接 + replaceState)、 代码块(语言标签 + COPY/COPIED + 原站 prism token HTML 按行号渲染, --code-* 配色变量)、页脚 Metadata(实时视口尺寸 / 正文字符数)与 Work/Contact 按钮(sessionStorage hq:pendingScrollAnchor → 首页过渡后 滚动到对应区块,SmoothScroller 消费) - content/workArticles.ts 重新提取:内联 strong/em/code 片段、标题 id、 代码块语言 + 高亮 HTML + 纯文本(bs4 全量解析 6 篇文章) - 详情页不再显示十字网格(BackgroundGrid 按 pathname 门控,置于全部 hooks 之后避免 hook 数量变化崩溃) - 首页层叠修复:WebGL 容器改为原站的 top-0 left-0 -z-1 fixed(此前 z-auto fixed 按 CSS 绘制顺序盖住 banner 文案与作品说明文字),footer 改为原站的 z-10 relative,body 背景移至 html 根节点(否则普通流 body 背景会盖住 -z-1 场景)
138 lines
2.9 KiB
CSS
138 lines
2.9 KiB
CSS
@import "tailwindcss";
|
|
|
|
@theme {
|
|
--font-sans: var(--font-tiktok), sans-serif;
|
|
--font-mono: var(--font-mono), monospace;
|
|
--font-mono-2: var(--font-mono-2), monospace;
|
|
|
|
--color-l1: rgba(0, 0, 0, 1);
|
|
--color-l2: rgba(54, 54, 48, 0.6);
|
|
--color-l3: rgba(54, 54, 48, 0.32);
|
|
--color-line: rgba(54, 54, 48, 0.1);
|
|
--color-b1: rgb(251, 250, 244);
|
|
--color-be: #efede7;
|
|
--color-selection: #c0fe04;
|
|
}
|
|
|
|
:root {
|
|
--bg-color: rgb(251, 250, 244);
|
|
--text-color: rgba(0, 0, 0, 1);
|
|
--grid-dot: rgba(54, 54, 48, 0.1);
|
|
--selection-bg: #c0fe04;
|
|
|
|
/* Original label tokens (light theme): --label-1 = primary label,
|
|
--label-3 = tertiary label (link underline decoration color). */
|
|
--label: 0, 0, 0;
|
|
--label-d: 54, 54, 48;
|
|
--label-1: rgba(var(--label), 1);
|
|
--label-3: rgba(var(--label-d), 0.32);
|
|
|
|
/* Original code token colors (light theme, chunk 635eb04122aa774f.css) —
|
|
the MDX CodeBlock maps prism token types to these vars. */
|
|
--code-comment: rgba(var(--label-d), 0.45);
|
|
--code-string: lab(43.8263% -47.6118 18.596);
|
|
--code-number: lab(46.7992% 8.99872 72.9973);
|
|
--code-keyword: lab(43.3789% 36.2819 -73.3524);
|
|
--code-function: lab(47.3165% -8.24019 -45.3882);
|
|
--code-tag: lab(47.2741% 51.266 23.7532);
|
|
--code-operator: rgba(var(--label-d), 0.75);
|
|
}
|
|
|
|
/* Background lives on the ROOT only — per CSS painting it propagates to the
|
|
canvas backdrop, so it stays BEHIND the original's -z-1 fixed WebGL host.
|
|
A body-level background would paint as normal-flow content and cover the
|
|
scene (the text-over-canvas regression this fixes). */
|
|
html {
|
|
background-color: var(--bg-color);
|
|
}
|
|
|
|
body {
|
|
color: var(--text-color);
|
|
font-family: var(--font-sans);
|
|
margin: 0;
|
|
padding: 0;
|
|
min-height: 100vh;
|
|
-webkit-font-smoothing: antialiased;
|
|
-moz-osx-font-smoothing: grayscale;
|
|
}
|
|
|
|
::selection {
|
|
background-color: var(--selection-bg);
|
|
color: #000;
|
|
}
|
|
|
|
.no-scrollbar {
|
|
scrollbar-width: none;
|
|
-ms-overflow-style: none;
|
|
}
|
|
.no-scrollbar::-webkit-scrollbar {
|
|
display: none;
|
|
}
|
|
|
|
html, body {
|
|
scrollbar-width: none; /* Firefox */
|
|
-ms-overflow-style: none; /* IE and Edge */
|
|
}
|
|
html::-webkit-scrollbar, body::-webkit-scrollbar {
|
|
display: none; /* Chrome, Safari and Opera */
|
|
}
|
|
@keyframes vh-fade-in {
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
/* Hyper-space stagger text (original hsst-char / hsstFadeIn / hsstFadeOut). */
|
|
.hsst-char {
|
|
display: inline-block;
|
|
}
|
|
|
|
/* Passcode unlock screen (original ease-66 token + caret-blink). */
|
|
.ease-66 {
|
|
transition-timing-function: cubic-bezier(0.66, 0, 0.01, 1);
|
|
}
|
|
@keyframes caret-blink {
|
|
0%,
|
|
100% {
|
|
opacity: 1;
|
|
}
|
|
50% {
|
|
opacity: 0;
|
|
}
|
|
}
|
|
.caret-blink {
|
|
animation: caret-blink 1s step-end infinite;
|
|
}
|
|
|
|
@keyframes hsstFadeIn {
|
|
0% {
|
|
opacity: 0;
|
|
}
|
|
32% {
|
|
opacity: 0.22;
|
|
}
|
|
62% {
|
|
opacity: 0.55;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
}
|
|
@keyframes hsstFadeOut {
|
|
0% {
|
|
opacity: 1;
|
|
}
|
|
38% {
|
|
opacity: 0.62;
|
|
}
|
|
72% {
|
|
opacity: 0.28;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
}
|