Files
spectra-lab/index.html
Chen Gu 414164a28d
All checks were successful
Deploy / deploy (push) Successful in 1s
feat: elevate spectra lab editorial polish
2026-04-25 17:54:36 +08:00

280 lines
20 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Spectra Lab</title>
<meta
name="description"
content="Spectra Lab — Tailwind 驱动的响应式编辑感页面,强调一致的对齐系统与克制交互。"
/>
<script>
if (location.pathname === '/spectra-lab') {
location.replace('/spectra-lab/' + location.search + location.hash);
}
</script>
<link rel="preconnect" href="https://fonts.googleapis.cn" />
<link rel="preconnect" href="https://fonts.gstatic.cn" crossorigin />
<link
href="https://fonts.googleapis.cn/css2?family=Inter:wght@400;500;600;700;800&family=Noto+Serif+SC:wght@500;700&display=swap"
rel="stylesheet"
/>
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<div class="shell">
<header class="site-header">
<div class="site-header__inner">
<a class="inline-flex items-center gap-3 text-[0.95rem] font-bold uppercase tracking-[0.15em]" href="#top" aria-label="Spectra Lab 首页">
<span class="h-[10px] w-[10px] rounded-full bg-[color:var(--accent)] shadow-[0_0_0_6px_var(--accent-soft)]"></span>
<span>Spectra Lab</span>
</a>
<nav class="hidden items-center gap-5 text-sm md:flex">
<a class="muted hover:text-[color:var(--text)]" href="#statement">Statement</a>
<a class="muted hover:text-[color:var(--text)]" href="#works">Works</a>
<a class="muted hover:text-[color:var(--text)]" href="#system">System</a>
<a class="muted hover:text-[color:var(--text)]" href="#components">Components</a>
<a class="muted hover:text-[color:var(--text)]" href="#closing">Closing</a>
</nav>
<button
id="modeToggle"
class="mode-toggle w-fit border border-[color:var(--line)] px-3 py-2 text-sm text-[color:var(--muted)] transition hover:border-[color:var(--line-strong)] hover:bg-[color:var(--accent-soft)] hover:text-[color:var(--text)]"
type="button"
aria-label="切换页面模式"
>
Light Mode
</button>
</div>
</header>
<div class="grid-overlay" aria-hidden="true"></div>
<main id="top" class="relative z-10 space-y-9 pb-6 md:space-y-12">
<section class="hero reveal space-y-6 pt-2 md:space-y-8">
<div class="section-rule flex flex-col gap-2 pt-3 md:flex-row md:items-baseline md:justify-between">
<p class="smallcaps">Front-end concept / 2026</p>
<p class="smallcaps">Issue 03 — Tailwind Adaptive Pass</p>
</div>
<div class="section-rule grid gap-6 pt-6 md:grid-cols-12 md:gap-6">
<div class="md:col-span-8">
<h1 class="section-title max-w-[11ch] font-serif text-[2.4rem] font-bold leading-[1.02] md:text-[4.15rem] lg:text-[5.45rem]">
用 Tailwind 重建响应式秩序,
让你看到的和我看到的一样。
</h1>
<p class="lede mt-6 text-[1.01rem] leading-[1.9] muted">
这轮把布局体系切到 Tailwind栅格、间距、断点、组件状态全部落成可复用的响应式规则。核心目标不是“更炫”而是减少端侧渲染差异让真实线上观感更稳定地贴近验收截图。
</p>
</div>
<aside class="ui-card card-tight md:col-span-4 md:col-start-10 p-5 self-end">
<p class="text-[0.96rem] leading-[1.75] muted">
如果页面精细度只存在于截图里,那不是设计成功。真正成功是:你打开线上站,看到的质感能稳定复现。
</p>
</aside>
</div>
<div class="section-rule grid gap-4 pt-6 md:grid-cols-3">
<article class="ui-card card-tight p-5">
<span class="smallcaps">Layout system</span>
<p class="mt-3 text-[1rem] leading-[1.7]">Tailwind 断点统一驱动容器、列宽和间距,不再靠手写规则散点拼接。</p>
</article>
<article class="ui-card card-tight p-5">
<span class="smallcaps">Visual consistency</span>
<p class="mt-3 text-[1rem] leading-[1.7]">边框、材质、阴影和状态样式拆成组件类,减少页面局部漂移。</p>
</article>
<article class="ui-card card-tight p-5">
<span class="smallcaps">Interaction parity</span>
<p class="mt-3 text-[1rem] leading-[1.7]">交互钩子保持不变,行为和视觉在不同设备上更可预测。</p>
</article>
</div>
</section>
<section id="statement" class="section reveal space-y-6">
<div class="section-rule pt-3">
<p class="smallcaps">Statement</p>
<h2 class="section-title mt-3 max-w-[18ch] font-serif text-[1.85rem] leading-[1.14] md:text-[2.85rem]">先收敛系统,再追求惊艳,页面才不会忽好忽坏。</h2>
</div>
<div class="section-rule grid gap-6 pt-6 md:grid-cols-2">
<p class="lede leading-[1.88] muted">你说“页面看起来不如截图好”这个反馈很关键。它通常不是单个颜色问题而是样式体系在不同环境下的稳定性不够。Tailwind 的价值就在于把这些变化收敛到确定的 utility + 断点规则里。</p>
<p class="lede leading-[1.88] muted">所以这版会优先保证不同屏幕尺寸下的排版和边界一致,再叠加动效和组件互动。先把基础稳定性拉起来,精细感才不会随机消失。</p>
</div>
</section>
<section id="works" class="section reveal space-y-6">
<div class="section-rule flex flex-col gap-3 pt-3 md:flex-row md:items-end md:justify-between">
<div>
<p class="smallcaps">Selected Works</p>
<h2 class="section-title mt-3 max-w-[16ch] font-serif text-[1.85rem] leading-[1.14] md:text-[2.85rem]">四个切片,展示这页的结构与质感。</h2>
</div>
<p class="text-sm muted">点击左侧卡片,右侧说明会联动更新。</p>
</div>
<div class="section-rule grid gap-6 pt-6 md:grid-cols-12">
<div class="work-list grid gap-3 md:col-span-5" role="tablist" aria-label="设计切片列表">
<button class="work-item ui-card card-tight is-active grid grid-cols-[44px_1fr] gap-3 p-4 text-left hover:translate-x-1 hover:border-[color:var(--line-strong)] hover:bg-[color:var(--accent-soft)]" type="button" aria-selected="true" data-title="Opening Spread" data-index="01" data-copy="首页像一本刊物的开篇大跨页:不是堆特效,而是用标题、说明、细线和留白一起建立一眼可感知的秩序。">
<span class="work-number text-xs tracking-[0.14em] muted">01</span>
<span><strong class="block text-[1.05rem]">Opening Spread</strong><small class="text-sm muted">封面感与主次节奏</small></span>
</button>
<button class="work-item ui-card card-tight grid grid-cols-[44px_1fr] gap-3 p-4 text-left hover:translate-x-1 hover:border-[color:var(--line-strong)] hover:bg-[color:var(--accent-soft)]" type="button" aria-selected="false" data-title="Quiet Contrast" data-index="02" data-copy="对比来自字重、列宽、材质与边界,而不是夸张颜色。暗红只作为标记,不作为表演。">
<span class="work-number text-xs tracking-[0.14em] muted">02</span>
<span><strong class="block text-[1.05rem]">Quiet Contrast</strong><small class="text-sm muted">克制色彩,而非堆叠效果</small></span>
</button>
<button class="work-item ui-card card-tight grid grid-cols-[44px_1fr] gap-3 p-4 text-left hover:translate-x-1 hover:border-[color:var(--line-strong)] hover:bg-[color:var(--accent-soft)]" type="button" aria-selected="false" data-title="Measured Motion" data-index="03" data-copy="动效只承担两件事:提示切换、改善触感。页面不会为了证明自己会动而到处动。">
<span class="work-number text-xs tracking-[0.14em] muted">03</span>
<span><strong class="block text-[1.05rem]">Measured Motion</strong><small class="text-sm muted">把运动当作排版的一部分</small></span>
</button>
<button class="work-item ui-card card-tight grid grid-cols-[44px_1fr] gap-3 p-4 text-left hover:translate-x-1 hover:border-[color:var(--line-strong)] hover:bg-[color:var(--accent-soft)]" type="button" aria-selected="false" data-title="Material Ending" data-index="04" data-copy="结尾像一页真正收住的落版:不抢戏、不吵闹,只让页面在最后留下明确的材质与余味。">
<span class="work-number text-xs tracking-[0.14em] muted">04</span>
<span><strong class="block text-[1.05rem]">Material Ending</strong><small class="text-sm muted">收尾比开始更能决定完成度</small></span>
</button>
</div>
<article class="work-stage md:col-span-7">
<div class="stage-card ui-card relative overflow-hidden p-6 md:p-8">
<p class="smallcaps">Current focus</p>
<div id="workIndex" class="mt-3 text-[3.6rem] leading-[0.95] md:text-[6.3rem] text-[color:color-mix(in_srgb,var(--accent)_74%,var(--text)_26%)]">01</div>
<h3 id="workTitle" class="font-serif text-[1.8rem] leading-tight md:text-[2.5rem]">Opening Spread</h3>
<p id="workCopy" class="mt-3 leading-[1.8] muted">首页像一本刊物的开篇大跨页:不是堆特效,而是用标题、说明、细线和留白一起建立一眼可感知的秩序。</p>
</div>
</article>
</div>
</section>
<section id="system" class="section reveal space-y-6">
<div class="section-rule pt-3">
<p class="smallcaps">System</p>
<h2 class="section-title mt-3 max-w-[16ch] font-serif text-[1.85rem] leading-[1.14] md:text-[2.85rem]">Tailwind 驱动的响应式系统,确保视觉稳定落地。</h2>
</div>
<div class="section-rule grid gap-4 pt-6 md:grid-cols-3">
<article class="ui-card card-tight p-5"><span class="smallcaps">Typography</span><p class="mt-3 text-[1rem] leading-[1.76] muted">衬线标题 + 无衬线正文,结构层次稳定且阅读负担更低。</p></article>
<article class="ui-card card-tight p-5"><span class="smallcaps">Adaptive spacing</span><p class="mt-3 text-[1rem] leading-[1.76] muted">间距通过断点阶梯控制,避免在手机端失衡、在桌面端发散。</p></article>
<article class="ui-card card-tight p-5"><span class="smallcaps">State style</span><p class="mt-3 text-[1rem] leading-[1.76] muted">选中、hover、联动反馈统一收口到组件状态不再零散散落。</p></article>
</div>
</section>
<section id="components" class="section reveal space-y-6">
<div class="section-rule flex flex-col gap-3 pt-3 md:flex-row md:items-end md:justify-between">
<div>
<p class="smallcaps">Components</p>
<h2 class="section-title mt-3 max-w-[18ch] font-serif text-[1.85rem] leading-[1.14] md:text-[2.85rem]">把组件区做成一页真实样张,而不是功能展示板。</h2>
</div>
<p class="text-sm muted">这里既要能交互,也要像真正可以交付的品牌样张。</p>
</div>
<div class="section-rule grid gap-6 pt-6 md:grid-cols-12">
<div class="control-panel ui-card card-tight grid gap-5 p-5 md:col-span-5">
<div class="grid gap-2">
<p class="smallcaps">Layout tone</p>
<div class="flex flex-wrap gap-2" role="tablist" aria-label="布局语气切换">
<button class="tone-chip is-active border border-[color:var(--line)] px-3 py-2 text-sm transition hover:border-[color:var(--line-strong)] hover:bg-[color:var(--accent-soft)]" type="button" data-tone="quiet">Quiet</button>
<button class="tone-chip border border-[color:var(--line)] px-3 py-2 text-sm transition hover:border-[color:var(--line-strong)] hover:bg-[color:var(--accent-soft)]" type="button" data-tone="balanced">Balanced</button>
<button class="tone-chip border border-[color:var(--line)] px-3 py-2 text-sm transition hover:border-[color:var(--line-strong)] hover:bg-[color:var(--accent-soft)]" type="button" data-tone="dramatic">Dramatic</button>
</div>
</div>
<div class="grid gap-2">
<label class="smallcaps" for="densityRange">Information density</label>
<input id="densityRange" class="density-range w-full accent-[color:var(--accent)]" type="range" min="1" max="3" step="1" value="2" />
<div class="flex items-center justify-between text-xs muted">
<span>Airy</span><span id="densityValue">Balanced</span><span>Dense</span>
</div>
</div>
<div class="grid gap-2">
<p class="smallcaps">Material accent</p>
<div class="flex flex-wrap gap-2">
<button class="swatch is-active h-8 w-8 rounded-full border border-[color:var(--line)] shadow-[inset_0_0_0_4px_rgba(255,255,255,0.08)]" type="button" data-accent="#7f2f2f" style="--swatch:#7f2f2f;background:var(--swatch)"></button>
<button class="swatch h-8 w-8 rounded-full border border-[color:var(--line)] shadow-[inset_0_0_0_4px_rgba(255,255,255,0.08)]" type="button" data-accent="#3f5a73" style="--swatch:#3f5a73;background:var(--swatch)"></button>
<button class="swatch h-8 w-8 rounded-full border border-[color:var(--line)] shadow-[inset_0_0_0_4px_rgba(255,255,255,0.08)]" type="button" data-accent="#6c6250" style="--swatch:#6c6250;background:var(--swatch)"></button>
</div>
</div>
<div class="grid gap-2">
<p class="smallcaps">Editorial notes</p>
<div class="grid gap-2">
<button class="note-item is-active border border-[color:var(--line)] px-3 py-2 text-left text-sm transition hover:border-[color:var(--line-strong)] hover:bg-[color:var(--accent-soft)]" type="button" data-note="封面对齐决定第一印象。">封面对齐决定第一印象。</button>
<button class="note-item border border-[color:var(--line)] px-3 py-2 text-left text-sm transition hover:border-[color:var(--line-strong)] hover:bg-[color:var(--accent-soft)]" type="button" data-note="组件数量增加后,更需要统一边框逻辑。">组件数量增加后,更需要统一边框逻辑。</button>
<button class="note-item border border-[color:var(--line)] px-3 py-2 text-left text-sm transition hover:border-[color:var(--line-strong)] hover:bg-[color:var(--accent-soft)]" type="button" data-note="交互反馈应该像纸页翻动,而不是界面在炫耀。">交互反馈应该像纸页翻动,而不是界面在炫耀。</button>
</div>
</div>
</div>
<div class="preview-panel grid gap-4 md:col-span-7">
<div class="editorial-sheet ui-card p-5 md:p-6">
<div class="flex flex-col gap-6 md:flex-row md:items-start md:justify-between">
<div>
<p class="editorial-kicker">Issue note / editorial specimen</p>
<h3 class="section-title mt-3 max-w-[14ch] font-serif text-[1.5rem] leading-[1.12] md:text-[2rem]">同一套规则,应该在不同屏幕上都维持住版式气质。</h3>
</div>
<div class="min-w-[180px] border-l-0 pt-0 text-sm muted md:border-l md:border-[color:var(--line)] md:pl-5">
<p>Material study</p>
<p class="mt-2 editorial-note">更少的边框噪音,更稳定的段落宽度,更克制的层级阴影。</p>
</div>
</div>
<div class="editorial-spec mt-6 grid gap-4 py-4 md:grid-cols-[1.2fr_0.8fr] md:gap-6">
<p class="editorial-note">这一块不再只是“预览卡片”,而是模拟真实交付时的版心、旁注与状态信息如何共存。它需要可读,也要足够安静。</p>
<div class="grid gap-2 text-xs uppercase tracking-[0.16em] muted">
<span>Responsive parity</span>
<span>Quiet material</span>
<span>Editorial pacing</span>
</div>
</div>
</div>
<div id="previewCard" class="preview-card stage-card ui-card p-5 md:p-6" data-tone="balanced" data-density="2">
<div class="flex flex-col gap-1 border-b border-[color:var(--line)] pb-3 text-xs uppercase tracking-[0.16em] muted sm:flex-row sm:items-center sm:justify-between">
<span id="previewTone">Balanced tone</span>
<span id="previewDensity">Density 02</span>
</div>
<div class="py-5 md:py-7">
<p class="smallcaps">Live editorial specimen</p>
<h3 id="previewTitle" class="section-title mt-3 max-w-[14ch] font-serif text-[1.6rem] leading-[1.12] md:text-[2rem]">A layout that knows where to stop.</h3>
<p id="previewText" class="lede mt-3 leading-[1.86] muted">这一块不是静态说明,而是一张会随着交互变化的样张:它会根据布局语气、信息密度与材料色点,实时调整状态。</p>
</div>
<div class="flex flex-col gap-2 border-t border-[color:var(--line)] pt-3 text-xs uppercase tracking-[0.16em] muted sm:flex-row sm:items-center sm:justify-between">
<span id="previewAccentLabel">Accent / Oxblood</span>
<strong id="previewNote" class="max-w-[30ch] text-[11px] font-semibold normal-case tracking-normal text-[color:var(--text)]">封面对齐决定第一印象。</strong>
</div>
</div>
<div class="grid gap-3">
<details class="mini-module ui-card card-tight p-4" open>
<summary class="smallcaps cursor-pointer">Spacing rule</summary>
<p class="mt-2 text-sm leading-[1.75] muted">所有主要模块共享统一的竖向节奏,避免 section 间呼吸不一致。</p>
</details>
<details class="mini-module ui-card card-tight p-4">
<summary class="smallcaps cursor-pointer">Border rule</summary>
<p class="mt-2 text-sm leading-[1.75] muted">边框只在建立层级时出现,不再无差别包裹全部区域。</p>
</details>
<details class="mini-module ui-card card-tight p-4">
<summary class="smallcaps cursor-pointer">Motion rule</summary>
<p class="mt-2 text-sm leading-[1.75] muted">交互动画只做提示,不做夸张炫技。</p>
</details>
</div>
</div>
</div>
</section>
<section id="closing" class="section reveal">
<div class="rounded-none border border-[rgba(0,0,0,0.08)] bg-[color:var(--paper)] p-6 text-[color:var(--ink)] shadow-soft md:p-9">
<p class="smallcaps text-[rgba(20,20,20,0.72)]">Closing</p>
<h2 class="mt-3 max-w-4xl font-serif text-[1.9rem] leading-[1.18] tracking-[-0.02em] md:text-[3rem]">引入 Tailwind 之后,页面在不同端的表现更可控、更一致。</h2>
<p class="mt-4 max-w-4xl leading-[1.82] text-[rgba(20,20,20,0.72)]">这一版核心不是换皮,而是让响应式策略和组件状态都进入标准化轨道。你再看线上效果时,看到的会更接近我本地验收看到的实际结果。</p>
<div class="mt-6 flex flex-col gap-2 border-t border-[rgba(20,20,20,0.12)] pt-4 text-xs uppercase tracking-[0.16em] text-[rgba(20,20,20,0.72)] sm:flex-row sm:items-center sm:justify-between">
<span>Spectra Lab / Tailwind adaptive pass</span>
<span>Built for layout parity.</span>
</div>
</div>
</section>
</main>
<footer class="reveal mt-4 flex flex-col gap-1 border-t border-[color:var(--line)] pt-4 text-sm muted sm:flex-row sm:items-center sm:justify-between">
<span>Spectra Lab</span>
<span id="modeLabel">Editorial Dark</span>
</footer>
</div>
<script src="app.js"></script>
</body>
</html>