Bring the landing site into the repo as site/

Vite 8 vanilla page for omarchycn.zacharyzhang.com: kami palette on a
12-col Swiss grid, self-hosted Fusion Pixel zh_hans (OFL shipped),
GSAP ScrollSmoother/ScrollTrigger with reduced-motion opt-out, reicon
icons, ISO download plus one-click convert command copy, real
installer screenshot. shots.mjs is the rendered-state harness; deploy
is npx wrangler deploy from site/ (custom domain + workers.dev).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019hLK3wsDuKVAC37GgDqg6H
This commit is contained in:
2026-08-27 20:07:43 -04:00
co-authored by Claude Fable 5
parent f72a48f747
commit f9c9b3c364
14 changed files with 2044 additions and 0 deletions
+95
View File
@@ -0,0 +1,95 @@
import { gsap } from "gsap";
import { ScrollTrigger } from "gsap/ScrollTrigger";
import { ScrollSmoother } from "gsap/ScrollSmoother";
import { Download, Copy, Check } from "reicon";
const ICONS = { Download, Copy, Check };
const ICON_OPTS = { size: 18, strokeWidth: 1.5 };
for (const el of document.querySelectorAll(".i[data-icon]")) {
const icon = ICONS[el.dataset.icon];
if (!icon) throw new Error(`unknown icon: ${el.dataset.icon}`);
el.replaceChildren(icon(ICON_OPTS));
}
/* Copy the convert command */
const copyBtn = document.getElementById("copy-btn");
const copyText = copyBtn.querySelector(".copy-text");
const copyIcon = copyBtn.querySelector(".i");
copyText.setAttribute("aria-live", "polite");
let copyTimer;
let copySeq = 0;
copyBtn.addEventListener("click", async () => {
const cmd = document.getElementById("cmd-text").textContent.trim();
const seq = ++copySeq;
let ok = true;
try {
await navigator.clipboard.writeText(cmd);
} catch (err) {
console.error("clipboard write failed", err);
ok = false;
}
// Only the latest click may touch the feedback state
if (seq !== copySeq) return;
clearTimeout(copyTimer);
copyBtn.classList.remove("done", "fail");
copyBtn.classList.add(ok ? "done" : "fail");
copyIcon.replaceChildren(ok ? Check(ICON_OPTS) : Copy(ICON_OPTS));
copyText.textContent = ok ? "已复制" : "复制失败";
copyTimer = setTimeout(() => {
copyBtn.classList.remove("done", "fail");
copyIcon.replaceChildren(Copy(ICON_OPTS));
copyText.textContent = "复制";
}, 2000);
});
/* Grid overlay: G key */
document.addEventListener("keydown", (e) => {
if (e.key !== "g" && e.key !== "G") return;
if (e.metaKey || e.ctrlKey || e.altKey) return;
if (/^(input|textarea|select)$/i.test(e.target.tagName)) return;
document.body.classList.toggle("grid-on");
});
/* Motion: smooth scrolling + reveals, skipped under reduced motion */
if (!window.matchMedia("(prefers-reduced-motion: reduce)").matches) {
gsap.registerPlugin(ScrollTrigger, ScrollSmoother);
ScrollSmoother.create({
wrapper: "#smooth-wrapper",
content: "#smooth-content",
smooth: 1,
});
const enter = [".hero .eyebrow", ".hero h1 .line", ".hero .lede", ".hero .actions", ".hero .meta"];
gsap.set(enter, { y: 24, autoAlpha: 0 });
document.fonts.ready.then(() => {
gsap.to(enter, {
y: 0,
autoAlpha: 1,
duration: 0.7,
ease: "power2.out",
stagger: 0.09,
});
});
// Document-tail elements never reach the 85% line, so they fire on entry
const reveals = [
[".shot", "top 85%"],
[".feat", "top 85%"],
[".verify > *", "top 92%"],
[".foot > *", "top bottom"],
];
for (const [sel, start] of reveals) {
for (const el of gsap.utils.toArray(sel)) {
gsap.from(el, {
y: 24,
autoAlpha: 0,
duration: 0.6,
ease: "power2.out",
scrollTrigger: { trigger: el, start },
});
}
}
}
+419
View File
@@ -0,0 +1,419 @@
/* OmarchyCN landing — kami palette on a Müller-Brockmann grid, Fusion Pixel type */
@font-face {
font-family: "Fusion Pixel";
src: url("/fonts/fusion-pixel-12px-proportional-zh_hans.otf.woff2") format("woff2");
font-weight: 400;
font-display: swap;
}
@font-face {
font-family: "Fusion Pixel Mono";
src: url("/fonts/fusion-pixel-12px-monospaced-zh_hans.otf.woff2") format("woff2");
font-weight: 400;
font-display: swap;
}
:root {
--cols: 12;
--bl: 8px;
--lh: 24px;
--gutter: 24px;
--margin: 72px;
--pad: 24px;
--maxw: 1296px;
--paper: #f5f4ed;
--ivory: #faf9f5;
--sand: #e8e6dc;
--ink: #141413;
--ink-2: #3d3d3a;
--stone: #6b6a64;
--brand: #1b365d;
--brand-light: #2d5a8a;
--tint: #eef2f7;
--line: #d8d5c8;
--shot-bg: #141318;
--err: #8a2d2d;
--pixel: "Fusion Pixel", "Noto Sans SC", system-ui, sans-serif;
--pixel-mono: "Fusion Pixel Mono", ui-monospace, monospace;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html {
scroll-behavior: smooth;
}
body {
background: var(--paper);
color: var(--ink);
font-family: var(--pixel);
font-size: 12px;
line-height: var(--lh);
-webkit-font-smoothing: none;
text-rendering: geometricPrecision;
}
.mono {
font-family: var(--pixel-mono);
}
a {
color: var(--ink);
text-decoration-thickness: 1px;
text-underline-offset: 4px;
transition: color 150ms ease-out;
}
a:hover {
color: var(--brand);
}
:is(a, button):focus-visible {
outline: 2px solid var(--brand);
outline-offset: 2px;
}
/* Grid frame */
.wrap {
position: relative;
max-width: var(--maxw);
margin: 0 auto;
padding: var(--pad) var(--margin) 96px;
}
.band {
display: grid;
grid-template-columns: repeat(var(--cols), 1fr);
column-gap: var(--gutter);
row-gap: var(--lh);
align-items: start;
}
/* Topbar */
.topbar {
align-items: center;
}
.brand {
font-size: 12px;
letter-spacing: 2px;
}
.topnav {
display: flex;
justify-content: flex-end;
gap: 24px;
}
.topnav a {
color: var(--stone);
text-decoration: none;
}
.topnav a:hover {
color: var(--brand);
text-decoration: underline;
}
/* Hero */
.hero {
margin-top: 144px;
}
.eyebrow {
font-family: var(--pixel-mono);
color: var(--brand);
letter-spacing: 1px;
}
h1 {
font-size: 60px;
line-height: 72px;
font-weight: 400;
word-break: keep-all;
}
h1 .line {
display: block;
}
.lede {
font-size: 24px;
line-height: 40px;
color: var(--ink-2);
margin-top: 8px;
}
.actions {
margin-top: 24px;
display: grid;
grid-template-columns: repeat(var(--cols), 1fr);
column-gap: var(--gutter);
row-gap: var(--lh);
align-items: end;
}
.btn {
grid-column: 1 / 4;
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
height: 48px;
padding: 0 24px;
background: var(--brand);
color: var(--ivory);
border-radius: 8px;
text-decoration: none;
transition: background-color 150ms ease-out;
}
.btn:hover {
background: var(--brand-light);
color: var(--ivory);
}
.btn .i {
color: var(--ivory);
}
.btn-meta {
color: var(--sand);
}
.convert {
grid-column: 4 / 11;
}
.cmd-label {
color: var(--stone);
margin-bottom: 8px;
}
.cmd {
position: relative;
display: flex;
align-items: flex-start;
gap: 16px;
background: var(--ivory);
border: 1px solid var(--line);
border-radius: 8px;
padding: 12px 16px;
}
.cmd code {
font-family: var(--pixel-mono);
font-size: 12px;
line-height: 24px;
white-space: pre-wrap;
word-break: break-all;
flex: 1;
}
.copy {
position: relative;
display: flex;
align-items: center;
gap: 4px;
border: 0;
background: none;
font: inherit;
font-family: var(--pixel-mono);
color: var(--stone);
cursor: pointer;
padding: 0 4px;
height: 24px;
border-radius: 4px;
transition: color 150ms ease-out, background-color 150ms ease-out;
}
.copy::after {
content: "";
position: absolute;
inset: -8px;
}
.cmd:hover .copy,
.copy:hover,
.copy:focus-visible {
color: var(--brand);
}
.copy:hover {
background: var(--tint);
}
.copy.done {
color: var(--brand);
}
.copy.fail {
color: var(--err);
}
.meta {
color: var(--stone);
margin-top: 8px;
}
/* Screenshot */
.shotband {
margin-top: 96px;
}
.shot {
background: var(--shot-bg);
border: 1px solid var(--line);
border-radius: 8px;
padding: 24px;
}
.shot img {
display: block;
width: 100%;
height: auto;
outline: 1px solid rgba(255, 255, 255, 0.1);
outline-offset: -1px;
}
.shot figcaption {
color: var(--sand);
margin-top: 16px;
}
/* Features */
.feats {
margin-top: 144px;
}
.num {
color: var(--brand);
}
.feat h2 {
font-size: 24px;
line-height: 32px;
font-weight: 400;
margin: 16px 0 8px;
}
.feat p:last-child {
color: var(--stone);
}
/* Verify */
.verify {
margin-top: 144px;
padding-top: 24px;
border-top: 1px solid var(--line);
}
.verify h2 {
font-size: 24px;
line-height: 32px;
font-weight: 400;
}
.verify dl > div {
display: grid;
grid-template-columns: 96px 1fr;
gap: 24px;
margin-bottom: 8px;
}
.verify dt {
color: var(--stone);
}
.verify dd {
word-break: break-all;
}
/* Footer */
.foot {
margin-top: 144px;
padding-top: 24px;
border-top: 1px solid var(--line);
color: var(--stone);
}
.foot a {
color: var(--stone);
}
/* Icons */
.i {
display: inline-flex;
width: 24px;
height: 24px;
align-items: center;
justify-content: center;
color: currentColor;
}
/* Grid overlay (toggle: G or footer button) */
.guides {
position: absolute;
inset: 0;
pointer-events: none;
opacity: 0;
}
body.grid-on .guides {
opacity: 1;
}
.guides .cols {
position: absolute;
top: 0;
bottom: 0;
left: var(--margin);
right: var(--margin);
display: grid;
grid-template-columns: repeat(var(--cols), 1fr);
column-gap: var(--gutter);
}
.guides .cols::before {
content: "";
grid-column: 1 / -1;
background: repeating-linear-gradient(
to right,
rgba(27, 54, 93, 0.1) 0,
rgba(27, 54, 93, 0.1) calc((100% - 11 * var(--gutter)) / 12),
transparent 0,
transparent calc((100% - 11 * var(--gutter)) / 12 + var(--gutter))
);
}
.guides .rows {
position: absolute;
left: var(--margin);
right: var(--margin);
top: var(--pad);
bottom: 0;
background-image: repeating-linear-gradient(
to bottom,
rgba(27, 54, 93, 0.22) 0 1px,
transparent 1px var(--lh)
);
}
/* Responsive */
@media (max-width: 960px) {
:root {
--margin: 24px;
}
h1 {
font-size: 36px;
line-height: 48px;
}
h1 .line {
display: inline;
}
.lede {
font-size: 12px;
line-height: 24px;
}
.hero {
margin-top: 96px;
}
.band > * {
grid-column: 1 / -1 !important;
}
.feat {
grid-column: span 6 !important;
}
.btn {
grid-column: 1 / 7;
}
.convert {
grid-column: 1 / -1;
}
.topbar .brand {
grid-column: 1 / 5 !important;
}
.topbar .topnav {
grid-column: 5 / 13 !important;
}
}
@media (max-width: 640px) {
.feat {
grid-column: 1 / -1 !important;
}
.btn {
grid-column: 1 / -1;
}
}
@media (prefers-reduced-motion: reduce) {
html {
scroll-behavior: auto;
}
}