🚚 移动前端

This commit is contained in:
shufeng2012 committed 2026-08-08 19:09:36 +08:00
1 parent c8f2152d0a
commit b851a96a66
57 files changed
+214 -418

No files matched your search

+208
View File
@@ -0,0 +1,208 @@
/* ===== 移动端全屏应用布局(覆盖 theme.css 的居中卡片页默认) ===== */
html, body { height: 100%; }
body {
display: block;
padding: 0;
height: 100dvh; /* 移动端动态视口高度,规避地址栏遮挡 */
overflow: hidden;
overscroll-behavior: none; /* 禁止下拉刷新/回弹手势干扰聊天滚动 */
}
#app {
display: flex;
flex-direction: column;
height: 100dvh;
background: var(--bg);
}
/* 移动端触控优化:去点击高亮、去双击缩放延迟 */
button, textarea { -webkit-tap-highlight-color: transparent; }
button { touch-action: manipulation; }
/* ===== 顶栏 ===== */
#topbar {
display: flex;
align-items: center;
gap: 8px;
padding: 10px 12px;
padding-top: calc(10px + env(safe-area-inset-top));
background: var(--card);
border-bottom: 1px solid var(--border-light);
flex: none;
}
#topbar .title { font-size: 1rem; font-weight: 700; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#conn-status { display: flex; align-items: center; gap: 5px; font-size: 0.75rem; color: var(--fg-secondary); flex: none; }
#conn-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
#conn-status.connected .dot { background: var(--success); box-shadow: 0 0 6px var(--success); }
#conn-status.connecting .dot { background: var(--warning); }
#conn-status.disconnected .dot { background: var(--error); }
#topbar button { flex: none; padding: 0.45rem 0.8rem; font-size: 0.8rem; min-height: 36px; }
#task-toggle { background: var(--accent-soft); color: var(--accent-dark); position: relative; }
#task-badge {
display: none;
position: absolute;
top: -6px; right: -6px;
min-width: 16px; height: 16px;
border-radius: 8px;
background: var(--error);
color: #fff;
font-size: 0.62rem;
line-height: 16px;
text-align: center;
padding: 0 4px;
}
#conn-btn { background: var(--accent-soft); color: var(--accent-dark); }
#conn-btn.on { background: var(--error-bg); color: var(--error); }
/* ===== 非管理员提示条 ===== */
#admin-tip {
flex: none;
padding: 8px 12px;
font-size: 0.78rem;
background: var(--error-bg);
color: var(--error);
text-align: center;
}
/* ===== 聊天区 ===== */
#chat {
flex: 1;
overflow-y: auto;
padding: 14px 12px;
-webkit-overflow-scrolling: touch;
overscroll-behavior: contain; /* 滚动到底不连带拉动 body */
}
.msg { margin-bottom: 12px; overflow-wrap: break-word; }
.msg-user {
margin-left: 15%;
padding: 0.65rem 0.9rem;
background: var(--accent-soft);
border-radius: var(--radius-md) var(--radius-md) 4px var(--radius-md);
font-size: 0.92rem;
white-space: pre-wrap;
}
.msg-ai {
margin-right: 6%;
padding: 0.75rem 1rem;
background: var(--card);
border: 1px solid var(--border-light);
border-radius: var(--radius-md) var(--radius-md) var(--radius-md) 4px;
box-shadow: var(--shadow-sm);
font-size: 0.92rem;
line-height: 1.65;
}
.msg-ai p { margin: 0.4em 0; }
.msg-ai p:first-child { margin-top: 0; }
.msg-ai p:last-child { margin-bottom: 0; }
.msg-ai pre {
background: var(--bg);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
padding: 0.6rem;
overflow-x: auto;
font-size: 0.8rem;
}
.msg-ai code { font-size: 0.82em; background: var(--accent-soft); border-radius: 4px; padding: 0.1em 0.3em; }
.msg-ai pre code { background: none; padding: 0; }
.msg-ai a { color: var(--accent); }
.msg-ai.streaming::after {
content: '▌';
color: var(--accent);
animation: blink 0.9s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.msg-system, .msg-error { text-align: center; font-size: 0.78rem; color: var(--fg-secondary); }
.msg-error { color: var(--error); }
/* 思考区域:灰色斜体可折叠 */
.msg-reasoning {
margin-right: 6%;
border-left: 3px solid var(--border);
padding: 0.4rem 0.8rem;
font-size: 0.8rem;
color: var(--muted);
font-style: italic;
}
.reasoning-head {
display: flex;
align-items: center;
gap: 6px;
cursor: pointer;
user-select: none;
font-style: normal;
font-size: 0.75rem;
color: var(--fg-secondary);
min-height: 28px;
}
.reasoning-body { white-space: pre-wrap; margin-top: 4px; }
.reasoning-body.folded { display: none; }
/* ===== 输入栏 ===== */
#input-bar {
display: flex;
align-items: flex-end;
gap: 8px;
padding: 10px 12px;
padding-bottom: calc(10px + env(safe-area-inset-bottom));
background: var(--card);
border-top: 1px solid var(--border-light);
flex: none;
}
#input {
flex: 1;
min-height: 44px;
max-height: 120px;
resize: none;
font-size: 16px; /* iOS <16px 会聚焦自动缩放 */
line-height: 1.4;
padding: 0.65rem 0.9rem;
}
#send-btn { flex: none; min-height: 44px; background: var(--accent); color: #fff; }
#interrupt-btn { flex: none; min-height: 44px; min-width: 44px; padding: 0.45rem 0.7rem; background: var(--error-bg); color: var(--error); }
#send-btn:disabled, #interrupt-btn:disabled { opacity: 0.5; cursor: not-allowed; }
/* ===== 任务面板:抽屉式覆盖层 ===== */
#task-panel {
position: fixed;
top: 0; right: 0; bottom: 0;
width: min(85vw, 340px);
background: var(--card);
border-left: 1px solid var(--border-light);
box-shadow: var(--shadow-md);
transform: translateX(100%);
transition: transform 0.25s;
display: flex;
flex-direction: column;
z-index: 100;
padding-top: env(safe-area-inset-top);
}
#task-panel.open { transform: translateX(0); }
#task-panel header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 12px;
font-size: 0.9rem;
font-weight: 600;
border-bottom: 1px solid var(--border-light);
flex: none;
}
#task-close { background: none; border: none; font-size: 1.3rem; color: var(--fg-secondary); padding: 4px 8px; min-height: 36px; min-width: 36px; }
#task-list {
flex: 1;
overflow-y: auto;
padding: 10px 12px;
font-size: 0.78rem;
line-height: 1.6;
white-space: pre-wrap;
overflow-wrap: break-word;
color: var(--fg-secondary);
}
#backdrop {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.35);
opacity: 0;
pointer-events: none;
transition: opacity 0.25s;
z-index: 99;
}
#backdrop.show { opacity: 1; pointer-events: auto; }
+125
View File
@@ -0,0 +1,125 @@
/* auth.css — 注册/重置密码页专属美化(在 theme.css 之后加载,视觉语言与首页 index.css 对齐) */
::selection {
background: var(--accent-glow);
color: var(--fg);
}
/* ===== 页面背景:点阵底纹 + 暖色环境光(固定,不随滚动) ===== */
body::before {
content: "";
position: fixed;
inset: 0;
z-index: -1;
background-image: radial-gradient(var(--border) 1.2px, transparent 1.2px);
background-size: 26px 26px;
-webkit-mask-image: radial-gradient(ellipse 78% 68% at 50% 38%, #000 18%, transparent 72%);
mask-image: radial-gradient(ellipse 78% 68% at 50% 38%, #000 18%, transparent 72%);
pointer-events: none;
}
body::after {
content: "";
position: fixed;
left: 50%;
top: 32%;
width: 560px;
height: 560px;
transform: translate(-50%, -50%);
z-index: -1;
background: radial-gradient(circle, var(--accent-glow), transparent 62%);
opacity: 0.35;
pointer-events: none;
}
/* ===== 卡片:顶部品牌渐变条 + 加深阴影 ===== */
.card {
position: relative;
overflow: hidden;
box-shadow: 0 10px 30px rgba(74, 55, 40, 0.1);
}
.card::before {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
height: 3px;
background: linear-gradient(90deg, var(--accent), var(--accent-dark));
}
@media (prefers-color-scheme: dark) {
.card { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); }
}
/* ===== 品牌 eyebrow + 居中标题(渐变短杠,对齐首页章节标题) ===== */
.auth-eyebrow {
text-align: center;
font-size: 0.72rem;
font-weight: 700;
letter-spacing: 0.26em;
text-indent: 0.26em; /* 视觉居中补偿字距 */
color: var(--accent);
margin-bottom: 0.4rem;
}
.card h2 {
text-align: center;
}
.card h2::after {
content: "";
display: block;
width: 40px;
height: 3px;
margin: 0.55rem auto 0;
border-radius: 2px;
background: linear-gradient(90deg, var(--accent), var(--accent-dark));
opacity: 0.9;
}
/* ===== 按钮:主按钮品牌渐变 + 上浮;次按钮描边反馈 ===== */
.card input[type="submit"] {
background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
color: #fff;
box-shadow: 0 2px 10px rgba(232, 133, 58, 0.32);
transition: transform 0.18s, box-shadow 0.22s, opacity 0.15s;
}
.card input[type="submit"]:not(:disabled):hover {
opacity: 1;
transform: translateY(-1px);
box-shadow: 0 6px 18px rgba(232, 133, 58, 0.4);
}
.card input[type="submit"]:not(:disabled):active { transform: scale(0.96); }
.card input[type="button"] {
border: 1px solid var(--accent-glow);
transition: transform 0.18s, border-color 0.18s, opacity 0.15s;
}
.card input[type="button"]:not(:disabled):hover {
opacity: 1;
transform: translateY(-1px);
border-color: var(--accent);
}
.card input[type="button"]:not(:disabled):active { transform: scale(0.96); }
.card input[type="reset"] { transition: transform 0.18s, color 0.18s, border-color 0.18s, opacity 0.15s; }
.card input[type="reset"]:hover {
opacity: 1;
color: var(--accent);
border-color: var(--accent);
}
/* ===== 图形验证码:hover 描边 + 阴影 ===== */
.code-box .captcha-img {
transition: border-color 0.18s, box-shadow 0.18s;
}
.code-box .captcha-img:hover {
border-color: var(--accent);
box-shadow: var(--shadow-md);
}
/* ===== 入场动画 ===== */
@keyframes auth-in {
from { opacity: 0; transform: translateY(14px); }
to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: no-preference) {
.card { animation: auth-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both; }
}
+1
View File
@@ -0,0 +1 @@
pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#abb2bf;background:#282c34}.hljs-comment,.hljs-quote{color:#5c6370;font-style:italic}.hljs-doctag,.hljs-formula,.hljs-keyword{color:#c678dd}.hljs-deletion,.hljs-name,.hljs-section,.hljs-selector-tag,.hljs-subst{color:#e06c75}.hljs-literal{color:#56b6c2}.hljs-addition,.hljs-attribute,.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#98c379}.hljs-attr,.hljs-number,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-pseudo,.hljs-template-variable,.hljs-type,.hljs-variable{color:#d19a66}.hljs-bullet,.hljs-link,.hljs-meta,.hljs-selector-id,.hljs-symbol,.hljs-title{color:#61aeee}.hljs-built_in,.hljs-class .hljs-title,.hljs-title.class_{color:#e6c07b}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.hljs-link{text-decoration:underline}pre code.hljs{font-family: 'JetBrains Maple Mono','Fira Code','Consolas',monospace;}code{font-family: 'JetBrains Maple Mono','Fira Code','Consolas',monospace;}
+127
View File
@@ -0,0 +1,127 @@
/* dnfs.css — 树状笔记页专属美化(在 theme.css / codeblock.css 之后加载,视觉语言与首页 index.css 对齐) */
::selection {
background: var(--accent-glow);
color: var(--fg);
}
/* ===== 页面底纹:极淡点阵 + 顶部暖光,增加层次不影响阅读 ===== */
body::before {
content: "";
position: fixed;
inset: 0;
z-index: -1;
background-image: radial-gradient(var(--border) 1px, transparent 1px);
background-size: 26px 26px;
-webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 55%);
mask-image: linear-gradient(180deg, #000 0%, transparent 55%);
pointer-events: none;
}
body::after {
content: "";
position: fixed;
left: 50%;
top: -160px;
width: 720px;
height: 480px;
transform: translateX(-50%);
z-index: -1;
background: radial-gradient(ellipse, var(--accent-glow), transparent 65%);
opacity: 0.3;
pointer-events: none;
}
/* ===== 节点卡片入场:逐张淡入(JS 动态插入时播放) =====
* 防御性约定:只动画 opacity、不带 transform——祖先 transform 会成为 fixed 后代的包含块。
* 全屏特效 iframe 现已直接挂载 body(见 dnfs.js renderSpJs),不再受卡片动画影响 */
@keyframes card-in {
from { opacity: 0; }
to { opacity: 1; }
}
/* 带位移的入场仅用于不含 fixed 后代的骨架元素;
* 不含 .minimap——它自身依赖 transform: translateY(-50%) 垂直居中,动画会覆盖 */
@keyframes rise-in {
from { opacity: 0; transform: translateY(12px); }
to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: no-preference) {
.recommend-list .card { animation: card-in 0.45s ease both; }
.recommend-list .card:nth-of-type(2) { animation-delay: 0.05s; }
.recommend-list .card:nth-of-type(3) { animation-delay: 0.1s; }
.recommend-list .card:nth-of-type(4) { animation-delay: 0.15s; }
.recommend-list .card:nth-of-type(5) { animation-delay: 0.2s; }
.recommend-list .card:nth-of-type(6) { animation-delay: 0.25s; }
.recommend-list .card:nth-of-type(7) { animation-delay: 0.3s; }
.recommend-list .card:nth-of-type(n+8) { animation-delay: 0.35s; }
/* 首屏骨架元素入场 */
.searchbox, .node-form { animation: rise-in 0.4s ease both; }
.node-form { animation-delay: 0.1s; }
.userpanel, .minimap { animation: card-in 0.4s ease both; }
}
/* ===== 搜索框:hover 升温(focus 高亮由 theme.css 提供) ===== */
.searchbox:hover {
border-color: var(--border);
box-shadow: var(--shadow-md);
}
/* ===== 节点编辑卡:品牌渐变顶条 + 聚焦光环 ===== */
.node-form {
position: relative;
overflow: hidden;
}
.node-form::before {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
height: 3px;
background: linear-gradient(90deg, var(--accent), var(--accent-dark));
opacity: 0.85;
}
.node-form:focus-within {
border-color: var(--accent);
box-shadow: 0 0 0 3px var(--accent-glow), var(--shadow-md);
}
/* ===== 编辑卡按钮:提交渐变 / 重置柔色 / 删除警示 ===== */
#input-note-submit {
background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
color: #fff;
box-shadow: 0 2px 10px rgba(232, 133, 58, 0.3);
transition: transform 0.18s, box-shadow 0.22s, opacity 0.15s;
}
#input-note-submit:not(:disabled):hover {
opacity: 1;
transform: translateY(-1px);
box-shadow: 0 5px 16px rgba(232, 133, 58, 0.38);
}
#input-note-submit:not(:disabled):active { transform: scale(0.96); }
#input-note-clear {
background: var(--accent-soft);
color: var(--accent-dark);
border: 1px solid var(--accent-glow);
transition: transform 0.18s, border-color 0.18s, opacity 0.15s;
}
#input-note-clear:not(:disabled):hover {
opacity: 1;
transform: translateY(-1px);
border-color: var(--accent);
}
#input-note-clear:not(:disabled):active { transform: scale(0.96); }
#delete-note {
background: var(--error-bg);
color: var(--error);
border: 1px solid transparent;
transition: transform 0.18s, border-color 0.18s, opacity 0.15s;
}
#delete-note:not(:disabled):hover {
opacity: 1;
transform: translateY(-1px);
border-color: var(--error);
}
#delete-note:not(:disabled):active { transform: scale(0.96); }
+773
View File
@@ -0,0 +1,773 @@
/* index.css — 社区首页样式(通用主题见 theme.css)
*
* 设计原则:
* 1. 统一版心 .wrap(max-width 1024px),所有区块对齐同一内容栏
* 2. 品牌节点树 motif 贯穿 Hero / CTA / About 装饰,形成视觉呼应
* 3. 柔和的间距节奏(4.5rem 基准间距,2.25rem 组件间距)
* 4. 动效克制:入场渐显 + 品牌树描边,尊重 prefers-reduced-motion
*/
body {
align-items: stretch;
padding: 0;
}
::selection {
background: var(--accent-glow);
color: var(--fg);
}
@media (prefers-reduced-motion: no-preference) {
html { scroll-behavior: smooth; }
}
/* ===== 版心 ===== */
.wrap {
width: 100%;
max-width: 1024px;
margin: 0 auto;
padding: 0 1.25rem;
}
#main-page { width: 100%; }
/* ===== 按钮 ===== */
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 0.55rem 1.3rem;
font-size: 0.88rem;
font-weight: 600;
font-family: inherit;
border: 1px solid transparent;
border-radius: var(--radius-sm);
cursor: pointer;
text-decoration: none;
line-height: 1.4;
transition: transform 0.2s ease, background 0.2s, border-color 0.2s, box-shadow 0.25s;
}
.btn:active { transform: scale(0.96); }
.btn-primary {
position: relative;
overflow: hidden;
background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
color: #fff;
box-shadow: 0 2px 8px rgba(232, 133, 58, 0.25);
}
.btn-primary::after {
content: "";
position: absolute;
top: 0; left: -80%;
width: 50%; height: 100%;
background: linear-gradient(100deg, transparent, rgba(255,255,255,0.3), transparent);
transform: skewX(-20deg);
transition: left 0.5s ease;
pointer-events: none;
}
.btn-primary:hover {
transform: translateY(-1px);
box-shadow: 0 5px 16px rgba(232, 133, 58, 0.35);
}
.btn-primary:hover::after { left: 130%; }
.btn-ghost {
background: var(--accent-soft);
color: var(--accent-dark);
border-color: var(--accent-glow);
}
.btn-ghost:hover { border-color: var(--accent); transform: translateY(-1px); }
.btn-lg { padding: 0.72rem 1.8rem; font-size: 0.95rem; border-radius: 999px; letter-spacing: 0.02em; }
/* ===== 头部 ===== */
.header {
position: sticky;
top: 0.75rem;
z-index: 100;
margin-top: 0.75rem;
}
.header-inner {
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 0.5rem;
padding: 0.5rem 1rem;
border-radius: var(--radius-lg);
background: rgba(253, 246, 238, 0.75);
border: 1px solid var(--border-light);
backdrop-filter: blur(18px) saturate(1.5);
-webkit-backdrop-filter: blur(18px) saturate(1.5);
box-shadow: var(--shadow-sm);
transition: background 0.25s, border-color 0.25s, box-shadow 0.25s;
}
@media (prefers-color-scheme: dark) {
.header-inner {
background: rgba(30, 23, 18, 0.78);
border-color: var(--border);
}
}
.header h1 {
display: flex;
align-items: center;
gap: 0.45rem;
font-size: 1.1rem;
font-weight: 700;
letter-spacing: 0.01em;
cursor: pointer;
user-select: none;
transition: color 0.2s;
}
.header h1 svg { color: var(--accent); flex: none; }
.header h1:hover { color: var(--accent); }
.right-group {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 0.4rem;
}
#avatar {
width: 34px;
height: 34px;
border-radius: 50%;
border: 1.5px solid var(--border);
object-fit: cover;
}
#name {
font-size: 0.85rem;
max-width: 120px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* ===== Hero ===== */
.hero {
position: relative;
text-align: center;
padding: 5rem 0 6rem;
overflow: hidden;
}
/* 点阵底纹 */
.hero::before {
content: "";
position: absolute;
inset: 0;
background-image: radial-gradient(var(--border) 1px, transparent 1px);
background-size: 28px 28px;
-webkit-mask-image: radial-gradient(ellipse 65% 55% at 50% 45%, #000 20%, transparent 70%);
mask-image: radial-gradient(ellipse 65% 55% at 50% 45%, #000 20%, transparent 70%);
pointer-events: none;
opacity: 0.7;
}
/* 暖色光晕 */
.hero::after {
content: "";
position: absolute;
left: 50%; top: 44%;
width: 600px; height: 600px;
transform: translate(-50%, -50%);
background: radial-gradient(circle, var(--accent-glow), transparent 55%),
radial-gradient(ellipse 50% 35% at 50% 60%, var(--accent-soft), transparent 65%);
opacity: 0.45;
pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; }
/* 品牌树装饰 */
.hero-bg {
position: absolute;
inset: 0;
display: flex;
align-items: flex-end;
justify-content: center;
pointer-events: none;
z-index: 0;
}
.hero-tree {
width: min(700px, 92%);
height: auto;
color: var(--accent);
opacity: 0.13;
margin-bottom: -2%;
}
@media (prefers-color-scheme: dark) {
.hero-tree { opacity: 0.18; }
}
/* 徽章 */
.hero-badge {
display: inline-flex;
align-items: center;
gap: 0.45rem;
padding: 0.32rem 0.9rem;
margin-bottom: 1.5rem;
font-size: 0.78rem;
font-weight: 600;
letter-spacing: 0.06em;
color: var(--accent-dark);
background: var(--accent-soft);
border: 1px solid var(--accent-glow);
border-radius: 999px;
}
.badge-dot {
width: 6px;
height: 6px;
border-radius: 50%;
background: var(--accent);
flex: none;
}
.hero-title {
font-size: clamp(2rem, 6vw, 3rem);
font-weight: 800;
line-height: 1.3;
letter-spacing: 0.02em;
text-wrap: balance;
margin-bottom: 1rem;
}
.accent-text {
background: linear-gradient(120deg, var(--accent) 15%, var(--accent-dark) 45%, var(--accent) 85%);
background-size: 220% auto;
-webkit-background-clip: text;
background-clip: text;
color: transparent;
}
.hero-sub {
font-size: 1rem;
letter-spacing: 0.02em;
color: var(--fg-secondary);
max-width: 30rem;
margin: 0 auto;
line-height: 1.85;
}
.hero-actions {
display: flex;
justify-content: center;
flex-wrap: wrap;
gap: 0.85rem;
margin-top: 2.2rem;
}
.scroll-hint {
position: absolute;
left: 50%; bottom: 1.2rem;
transform: translateX(-50%);
z-index: 1;
display: flex;
color: var(--muted);
transition: color 0.2s;
}
.scroll-hint:hover { color: var(--accent); }
.scroll-hint svg { width: 20px; height: 20px; }
/* ===== 章节节奏与标题组 ===== */
.section { padding-top: 5rem; }
#features { scroll-margin-top: 5.5rem; }
.section-eyebrow {
text-align: center;
font-size: 0.76rem;
font-weight: 700;
letter-spacing: 0.3em;
text-indent: 0.3em;
color: var(--accent);
text-transform: uppercase;
}
.section-title {
text-align: center;
margin-top: 0.65rem;
margin-bottom: 0;
font-size: 1.5rem;
font-weight: 700;
letter-spacing: 0.02em;
}
.section-title::after {
content: "";
display: block;
width: 40px;
height: 2.5px;
margin: 0.6rem auto 0;
border-radius: 2px;
background: linear-gradient(90deg, var(--accent), var(--accent-dark));
opacity: 0.85;
}
.section-sub {
text-align: center;
margin-top: 0.85rem;
font-size: 0.92rem;
letter-spacing: 0.03em;
color: var(--fg-secondary);
}
/* ===== 特性卡片 ===== */
.features {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 1.15rem;
margin-top: 2.5rem;
}
.feature-card {
position: relative;
display: flex;
flex-direction: column;
background: var(--card);
background-image: radial-gradient(240px circle at var(--mx, 50%) var(--my, 0%), var(--accent-soft), transparent 75%);
border: 1px solid var(--border-light);
border-radius: var(--radius-lg);
padding: 1.6rem 1.4rem 1.3rem;
box-shadow: var(--shadow-sm);
overflow: hidden;
transition: transform 0.25s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
/* 顶部渐变线(hover 显现) */
.feature-card::before {
content: "";
position: absolute;
top: 0; left: 0; right: 0;
height: 2.5px;
background: linear-gradient(90deg, var(--accent), var(--accent-dark));
opacity: 0;
transition: opacity 0.3s;
}
.feature-card:hover {
transform: translateY(-4px);
border-color: var(--accent-glow);
box-shadow: 0 8px 24px rgba(74, 55, 40, 0.08);
}
.feature-card:hover::before { opacity: 0.85; }
.feature-icon {
display: flex;
align-items: center;
justify-content: center;
width: 44px;
height: 44px;
margin-bottom: 0.85rem;
border-radius: 12px;
background: linear-gradient(135deg, var(--accent-soft), rgba(232, 133, 58, 0.12));
color: var(--accent-dark);
transition: transform 0.3s, background 0.3s, color 0.3s, box-shadow 0.3s;
}
.feature-icon svg { width: 20px; height: 20px; }
.feature-card:hover .feature-icon {
background: linear-gradient(135deg, var(--accent), var(--accent-dark));
color: #fff;
transform: translateY(-2px) scale(1.05);
box-shadow: 0 5px 12px rgba(232, 133, 58, 0.3);
}
.feature-body { flex: 1; }
.feature-body h3 { margin-bottom: 0.35rem; font-size: 1rem; letter-spacing: 0.01em; }
.feature-body p {
font-size: 0.86rem;
line-height: 1.75;
color: var(--fg-secondary);
}
.feature-tag {
align-self: flex-start;
margin-top: 0.9rem;
padding: 0.2rem 0.65rem;
font-size: 0.7rem;
font-weight: 600;
letter-spacing: 0.08em;
color: var(--accent-dark);
background: var(--accent-soft);
border: 1px solid var(--accent-glow);
border-radius: 999px;
transition: color 0.25s, border-color 0.25s;
}
.feature-card:hover .feature-tag {
color: var(--accent);
border-color: var(--accent);
}
/* ===== 关于本站 ===== */
.about-section { position: relative; }
.about-panel {
position: relative;
text-align: center;
background: var(--card);
border: 1px solid var(--border-light);
border-radius: var(--radius-lg);
box-shadow: var(--shadow-sm);
padding: 2.2rem 2.2rem 1.8rem;
margin-top: 2.5rem;
overflow: hidden;
transition: border-color 0.3s, box-shadow 0.3s;
}
.about-panel:hover {
border-color: var(--border);
box-shadow: var(--shadow-md);
}
/* 顶部品牌线 */
.about-panel::before {
content: "";
position: absolute;
top: 0; left: 0; right: 0;
height: 2.5px;
background: linear-gradient(90deg, var(--accent), var(--accent-dark));
opacity: 0.8;
}
/* 装饰同心圆 */
.about-deco {
position: absolute;
right: -40px; bottom: -40px;
width: 180px; height: 180px;
color: var(--accent);
pointer-events: none;
opacity: 0.6;
}
.site-intro {
position: relative;
max-width: 38rem;
margin: 0 auto;
font-size: 0.94rem;
line-height: 2;
color: var(--fg-secondary);
}
.about-stats {
list-style: none;
display: flex;
justify-content: space-around;
gap: 1rem;
margin-top: 1.6rem;
padding-top: 1.4rem;
border-top: 1px solid var(--border-light);
}
.about-stats li {
display: flex;
flex-direction: column;
align-items: center;
gap: 0.2rem;
min-width: 0;
}
.about-stats b {
font-size: 1.4rem;
font-weight: 800;
line-height: 1.1;
letter-spacing: 0.02em;
background: linear-gradient(120deg, var(--accent), var(--accent-dark));
-webkit-background-clip: text;
background-clip: text;
color: transparent;
}
.about-stats span {
font-size: 0.76rem;
letter-spacing: 0.02em;
color: var(--muted);
}
.quick-links {
display: flex;
justify-content: center;
flex-wrap: wrap;
gap: 0.85rem;
margin-top: 1.8rem;
}
.quick-links a {
display: inline-flex;
align-items: center;
gap: 0.35rem;
padding: 0.48rem 1.1rem;
font-size: 0.84rem;
font-weight: 600;
color: var(--fg-secondary);
background: var(--card);
border: 1px solid var(--border);
border-radius: 999px;
text-decoration: none;
box-shadow: var(--shadow-sm);
transition: color 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.quick-links a::after {
content: "→";
font-size: 0.85em;
transition: transform 0.2s;
}
.quick-links a:hover {
color: var(--accent);
border-color: var(--accent);
transform: translateY(-2px);
box-shadow: var(--shadow-md);
}
.quick-links a:hover::after { transform: translateX(3px); }
/* ===== CTA 横幅 ===== */
.cta-band {
position: relative;
overflow: hidden;
text-align: center;
padding: 3.2rem 1.5rem 3.4rem;
border-radius: var(--radius-lg);
background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
color: #fff;
box-shadow: 0 12px 30px rgba(232, 133, 58, 0.22);
}
/* 底部点阵 */
.cta-band::before {
content: "";
position: absolute;
inset: 0;
background-image: radial-gradient(rgba(255,255,255,0.18) 1px, transparent 1px);
background-size: 24px 24px;
-webkit-mask-image: radial-gradient(ellipse 70% 75% at 50% 110%, #000 15%, transparent 68%);
mask-image: radial-gradient(ellipse 70% 75% at 50% 110%, #000 15%, transparent 68%);
pointer-events: none;
}
/* 顶部高光线 */
.cta-band::after {
content: "";
position: absolute;
left: 0; right: 0; top: 0;
height: 1px;
background: linear-gradient(90deg, transparent, rgba(255,255,255,0.45), transparent);
}
.cta-tree {
position: absolute;
right: -10px; bottom: -16px;
width: min(300px, 50%);
height: auto;
color: #fff;
opacity: 0.12;
pointer-events: none;
}
.cta-title {
position: relative;
font-size: clamp(1.4rem, 3.5vw, 1.85rem);
font-weight: 800;
letter-spacing: 0.03em;
margin-bottom: 0;
}
.cta-sub {
position: relative;
margin-top: 0.6rem;
font-size: 0.92rem;
letter-spacing: 0.04em;
opacity: 0.9;
}
.btn-cta {
position: relative;
margin-top: 1.5rem;
background: #fff;
color: var(--accent-dark);
box-shadow: 0 5px 14px rgba(0,0,0,0.12);
}
.btn-cta:hover {
transform: translateY(-2px);
box-shadow: 0 8px 20px rgba(0,0,0,0.16);
}
@media (prefers-color-scheme: dark) {
.cta-band {
color: #38220f;
box-shadow: 0 12px 30px rgba(0,0,0,0.4);
}
.cta-band::before {
background-image: radial-gradient(rgba(56,34,15,0.14) 1px, transparent 1px);
}
.cta-band::after {
background: linear-gradient(90deg, transparent, rgba(56,34,15,0.3), transparent);
}
.cta-tree { color: #38220f; opacity: 0.14; }
.btn-cta { background: #38220f; color: #f7ead9; }
}
/* ===== 页脚 ===== */
.footer {
width: 100%;
margin-top: auto;
padding-top: 5rem;
padding-bottom: 1.5rem;
}
.footer-inner {
display: flex;
flex-direction: column;
align-items: center;
gap: 0.8rem;
padding-top: 1.6rem;
border-top: 1px solid var(--border-light);
text-align: center;
font-size: 0.75rem;
color: var(--muted);
}
.footer-brand {
display: flex;
align-items: center;
gap: 0.45rem;
font-size: 0.92rem;
font-weight: 700;
letter-spacing: 0.02em;
color: var(--fg);
}
.footer-brand svg { color: var(--accent); }
.footer-nav {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 0.35rem 1.5rem;
}
.footer-nav a {
font-size: 0.82rem;
color: var(--fg-secondary);
text-decoration: none;
transition: color 0.15s;
}
.footer-nav a:hover { color: var(--accent); }
.footer-icp { margin-top: 0.1rem; }
.footer-icp a {
color: var(--muted);
text-decoration: none;
transition: color 0.15s;
}
.footer-icp a:hover { color: var(--accent); }
/* ===== 动画 ===== */
@keyframes fade-up {
from { opacity: 0; transform: translateY(12px); }
to { opacity: 1; transform: none; }
}
@keyframes tree-draw { to { stroke-dashoffset: 0; } }
@keyframes node-pop {
from { opacity: 0; transform: scale(0); }
to { opacity: 1; transform: scale(1); }
}
@keyframes tree-sway {
0%, 100% { transform: rotate(0deg); }
50% { transform: rotate(0.5deg); }
}
@keyframes text-shine { to { background-position: 220% center; } }
@keyframes badge-pulse {
0%, 100% { box-shadow: 0 0 0 0 var(--accent-glow); }
50% { box-shadow: 0 0 0 4px transparent; }
}
@keyframes hint-bounce {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(4px); }
}
@media (prefers-reduced-motion: no-preference) {
/* Hero 入场 */
.hero-inner > * {
animation: fade-up 0.5s ease both;
}
.hero-badge { animation-delay: 0s; }
.hero-title { animation-delay: 0.06s; }
.hero-sub { animation-delay: 0.12s; }
.hero-actions { animation-delay: 0.2s; }
.accent-text { animation: text-shine 8s linear infinite; }
.badge-dot { animation: badge-pulse 2.8s ease-in-out infinite; }
.scroll-hint svg { animation: hint-bounce 2.2s ease-in-out infinite; }
/* 品牌树描绘 */
.hero-tree {
animation: tree-sway 12s ease-in-out 3s infinite;
transform-origin: 50% 100%;
}
.tree-branches path {
stroke-dasharray: 100;
stroke-dashoffset: 100;
animation: tree-draw 0.8s ease-out forwards;
}
.tree-branches path:nth-of-type(1) { animation-delay: 0.1s; }
.tree-branches path:nth-of-type(2),
.tree-branches path:nth-of-type(3) { animation-delay: 0.6s; }
.tree-branches path:nth-of-type(n+4) { animation-delay: 1.1s; }
.tree-nodes circle {
opacity: 0;
transform-box: fill-box;
transform-origin: center;
animation: node-pop 0.4s ease-out forwards;
}
.tree-nodes circle:nth-of-type(1) { animation-delay: 0.15s; }
.tree-nodes circle:nth-of-type(2) { animation-delay: 0.7s; }
.tree-nodes circle:nth-of-type(3),
.tree-nodes circle:nth-of-type(4) { animation-delay: 1.2s; }
.tree-nodes circle:nth-of-type(n+5) { animation-delay: 1.7s; }
}
/* ===== 滚动渐显 ===== */
.reveal {
opacity: 0;
transform: translateY(16px);
transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.reveal-in { opacity: 1; transform: none; }
/* ===== 响应式 ===== */
@media (hover: none) and (pointer: coarse) {
.btn { min-height: 44px; }
.quick-links a { padding: 0.55rem 1rem; }
}
@media (max-width: 768px) {
.hero { padding: 4rem 0 4.5rem; }
.hero::after { width: 400px; height: 400px; opacity: 0.35; }
.hero-tree { opacity: 0.1; }
.section { padding-top: 4rem; }
.footer { padding-top: 4rem; }
}
@media (max-width: 640px) {
.features { grid-template-columns: 1fr; }
.feature-card:hover { transform: none; }
}
@media (max-width: 480px) {
.wrap { padding: 0 0.85rem; }
.header { top: 0.5rem; margin-top: 0.5rem; }
.header-inner { padding: 0.4rem 0.8rem; gap: 0.35rem; }
.header h1 { font-size: 0.98rem; }
.header h1 svg { display: none; }
.right-group { gap: 0.3rem; }
.right-group .btn { padding: 0.48rem 0.9rem; font-size: 0.82rem; }
#name { max-width: 72px; }
.hero { padding: 2.8rem 0 2.8rem; }
.hero::after { width: 280px; height: 280px; opacity: 0.3; }
.hero-tree { opacity: 0.08; }
.hero-badge { font-size: 0.72rem; padding: 0.28rem 0.75rem; margin-bottom: 1.1rem; }
.hero-title { margin-bottom: 0.7rem; }
.hero-sub { font-size: 0.92rem; }
.hero-sub br { display: none; }
.hero-actions {
flex-direction: column;
align-items: stretch;
gap: 0.6rem;
}
.hero-actions .btn-lg { width: 100%; padding: 0.82rem 1.4rem; }
.scroll-hint { display: none; }
.section { padding-top: 3rem; }
.section-title { font-size: 1.25rem; }
.features { margin-top: 1.8rem; gap: 0.9rem; }
.feature-card { padding: 1.3rem 1.2rem 1.1rem; }
.about-panel { padding: 1.5rem 1.2rem 1.3rem; margin-top: 1.8rem; }
.about-stats { margin-top: 1.3rem; padding-top: 1.1rem; gap: 0.5rem; }
.quick-links { gap: 0.55rem 0.7rem; margin-top: 1.4rem; }
.cta-band { padding: 2.5rem 1.1rem 2.6rem; }
.cta-tree { width: 70%; opacity: 0.08; }
.footer { padding-top: 3rem; }
}
@media (max-width: 360px) {
.header h1 { font-size: 0.92rem; }
.right-group .btn { padding: 0.42rem 0.75rem; font-size: 0.78rem; }
.hero { padding: 2.2rem 0 2.2rem; }
}
+686
View File
@@ -0,0 +1,686 @@
/* ===== Design Tokens ===== */
:root {
--bg: #fdf6ee;
--fg: #4a3728;
--fg-secondary: #8c7260;
--card: #ffffff;
--card-hover: #fff7ef;
--border: #f0e0cc;
--border-light: #f7ecdd;
--muted: #b89b7a;
--accent: #e8853a;
--accent-dark: #cf6b1f;
--accent-soft: rgba(232, 133, 58, 0.10);
--accent-glow: rgba(232, 133, 58, 0.25);
--error: #d94f3d;
--error-bg: #fef0ee;
--success: #5a9e6f;
--warning: #d4922a;
--shadow-sm: 0 1px 3px rgba(74, 55, 40, 0.06);
--shadow-md: 0 4px 12px rgba(74, 55, 40, 0.08);
--radius-sm: 10px;
--radius-md: 14px;
--radius-lg: 20px;
}
@media (prefers-color-scheme: dark) {
:root {
--bg: #1e1712;
--fg: #f0e4d8;
--fg-secondary: #a08c78;
--card: #2a2119;
--card-hover: #342a20;
--border: #3e3228;
--border-light: #342a20;
--muted: #8c7a66;
--accent: #e8934a;
--accent-dark: #f0a060;
--accent-soft: rgba(232, 147, 74, 0.12);
--accent-glow: rgba(232, 147, 74, 0.20);
--error: #e8685a;
--error-bg: #3a2220;
--success: #6fb87f;
--warning: #e0a84a;
--shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
--shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
}
}
/* ===== Base ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
background: var(--bg);
color: var(--fg);
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', Roboto, Arial, sans-serif;
padding: 2rem 1rem;
-webkit-font-smoothing: antialiased;
}
body > .card,
body > .box { margin: auto 0; }
/* ===== Layout ===== */
.box { width: 90%; max-width: 720px; }
.card {
background: var(--card);
border: 1px solid var(--border-light);
border-radius: var(--radius-lg);
padding: 1.75rem 1.5rem;
box-shadow: var(--shadow-sm);
color: var(--fg);
transition: box-shadow 0.2s, border-color 0.2s;
overflow-wrap: break-word;
width: 90%;
max-width: 440px;
}
.card:hover {
border-color: var(--border);
box-shadow: var(--shadow-md);
}
.box > .card { width: 100%; max-width: none; }
/* ===== Typography ===== */
h1 { font-size: 1.4rem; font-weight: 700; }
h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: 1.25rem; }
h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 0.5rem; }
/* ===== Form Elements ===== */
label {
display: block;
font-size: 0.85rem;
font-weight: 600;
color: var(--fg-secondary);
margin-top: 1rem;
margin-bottom: 0.3rem;
}
form > div > label:first-child { margin-top: 0; }
input:not([type="checkbox"]):not([type="submit"]):not([type="reset"]):not([type="button"]),
textarea {
display: block;
width: 100%;
padding: 0.6rem 0.9rem;
border: 1.5px solid var(--border);
border-radius: var(--radius-sm);
font-size: 0.9rem;
font-family: inherit;
background: var(--bg);
color: var(--fg);
outline: none;
transition: border-color 0.2s, box-shadow 0.2s;
}
input:not([type="checkbox"]):not([type="submit"]):not([type="reset"]):not([type="button"]):focus,
textarea:focus {
border-color: var(--accent);
box-shadow: 0 0 0 3px var(--accent-glow);
}
input::placeholder, textarea::placeholder { color: var(--muted); }
textarea { min-height: 80px; resize: vertical; }
select {
display: block;
width: 100%;
padding: 0.6rem 0.9rem;
border: 1.5px solid var(--border);
border-radius: var(--radius-sm);
font-size: 0.9rem;
font-family: inherit;
background: var(--bg);
color: var(--fg);
outline: none;
transition: border-color 0.2s, box-shadow 0.2s;
}
select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
/* ===== Buttons ===== */
button, input[type="submit"], input[type="reset"], input[type="button"] {
padding: 0.55rem 1.3rem;
font-size: 0.88rem;
font-weight: 600;
font-family: inherit;
border: none;
border-radius: var(--radius-sm);
cursor: pointer;
transition: opacity 0.15s, transform 0.1s;
line-height: 1.4;
}
button:hover, input[type="submit"]:hover,
input[type="reset"]:hover, input[type="button"]:hover { opacity: 0.85; }
button:active, input[type="submit"]:active,
input[type="reset"]:active, input[type="button"]:active { transform: scale(0.96); }
input[type="submit"] { background: var(--accent); color: #fff; }
input[type="reset"] { background: transparent; color: var(--muted); border: 1.5px solid var(--border); }
button[type="button"], input[type="button"] { background: var(--accent-soft); color: var(--accent-dark); }
#emlSub { display: inline-block; margin-top: 0.4rem; }
#emlSub input[type="submit"] {
background: var(--accent-soft);
color: var(--accent-dark);
font-size: 0.82rem;
padding: 0.45rem 1rem;
}
/* ===== Form Layout ===== */
.form-actions {
display: flex;
gap: 0.6rem;
flex-wrap: wrap;
margin-top: 1.25rem;
}
/* ===== 防重复点击:请求进行中按钮禁用态反馈 ===== */
button:disabled,
input[type="submit"]:disabled,
input[type="button"]:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.form-check {
display: flex;
align-items: center;
gap: 0.5rem;
flex-wrap: wrap;
margin-top: 1rem;
}
.form-check input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); }
.form-check label {
display: inline;
margin: 0;
font-size: 0.82rem;
font-weight: 500;
color: var(--fg-secondary);
}
/* ===== Code Box (register) ===== */
.code-box {
display: flex;
align-items: center;
gap: 0.5rem;
flex-wrap: wrap;
margin-top: 0.4rem;
font-size: 0.85rem;
color: var(--fg-secondary);
}
.code-box input[type="text"] { width: auto; flex: 1; min-width: 100px; display: inline-block; }
.code-box input[type="button"] { white-space: nowrap; }
/* 图形验证码图片(register 图形/邮箱验证码同排布局) */
.code-box .captcha-img {
width: 120px;
height: 38px;
flex: none;
cursor: pointer;
border: 1.5px solid var(--border);
border-radius: 10px;
box-sizing: border-box;
object-fit: cover;
background: var(--bg);
}
/* ===== Validation Tips ===== */
.tip-red { color: var(--error); font-size: 0.78rem; }
.tip-yellow { color: var(--warning); font-size: 0.78rem; }
.tip-green { color: var(--success); font-size: 0.78rem; }
/* ===== Article (dnfs) ===== */
.article-header { text-align: center; margin-bottom: 1.25rem; }
.article-header h1 { margin-bottom: 0.5rem; }
.article-meta { font-size: 0.82rem; color: var(--muted); margin-bottom: 0.3rem; }
.article-stats {
font-size: 0.82rem;
color: var(--muted);
display: flex;
justify-content: center;
gap: 1rem;
flex-wrap: wrap;
}
.article-stats span { font-weight: 600; color: var(--fg-secondary); }
#article-content { font-size: 0.95rem; line-height: 1.7; margin-bottom: 1.25rem; }
/* ===== Search Box (dnfs 顶部搜索) ===== */
.searchbox {
display: flex;
align-items: center;
gap: 0.5rem;
width: 100%;
padding: 0.45rem 0.55rem 0.45rem 0.9rem;
background: var(--card);
border: 1px solid var(--border-light);
border-radius: var(--radius-lg);
box-shadow: var(--shadow-sm);
margin-bottom: 1rem;
transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.searchbox:focus-within {
border-color: var(--accent);
box-shadow: 0 0 0 3px var(--accent-glow), var(--shadow-md);
}
.searchbox-icon {
width: 18px;
height: 18px;
flex: none;
color: var(--muted);
transition: color 0.2s;
}
.searchbox:focus-within .searchbox-icon {
color: var(--accent);
}
.searchbox-input {
flex: 1;
min-width: 0;
border: none !important;
background: transparent !important;
padding: 0.45rem 0.25rem !important;
font-size: 0.92rem !important;
box-shadow: none !important;
border-radius: 0 !important;
}
.searchbox-input:focus {
box-shadow: none !important;
}
.searchbox-btn {
flex: none;
padding: 0.5rem 1rem !important;
font-size: 0.85rem !important;
font-weight: 600;
background: var(--accent) !important;
color: #fff !important;
border: none !important;
border-radius: var(--radius-sm) !important;
cursor: pointer;
transition: opacity 0.15s, transform 0.1s, background 0.2s;
line-height: 1.2;
}
.searchbox-btn:hover { opacity: 0.88; }
.searchbox-btn:active { transform: scale(0.96); }
@media (max-width: 480px) {
.searchbox { padding: 0.35rem 0.4rem 0.35rem 0.75rem; gap: 0.35rem; }
.searchbox-icon { width: 16px; height: 16px; }
.searchbox-input { font-size: 0.88rem !important; }
.searchbox-btn { padding: 0.45rem 0.75rem !important; font-size: 0.82rem !important; }
}
/* ===== Recommend List (dnfs) ===== */
/* 卡片尺寸随内容自适应:宽度包裹内容(fit-content),上限为容器宽度;高度天然随内容伸缩 */
.recommend-list {
display: flex;
flex-direction: column;
align-items: center;
gap: 0.75rem;
width: 100%;
}
.recommend-list br { display: none; } /* JS 追加的 <br> 分隔符,改由 flex gap 统一控制间距 */
.recommend-list .card {
width: fit-content;
min-width: min(240px, 100%);
max-width: 100%;
margin-bottom: 0;
}
/* 防止内容中的大图撑破自适应宽度 */
.recommend-list .card img {
max-width: 100%;
height: auto;
border-radius: var(--radius-sm);
}
.recommend-list center {
padding: 0.4rem;
border-radius: var(--radius-sm);
}
/* 仅标题可点击进入子节点:手型光标 + hover 高亮集中在标题 h3 上 */
.recommend-list .card h3 {
cursor: pointer;
transition: color 0.15s;
}
.recommend-list .card h3:hover { color: var(--accent); }
.recommend-list .card p { font-size: 0.9rem; line-height: 1.6; color: var(--fg-secondary); }
/* ===== Owner Chip (dnfs 发帖用户) ===== */
.card-owner {
display: inline-flex;
align-items: center;
gap: 0.4rem;
margin-top: 0.2rem;
}
.owner-avatar {
display: inline-flex;
align-items: center;
justify-content: center;
width: 22px;
height: 22px;
border-radius: 50%;
background: var(--accent-soft);
color: var(--accent-dark);
border: 1px solid var(--accent);
font-size: 0.7rem;
font-weight: 700;
flex-shrink: 0;
user-select: none;
}
.owner-name {
font-size: 0.8rem;
font-weight: 600;
color: var(--fg-secondary);
max-width: 200px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* ===== Card Stats (dnfs 互动统计:观看/点赞/分享) ===== */
.card-stats {
display: flex;
align-items: center;
justify-content: center;
gap: 1.1rem;
margin-top: 0.45rem;
}
.stat-item {
display: inline-flex;
align-items: center;
gap: 0.3rem;
font-size: 0.78rem;
color: var(--muted);
}
.stat-item svg {
width: 14px;
height: 14px;
flex-shrink: 0;
}
.stat-num {
font-weight: 600;
color: var(--fg-secondary);
font-variant-numeric: tabular-nums;
}
/* ===== Card Actions (dnfs 编辑/删除按钮) ===== */
.card-actions {
display: flex;
justify-content: flex-end;
gap: 0.5rem;
margin-top: 0.6rem;
}
.act-btn {
display: inline-flex;
align-items: center;
gap: 0.25rem;
padding: 0.25rem 0.7rem;
font-size: 0.75rem;
font-weight: 600;
border-radius: var(--radius-sm);
border: 1px solid transparent;
background: var(--accent-soft);
color: var(--accent-dark);
cursor: pointer;
transition: border-color 0.15s, opacity 0.15s, transform 0.1s;
}
.act-btn svg { width: 12px; height: 12px; flex-shrink: 0; }
.act-btn:hover { border-color: var(--accent); }
.act-del { background: var(--error-bg); color: var(--error); }
.act-del:hover { border-color: var(--error); }
.act-move { background: transparent; color: var(--fg-secondary); border-color: var(--border); }
.act-move:hover { border-color: var(--accent); color: var(--accent-dark); }
/* ===== Move Bar (dnfs 节点移动条) ===== */
.movebar {
position: fixed;
left: 50%;
bottom: 1.25rem;
transform: translateX(-50%);
z-index: 110;
display: flex;
align-items: center;
justify-content: center;
flex-wrap: wrap;
gap: 0.5rem;
padding: 0.5rem 0.8rem;
border-radius: var(--radius-md);
background: rgba(253, 246, 238, 0.85);
border: 1px solid var(--accent);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
box-shadow: var(--shadow-md);
font-size: 0.82rem;
max-width: 92vw;
}
@media (prefers-color-scheme: dark) {
.movebar { background: rgba(30, 23, 18, 0.85); }
}
.movebar:empty { display: none; }
.move-title {
max-width: 180px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: var(--fg-secondary);
font-weight: 600;
}
/* ===== User Panel (dnfs 左上角用户信息,镜像 minimap 样式) ===== */
.userpanel {
position: fixed;
left: 1rem;
top: 4.5rem;
z-index: 100;
display: flex;
flex-direction: column;
gap: 0.4rem;
max-height: 80vh;
overflow-y: auto;
padding: 0.6rem 0.75rem;
border-radius: var(--radius-md);
background: rgba(253, 246, 238, 0.72);
border: 1px solid var(--border-light);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
box-shadow: var(--shadow-md);
transition: background 0.2s, border-color 0.2s;
}
@media (prefers-color-scheme: dark) {
.userpanel {
background: rgba(30, 23, 18, 0.72);
border-color: var(--border);
}
}
/* ===== Minimap (dnfs) ===== */
.minimap {
position: fixed;
right: 1rem;
top: 50%;
transform: translateY(-50%);
z-index: 100;
display: flex;
flex-direction: column;
gap: 0.4rem;
max-height: 80vh;
overflow-y: auto;
padding: 0.6rem 0.75rem;
border-radius: var(--radius-md);
background: rgba(253, 246, 238, 0.72);
border: 1px solid var(--border-light);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
box-shadow: var(--shadow-md);
transition: background 0.2s, border-color 0.2s;
}
@media (prefers-color-scheme: dark) {
.minimap {
background: rgba(30, 23, 18, 0.72);
border-color: var(--border);
}
}
.minimap:empty, .userpanel:empty { display: none; }
/* userpanel 纯展示项(用户名/角色):不可点击,无手型光标与 hover 变色 */
.userpanel .tag.no-hover {
cursor: default;
}
.userpanel .tag.no-hover:hover {
color: var(--fg-secondary);
background: rgba(232, 133, 58, 0.08);
border-color: transparent;
}
.minimap .tag, .userpanel .tag {
display: inline-block;
max-width: 140px;
overflow: hidden;
text-overflow: ellipsis;
padding: 0.25rem 0.6rem;
font-size: 0.78rem;
font-weight: 500;
color: var(--fg-secondary);
background: rgba(232, 133, 58, 0.08);
border: 1px solid transparent;
border-radius: var(--radius-sm);
cursor: pointer;
white-space: nowrap;
transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.minimap::-webkit-scrollbar { width: 4px; }
.minimap::-webkit-scrollbar-track { background: transparent; }
.minimap::-webkit-scrollbar-thumb {
background: var(--border);
border-radius: 4px;
}
.minimap::-webkit-scrollbar-thumb:hover { background: var(--muted); }
.minimap .tag:hover, .userpanel .tag:hover {
color: var(--accent-dark);
background: var(--accent-soft);
border-color: var(--accent);
}
.minimap .tag.back, .userpanel .tag.back {
color: var(--accent);
background: var(--accent-soft);
border-color: var(--accent);
margin-bottom: 0.25rem;
}
.minimap .tag.fold-btn, .userpanel .tag.fold-btn {
color: var(--fg-secondary);
background: transparent;
border: 1px solid var(--border);
font-weight: 600;
margin-bottom: 0.3rem;
text-align: center;
max-width: none;
cursor: pointer;
transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.minimap .tag.fold-btn:hover, .userpanel .tag.fold-btn:hover {
color: var(--accent-dark);
background: var(--accent-soft);
border-color: var(--accent);
}
/* ===== Special Nodes (dnfs,管理员发布的特殊节点) ===== */
.sp-link { display: flex; align-items: center; gap: 0.5rem; }
.sp-favicon { width: 20px; height: 20px; flex: none; border-radius: 4px; }
.sp-anchor { color: var(--accent); word-break: break-all; }
.sp-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.4rem; }
.sp-code {
max-height: 320px;
overflow: auto;
margin-top: 0.5rem;
padding: 0.75rem;
background: var(--bg);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
font-size: 0.78rem;
line-height: 1.5;
white-space: pre-wrap;
word-break: break-all;
}
.sp-image { display: block; max-width: 100%; border-radius: var(--radius-sm); }
.sp-run {
margin-top: 0.5rem;
padding: 0.75rem;
background: var(--bg);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
}
.sp-log {
margin-top: 0.5rem;
max-height: 320px;
overflow: auto;
padding: 0.5rem;
background: var(--bg);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
font-size: 0.78rem;
line-height: 1.5;
white-space: pre-wrap;
word-break: break-all;
}
.sp-note { font-size: 0.82rem; color: var(--fg-secondary); margin-top: 0.4rem; }
#sp-panel { margin-top: 0.4rem; }
#sp-panel select { margin-bottom: 0.4rem; }
#sp-file-tip { font-size: 0.78rem; }
/* ===== Node Form (dnfs) ===== */
.node-form { margin-top: 1rem; }
.node-form .form-actions { margin-top: 0.75rem; }
.node-form #input-note-title {
padding: 0.8rem 1rem;
font-size: 1rem;
}
.node-form #input-note-content {
padding: 0.9rem 1rem;
font-size: 0.95rem;
min-height: 120px;
max-height: 400px;
line-height: 1.7;
overflow-y: hidden;
resize: none;
}
/* ===== Markdown Content ===== */
code {
color: var(--error);
background: var(--error-bg);
padding: 2px 6px;
border-radius: 5px;
font-size: 0.88em;
}
/*
pre > code {
display: block;
color: #f0e4d8;
background: #3d3229;
padding: 12px;
border-radius: var(--radius-sm);
overflow-x: auto;
} */
blockquote {
margin-right: 0;
padding: 0.5rem 1rem;
background: var(--accent-soft);
border-left: 3px solid var(--accent);
border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
color: var(--fg-secondary);
}
/* ===== Footer ===== */
.footer {
margin-top: auto;
padding-top: 1.5rem;
text-align: center;
font-size: 0.75rem;
color: var(--muted);
}
.footer a {
color: var(--muted);
text-decoration: none;
transition: color 0.15s;
}
.footer a:hover { color: var(--accent); }
/* ===== Responsive ===== */
@media (max-width: 480px) {
body { padding: 1rem 0.8rem; }
.card { padding: 1.25rem 1rem; border-radius: 16px; width: 95%; }
.box { width: 95%; }
h2 { font-size: 1.1rem; }
.form-actions button, .form-actions input { flex: 1; padding: 0.5rem 0.6rem; font-size: 0.82rem; }
}
@media (max-width: 360px) {
.card { padding: 1rem 0.8rem; border-radius: var(--radius-sm); }
}
+374
View File
@@ -0,0 +1,374 @@
:root {
--bg: #fdf6ee;
--fg: #4a3728;
--fg-secondary: #8c7260;
--card: #ffffff;
--card-hover: #fff7ef;
--card-active: #ffeedd;
--border: #f0e0cc;
--border-light: #f7ecdd;
--muted: #b89b7a;
--accent: #e8853a;
--accent-dark: #cf6b1f;
--accent-soft: rgba(232, 133, 58, 0.10);
--accent-glow: rgba(232, 133, 58, 0.25);
--play: #f0a030;
--download: #e8853a;
--error: #d94f3d;
--error-bg: #fef0ee;
--icon-bg: #faf0e4;
--icon-border: #f0e0cc;
--shadow-sm: 0 1px 3px rgba(74, 55, 40, 0.06);
--shadow-md: 0 4px 12px rgba(74, 55, 40, 0.08);
--shadow-lg: 0 8px 24px rgba(74, 55, 40, 0.12);
--radius-sm: 10px;
--radius-md: 14px;
--radius-lg: 20px;
}
@media (prefers-color-scheme: dark) {
:root {
--bg: #1e1712;
--fg: #f0e4d8;
--fg-secondary: #a08c78;
--card: #2a2119;
--card-hover: #342a20;
--card-active: #3e3228;
--border: #3e3228;
--border-light: #342a20;
--muted: #8c7a66;
--accent: #e8934a;
--accent-dark: #f0a060;
--accent-soft: rgba(232, 147, 74, 0.12);
--accent-glow: rgba(232, 147, 74, 0.20);
--play: #f0a848;
--download: #e8934a;
--error: #e8685a;
--error-bg: #3a2220;
--icon-bg: #342a20;
--icon-border: #4a3c30;
--shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
--shadow-md: 0 4px 12px rgba(0,0,0,0.3);
--shadow-lg: 0 8px 24px rgba(0,0,0,0.4);
}
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', Roboto, Arial, sans-serif;
background: var(--bg);
color: var(--fg);
min-height: 100vh;
-webkit-font-smoothing: antialiased;
}
/* ===== 顶栏 ===== */
.header {
background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
color: #fff;
padding: 0 20px;
height: 54px;
position: sticky;
top: 0;
z-index: 100;
display: flex;
justify-content: space-between;
align-items: center;
box-shadow: 0 2px 12px rgba(207, 107, 31, 0.3);
}
.header h1 {
font-size: 17px;
font-weight: 600;
letter-spacing: 0.3px;
display: flex;
align-items: center;
gap: 8px;
}
.header-actions { display: flex; gap: 4px; }
.header-actions a {
color: #fff;
text-decoration: none;
width: 36px;
height: 36px;
display: flex;
align-items: center;
justify-content: center;
border-radius: var(--radius-sm);
font-size: 16px;
transition: background 0.15s;
}
.header-actions a:hover { background: rgba(255,255,255,0.18); }
.header-actions a:active { background: rgba(255,255,255,0.30); }
/* ===== 面包屑 ===== */
.breadcrumb {
padding: 10px 20px;
background: var(--card);
font-size: 13px;
overflow-x: auto;
white-space: nowrap;
border-bottom: 1px solid var(--border-light);
scrollbar-width: none;
}
.breadcrumb::-webkit-scrollbar { display: none; }
.breadcrumb a {
color: var(--accent);
text-decoration: none;
padding: 4px 10px;
border-radius: 8px;
transition: background 0.15s, color 0.15s;
font-weight: 500;
}
.breadcrumb a:hover { background: var(--accent-soft); }
.breadcrumb .sep { color: var(--muted); margin: 0 2px; font-size: 11px; }
.breadcrumb .current {
color: var(--fg);
font-weight: 600;
padding: 4px 10px;
}
/* ===== 搜索栏 ===== */
.search-box {
padding: 12px 20px;
background: var(--card);
border-bottom: 1px solid var(--border-light);
}
.search-box input {
width: 100%;
max-width: 560px;
padding: 10px 18px;
border: 1.5px solid var(--border);
border-radius: 12px;
font-size: 14px;
outline: none;
background: var(--bg);
color: var(--fg);
transition: border-color 0.2s, box-shadow 0.2s;
}
.search-box input::placeholder { color: var(--muted); }
.search-box input:focus {
border-color: var(--accent);
box-shadow: 0 0 0 3px var(--accent-glow);
}
/* ===== 统计条 ===== */
.stats {
padding: 10px 20px;
font-size: 12px;
color: var(--fg-secondary);
display: flex;
gap: 8px;
flex-wrap: wrap;
align-items: center;
}
.stats span {
padding: 4px 12px;
background: var(--card);
border-radius: 20px;
border: 1px solid var(--border-light);
box-shadow: var(--shadow-sm);
font-variant-numeric: tabular-nums;
}
/* ===== 主容器 ===== */
.container {
padding: 16px 20px 40px;
max-width: 1200px;
margin: 0 auto;
}
/* ===== 文件网格 ===== */
.file-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
gap: 14px;
}
.item {
background: var(--card);
border-radius: var(--radius-lg);
padding: 18px 14px 14px;
cursor: pointer;
border: 1px solid var(--border-light);
box-shadow: var(--shadow-sm);
transition: box-shadow 0.2s, transform 0.15s, border-color 0.2s, background 0.15s;
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
gap: 10px;
position: relative;
}
.item:hover {
box-shadow: var(--shadow-md);
transform: translateY(-2px);
border-color: var(--border);
background: var(--card-hover);
}
.item:active {
transform: translateY(0) scale(0.98);
background: var(--card-active);
}
/* 方块图标 */
.item .icon {
font-size: 34px;
width: 62px;
height: 62px;
display: flex;
align-items: center;
justify-content: center;
background: var(--icon-bg);
border-radius: var(--radius-md);
border: 1px solid var(--icon-border);
transition: transform 0.15s;
flex-shrink: 0;
}
.item:hover .icon { transform: scale(1.06); }
.item .info {
width: 100%;
display: flex;
flex-direction: column;
gap: 4px;
}
.item .name {
font-size: 13px;
font-weight: 600;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 100%;
line-height: 1.3;
}
.item .meta {
font-size: 11px;
color: var(--muted);
display: flex;
justify-content: center;
gap: 6px;
flex-wrap: wrap;
line-height: 1.4;
}
/* 操作按钮 */
.item .actions {
display: flex;
gap: 6px;
justify-content: center;
margin-top: 2px;
}
.item .actions button {
padding: 5px 14px;
font-size: 12px;
border: none;
border-radius: 10px;
cursor: pointer;
color: #fff;
font-weight: 500;
transition: opacity 0.15s, transform 0.1s;
line-height: 1.4;
}
.item .actions button:hover { opacity: 0.85; }
.item .actions button:active { transform: scale(0.93); }
.btn-play { background: var(--play); }
.btn-download { background: var(--download); }
/* ===== 加载态 ===== */
.loading {
text-align: center;
padding: 60px 20px;
color: var(--muted);
font-size: 14px;
}
.loading .spinner {
display: inline-flex;
align-items: center;
justify-content: center;
animation: spin 1.2s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
font-size: 28px;
width: 56px;
height: 56px;
background: var(--card);
border-radius: var(--radius-md);
border: 1px solid var(--border-light);
box-shadow: var(--shadow-sm);
margin-bottom: 12px;
}
@keyframes spin { 100% { transform: rotate(360deg); } }
/* ===== 空态 ===== */
.empty {
text-align: center;
padding: 80px 20px;
color: var(--muted);
font-size: 14px;
}
.empty .icon {
font-size: 44px;
display: inline-flex;
align-items: center;
justify-content: center;
width: 80px;
height: 80px;
background: var(--card);
border-radius: var(--radius-lg);
border: 1px solid var(--border-light);
box-shadow: var(--shadow-sm);
margin-bottom: 16px;
}
/* ===== 错误态 ===== */
.error {
text-align: center;
padding: 40px 24px;
color: var(--error);
background: var(--error-bg);
border-radius: var(--radius-lg);
border: 1px solid var(--error);
margin: 20px 0;
font-size: 14px;
line-height: 1.6;
}
/* ===== 页脚 ===== */
.footer {
text-align: center;
padding: 24px 20px 32px;
font-size: 12px;
color: var(--muted);
}
.footer a {
color: var(--muted);
text-decoration: none;
transition: color 0.15s;
}
.footer a:hover { color: var(--accent); }
/* ===== 响应式 ===== */
@media (max-width: 480px) {
.header { padding: 0 14px; height: 50px; }
.header h1 { font-size: 15px; }
.breadcrumb { padding: 8px 14px; }
.search-box { padding: 10px 14px; }
.stats { padding: 8px 14px; gap: 6px; }
.container { padding: 12px 14px 32px; }
.file-grid {
grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
gap: 10px;
}
.item {
padding: 14px 10px 12px;
border-radius: 16px;
gap: 8px;
}
.item .icon {
font-size: 28px;
width: 52px;
height: 52px;
border-radius: var(--radius-sm);
}
.item .name { font-size: 12px; }
.item .meta { font-size: 10px; gap: 4px; }
.item .actions button { padding: 4px 10px; font-size: 11px; border-radius: 8px; }
}