style: 全站改造为 Editorial 编辑杂志风

- 设计令牌:暖米 #F9F8F6 纸面 × 柔和黑 #1C1C1C,透明度分层 /60 /40 /10,纯单色
- 圆角归零、阴影清零、渐变清除;删除渐变光斑背景层 Background.astro
- 字体:Playfair Display + Noto Serif SC 衬线标题(weight 400)+ Noto Sans SC 正文
- 首页巨型衬线刊名 + 日期线 + 最新发布索引卡;Section 自动编号
- 文章页改刊头式标题区;归档改衬线年号 + 目录行;卡片去渐变封面改纯排版
- 交互:hover 细线下划线、标题转斜体、油墨反转,prefers-reduced-motion 降级保留
- 文件处理逻辑 / 文章内容 / deploy 上传脚本未改动
- 附:新增 LLM 系列笔记与配图、Artalk 部署配置、评论组件入库
This commit is contained in:
2026-08-27 22:52:39 +08:00
parent 6725a02592
commit 5f1c21b6bf
49 changed files with 4471 additions and 909 deletions
+68 -72
View File
@@ -8,24 +8,24 @@ const total = all.length;
---
<BaseLayout title="归档" description="按时间线浏览所有文章">
<section class="container" style="padding-top: calc(var(--nav-h) + 48px);">
<section class="container" style="padding-top: calc(var(--nav-h) + clamp(48px, 8vw, 96px)); padding-bottom: clamp(64px, 8vw, 120px);">
<header class="page-head reveal">
<h1 class="page-title">归档</h1>
<p class="page-sub">共 {total} 篇 · 时光轴回顾</p>
<p class="page-sub">共 {total} 篇 · 按年份装订</p>
</header>
<div class="timeline">
{years.map(({ year, posts }) => (
<section class="year-group reveal">
<div class="year-node glass">
<header class="year-head">
<span class="year-num">{year}</span>
<span class="year-rule" aria-hidden="true"></span>
<span class="year-count">{posts.length} 篇</span>
</div>
</header>
<div class="year-items">
{posts.map((p) => (
<a href={`/posts/${p.id}`} class="tl-item">
<span class="tl-date">{formatDateShort(p.data.date)}</span>
<span class="tl-dot"></span>
<span class="tl-title">{p.data.title}</span>
{p.data.tags[0] && <span class="chip">{p.data.tags[0]}</span>}
</a>
@@ -38,86 +38,82 @@ const total = all.length;
</BaseLayout>
<style>
.page-head { margin-bottom: 32px; }
.page-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(2rem, 1rem + 4vw, 3rem); letter-spacing: -0.03em; color: var(--ink); }
.page-sub { color: var(--ink-soft); margin-top: 8px; }
.page-head { margin-bottom: clamp(36px, 5vw, 56px); }
.page-title {
font-family: var(--font-display);
font-weight: 400;
font-size: clamp(2.5rem, 1rem + 5vw, 4.5rem);
letter-spacing: -0.03em;
line-height: 1.05;
color: var(--ink);
}
.page-sub { color: var(--ink-60); margin-top: 14px; font-size: 0.9rem; letter-spacing: 0.05em; }
.timeline { position: relative; padding-left: 8px; }
.timeline::before {
content: '';
position: absolute;
left: 88px;
top: 0;
bottom: 0;
width: 2px;
background: linear-gradient(180deg, var(--blue-300), var(--cyan-300), transparent);
/* 年份:巨型衬线年号 + 细线延伸 */
.year-group { margin-bottom: clamp(40px, 6vw, 72px); }
.year-head {
display: flex;
align-items: baseline;
gap: 20px;
margin-bottom: 8px;
}
.year-group { margin-bottom: clamp(28px, 4vw, 44px); }
.year-node {
display: inline-flex;
align-items: center;
gap: 10px;
border-radius: 999px;
padding: 6px 18px;
margin-bottom: 18px;
margin-left: 56px;
position: relative;
z-index: 1;
.year-num {
font-family: var(--font-display);
font-weight: 400;
font-size: clamp(2rem, 1rem + 3vw, 3.25rem);
letter-spacing: -0.02em;
line-height: 1;
color: var(--ink);
}
.year-node::before {
content: '';
position: absolute;
left: -28px;
top: 50%;
transform: translateY(-50%);
width: 14px; height: 14px;
border-radius: 50%;
background: var(--blue-500);
box-shadow: 0 0 0 4px rgba(132, 194, 255, 0.4), 0 0 14px var(--blue-400);
.year-rule { flex: 1; height: 1px; background: var(--line); align-self: center; }
.year-count {
font-size: 0.72rem;
letter-spacing: 0.2em;
text-transform: uppercase;
color: var(--ink-40);
white-space: nowrap;
}
.year-num { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; color: var(--blue-600); }
.year-count { color: var(--ink-faint); font-size: 0.82rem; }
.year-items { display: flex; flex-direction: column; gap: 4px; padding-left: 56px; }
/* 条目:期刊目录行,细线分隔 */
.year-items { display: flex; flex-direction: column; }
.tl-item {
display: flex;
align-items: center;
gap: 14px;
padding: 10px 14px;
border-radius: 12px;
transition: background 0.2s, transform 0.2s;
position: relative;
gap: 18px;
padding: 15px 10px;
border-bottom: 1px solid var(--line);
transition: background-color 0.3s, padding-left 0.3s;
}
.tl-item::before {
content: '';
position: absolute;
left: -24px;
top: 50%;
transform: translate(-50%, -50%);
width: 8px; height: 8px;
border-radius: 50%;
background: var(--blue-300);
border: 2px solid #fff;
box-shadow: 0 0 0 1px rgba(79, 163, 255, 0.3);
transition: all 0.2s;
.tl-item:first-child { border-top: 1px solid var(--line); }
.tl-item:hover { background: rgba(28, 28, 28, 0.02); }
.tl-date {
font-family: var(--font-mono);
font-size: 0.74rem;
letter-spacing: 0.08em;
color: var(--ink-40);
width: 88px;
flex-shrink: 0;
}
.tl-item:hover { background: rgba(132, 194, 255, 0.14); transform: translateX(4px); }
.tl-item:hover::before { background: var(--blue-500); box-shadow: 0 0 0 1px var(--blue-400), 0 0 10px var(--blue-400); }
.tl-date { font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-faint); width: 84px; flex-shrink: 0; }
.tl-dot { display: none; }
.tl-title { color: var(--ink); font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-item:hover .tl-title { color: var(--blue-600); }
.tl-item .chip { margin-left: auto; }
.tl-title {
font-family: var(--font-display);
font-weight: 400;
font-size: 1.05rem;
letter-spacing: -0.01em;
color: var(--ink);
flex: 1;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
transition: all 0.5s;
}
.tl-item:hover .tl-title { font-style: italic; }
.tl-item .chip { margin-left: auto; flex-shrink: 0; }
@media (max-width: 640px) {
.timeline::before { left: 20px; }
.year-node { margin-left: 0; }
.year-node::before { left: -16px; }
.year-items { padding-left: 0; }
.tl-item::before { left: -16px; }
.tl-item { flex-wrap: wrap; gap: 8px; }
.tl-item { flex-wrap: wrap; gap: 8px 14px; }
.tl-date { width: auto; }
.tl-item .chip { margin-left: 0; }
.tl-title { white-space: normal; }
.tl-item .chip { margin-left: 0; }
}
</style>