fix: 删除多余文件

This commit is contained in:
sophie committed 2026-10-29 11:38:42 +08:00
1 parent 859f20eb00
commit c99513092a
6 files changed
-623

No files matched your search

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

@@ -1,90 +0,0 @@
[
{
"file": ".taste-skill/prototype/assets/gold-belt-mount-with-rivet.jpg",
"media": "image",
"ref": "met:464103",
"title": "Gold Belt Mount with Rivet",
"creator": "Avar maker",
"creatorUrl": null,
"date": "700s",
"license": "public domain (CC0)",
"licenseCode": "cc0",
"licenseUrl": "https://creativecommons.org/publicdomain/zero/1.0/",
"creditRequired": false,
"page": "https://www.metmuseum.org/art/collection/search/464103",
"via": "The Metropolitan Museum of Art",
"image": "https://images.metmuseum.org/CRDImages/md/original/17_190_1694ab_MED_s02.jpg",
"width": 3140,
"height": 4000,
"bytes": 1937315,
"credit": "\"Gold Belt Mount with Rivet\" by Avar maker, 700s, public domain (CC0), via The Metropolitan Museum of Art",
"notes": [],
"saved": "2026-10-27T02:25:25.754Z"
},
{
"file": ".taste-skill/prototype/assets/hammer.jpg",
"media": "image",
"ref": "met:204741",
"title": "Hammer",
"creator": null,
"creatorUrl": null,
"date": "probably 18th century",
"license": "public domain (CC0)",
"licenseCode": "cc0",
"licenseUrl": "https://creativecommons.org/publicdomain/zero/1.0/",
"creditRequired": false,
"page": "https://www.metmuseum.org/art/collection/search/204741",
"via": "The Metropolitan Museum of Art",
"image": "https://images.metmuseum.org/CRDImages/es/original/187608.jpg",
"width": 1984,
"height": 860,
"bytes": 281382,
"credit": "\"Hammer\", probably 18th century, public domain (CC0), via The Metropolitan Museum of Art",
"notes": [],
"saved": "2026-10-27T02:25:30.738Z"
},
{
"file": ".taste-skill/prototype/assets/armorer-s-anvil.jpg",
"media": "image",
"ref": "met:471599",
"title": "Armorer's Anvil",
"creator": "European maker",
"creatorUrl": null,
"date": "16th century",
"license": "public domain (CC0)",
"licenseCode": "cc0",
"licenseUrl": "https://creativecommons.org/publicdomain/zero/1.0/",
"creditRequired": false,
"page": "https://www.metmuseum.org/art/collection/search/471599",
"via": "The Metropolitan Museum of Art",
"image": "https://images.metmuseum.org/CRDImages/cl/original/cdi55-61-26.jpg",
"width": 2100,
"height": 1918,
"bytes": 1210493,
"credit": "\"Armorer's Anvil\" by European maker, 16th century, public domain (CC0), via The Metropolitan Museum of Art",
"notes": [],
"saved": "2026-10-27T02:25:45.912Z"
},
{
"file": ".taste-skill/prototype/assets/armor.jpg",
"media": "image",
"ref": "met:35937",
"title": "Armor",
"creator": "German, possibly Lower Saxony maker",
"creatorUrl": null,
"date": "ca. 1540–50 and later",
"license": "public domain (CC0)",
"licenseCode": "cc0",
"licenseUrl": "https://creativecommons.org/publicdomain/zero/1.0/",
"creditRequired": false,
"page": "https://www.metmuseum.org/art/collection/search/35937",
"via": "The Metropolitan Museum of Art",
"image": "https://images.metmuseum.org/CRDImages/aa/original/DP-36206-003.jpg",
"width": 3001,
"height": 4000,
"bytes": 1373710,
"credit": "\"Armor\" by German, possibly Lower Saxony maker, ca. 1540–50 and later, public domain (CC0), via The Metropolitan Museum of Art",
"notes": [],
"saved": "2026-10-27T02:26:00.813Z"
}
]
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 275 KiB

-533
View File
@@ -1,533 +0,0 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>尚未计时 · 托威斯拉钉机验收单</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500&family=Stack+Sans+Headline:wght@300&family=Stack+Sans+Text:wght@400;500&display=swap" rel="stylesheet">
<script>document.documentElement.classList.add('js')</script>
<style>
:root {
--bg: #133621;
--surface: #1a4429;
--ink: #f4d96c;
--muted: #d4c27a;
--accent: #f4d96c;
--accent-ink: #133621;
--fold-1: #07160e;
--fold-2: #0c2418;
--fold-3: #12301f;
--fold-4: #184028;
--font-display: "Stack Sans Headline", "Noto Sans SC", sans-serif;
--font-text: "Stack Sans Text", "Noto Sans SC", sans-serif;
--step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
--step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
--step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
--step-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);
--step-display: clamp(4.25rem, 8vw, 9rem);
--margin: clamp(1rem, 2.2vw, 2rem);
--gutter: clamp(1rem, 2vw, 2rem);
--section: clamp(7.5rem, 12vw, 13.75rem);
--radius: 999px;
--ease-out: cubic-bezier(0.22, 1, 0.36, 1);
--t-press: 140ms;
--t-hover: 180ms;
--t-ui: 240ms;
--t-reveal: 800ms;
}
*, *::before, *::after { box-sizing: border-box; }
html { text-size-adjust: 100%; }
body {
margin: 0;
background: var(--bg);
color: var(--ink);
font-family: var(--font-text);
font-size: var(--step-body);
font-weight: 400;
line-height: 1.5;
-webkit-font-smoothing: antialiased;
}
h1, h2, p, figure { margin: 0; }
img { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--accent-ink); }
.nums { font-variant-numeric: tabular-nums; }
.rivet {
display: inline-grid;
place-items: center;
width: 1.15em;
height: 1.15em;
border-radius: 50%;
background: var(--accent);
flex: none;
}
.rivet i {
width: 34%;
height: 34%;
border-radius: 50%;
background: var(--hole, var(--bg));
}
.top {
position: absolute;
z-index: 2;
top: 0;
left: 0;
right: 0;
display: grid;
grid-template-columns: 1fr auto 1fr;
align-items: center;
min-height: 4.5rem;
padding-inline: var(--margin);
}
.top .brand { grid-column: 2; font-family: var(--font-display); font-weight: 300; font-size: var(--step-body); text-decoration: none; }
.top .back { grid-column: 3; justify-self: end; font-size: var(--step-body); text-underline-offset: 0.2em; }
.hero { position: relative; overflow-x: clip; padding: 6.5rem var(--margin) 0; }
.hero h1 {
position: relative;
z-index: 1;
font-family: var(--font-display);
font-weight: 300;
font-size: var(--step-display);
line-height: 1.05;
letter-spacing: -0.03em;
text-wrap: balance;
}
.support {
position: relative;
z-index: 1;
max-width: 18em;
margin-top: 1.25rem;
font-size: var(--step-body);
line-height: 1.5;
}
.giant {
position: absolute;
z-index: 0;
top: 4.5rem;
right: -26vh;
width: 108vh;
height: 108vh;
border-radius: 50%;
overflow: hidden;
background: var(--accent);
}
.giant img { width: 100%; height: 100%; object-fit: cover; object-position: center 62%; }
.stack { position: relative; z-index: 1; width: min(86%, 1120px); margin: 7vh auto 0; padding-top: 16rem; }
.leaf {
position: absolute;
left: 0;
right: 0;
height: 4rem;
display: flex;
align-items: center;
gap: 0.75rem;
padding-inline: 1.25rem;
color: var(--ink);
text-decoration: none;
font-size: var(--step-body);
font-weight: 500;
}
.leaf:nth-of-type(1) { top: 0; background: var(--fold-1); }
.leaf:nth-of-type(2) { top: 4rem; background: var(--fold-2); }
.leaf:nth-of-type(3) { top: 8rem; background: var(--fold-3); }
.leaf:nth-of-type(4) { top: 12rem; background: var(--fold-4); }
.leaf .rivet { --hole: var(--leaf, var(--bg)); width: 2.4rem; height: 2.4rem; }
.front {
position: relative;
min-height: 46vh;
padding: 2rem;
background: var(--surface);
}
.front .tabline { display: flex; align-items: center; gap: 0.75rem; font-weight: 500; margin-bottom: 1.5rem; }
.front .rivet { --hole: var(--surface); width: 2.4rem; height: 2.4rem; }
.button {
display: inline-flex;
align-items: center;
justify-content: center;
min-height: 3.25rem;
padding: 0 1.5rem;
background: var(--accent);
color: var(--accent-ink);
border-radius: var(--radius);
text-decoration: none;
font-weight: 500;
}
.button:active { transform: scale(0.97); }
.front p { max-width: 36ch; margin-top: 1.5rem; }
.band { padding: var(--section) var(--margin); }
.ladder { background: var(--fold-1); }
.ladder h2, .facts h2 {
font-family: var(--font-display);
font-weight: 300;
font-size: var(--step-head);
line-height: 1.05;
letter-spacing: -0.02em;
max-width: 8em;
text-wrap: balance;
}
.ladder h2 { margin-bottom: 4rem; }
.stages { display: flex; align-items: stretch; gap: 6px; }
.stage { display: flex; flex-direction: column; gap: 0.9rem; min-width: 0; }
.seg {
display: flex;
align-items: flex-start;
min-height: 22vh;
padding: 1.25rem;
background: var(--seg, var(--surface));
color: var(--seg-ink, var(--ink));
font-family: var(--font-display);
font-weight: 300;
font-size: var(--step-lead);
line-height: 1.1;
}
.stage p { font-size: var(--step-body); }
.s1 { flex: 30 1 12%; --seg: #0c2418; }
.s2 { flex: 7 1 12%; --seg: #184028; }
.s3 { flex: 7 1 12%; --seg: #1f5536; }
.s4 { flex: 7 1 12%; --seg: var(--accent); --seg-ink: var(--accent-ink); }
.meter { position: relative; margin-top: 3rem; max-width: 72ch; }
.meter label { display: block; margin-bottom: 0.75rem; }
.meter input[type="range"] { width: 100%; height: 3rem; accent-color: #f4d96c; }
.meter .reading { margin-top: 0.75rem; max-width: 42ch; }
.track {
position: relative;
height: 2.75rem;
margin-bottom: 0.5rem;
}
.track .bar {
position: absolute;
left: 0;
right: 0;
top: 50%;
height: 0.55rem;
margin-top: -0.275rem;
background: #245c38;
}
.pin {
position: absolute;
top: 50%;
left: 0;
width: 1.75rem;
height: 1.75rem;
margin: -0.875rem 0 0 -0.875rem;
display: grid;
place-items: center;
border-radius: 50%;
background: var(--accent);
}
.pin i { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--fold-1); }
.facts { background: var(--fold-3); }
.split { display: grid; grid-template-columns: 5fr 7fr; column-gap: var(--gutter); align-items: start; }
.split h2 { grid-column: 2; grid-row: 1; margin-bottom: 2rem; }
.frame { position: sticky; top: 12vh; grid-column: 1; grid-row: 1 / span 2; width: min(34vw, 460px); }
.index { grid-column: 2; grid-row: 2; }
.shot {
position: relative;
width: 100%;
aspect-ratio: 1;
border-radius: 50%;
overflow: hidden;
background: var(--surface);
}
.shot img {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
object-fit: cover;
opacity: 0;
}
.shot img.is-on { opacity: 1; }
.cap { max-width: 28ch; margin-top: 1rem; color: var(--muted); font-size: var(--step-small); }
.index h2 { margin-bottom: 0; }
.row {
display: block;
width: 100%;
text-align: left;
color: var(--muted);
border-radius: 0;
}
.row.is-on { color: var(--ink); }
.line { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 3.6rem; }
.name { display: inline-flex; align-items: center; gap: 0.7rem; font-size: var(--step-lead); font-weight: 500; }
.row .rivet { --hole: var(--fold-3); }
.row.is-on .rivet { --hole: var(--fold-3); }
.val { font-size: var(--step-body); font-weight: 500; }
.desc { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 320ms var(--ease-out); }
.desc span { overflow: hidden; }
.desc p { max-width: 36ch; padding-bottom: 0.8rem; font-size: var(--step-body); font-weight: 400; }
.row.is-on .desc { grid-template-rows: 1fr; }
.inline { display: none; }
.close { background: #07160e; padding-bottom: 3rem; }
.mark {
display: flex;
align-items: flex-end;
gap: 4px;
max-width: 100%;
overflow: visible;
}
.blob {
display: grid;
place-items: center;
flex: var(--g) 1 0;
min-width: 0;
aspect-ratio: 1;
border-radius: 50%;
background: var(--accent);
}
.blob i { width: 32%; height: 32%; border-radius: 50%; background: #07160e; }
.close-grid {
display: grid;
grid-template-columns: repeat(12, minmax(0, 1fr));
column-gap: var(--gutter);
margin-top: 3.5rem;
}
.links { grid-column: 1 / 9; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.8rem 1rem; }
.links a { font-size: var(--step-body); text-decoration: none; }
.where { grid-column: 9 / 13; font-size: var(--step-body); }
.legal {
display: flex;
justify-content: space-between;
align-items: center;
gap: 1rem;
margin-top: 3rem;
}
.legal p, .credits { max-width: 78ch; color: var(--muted); font-size: var(--step-small); }
.credits { margin-top: 1.5rem; }
.credits a { color: inherit; }
@media (hover: hover) and (pointer: fine) {
.button:hover { background: #ffe58a; }
.leaf:hover .name, .links a:hover { text-decoration: underline; text-underline-offset: 0.18em; }
}
@media (max-width: 800px) {
.hero { padding-top: 48svh; }
.hero h1, .support {
position: absolute;
left: var(--margin);
right: var(--margin);
max-width: none;
text-align: center;
}
.hero h1 { top: 5.5rem; font-size: 17vw; }
.support { top: calc(5.5rem + 17vw + 0.8rem); font-size: 1rem; }
.giant { width: 62vw; height: 62vw; right: -14vw; top: calc(8.5rem + 17vw); bottom: auto; }
.stack { width: 100%; margin-top: 0; padding-top: 13rem; }
.leaf { height: 3.25rem; }
.leaf:nth-of-type(2) { top: 3.25rem; }
.leaf:nth-of-type(3) { top: 6.5rem; }
.leaf:nth-of-type(4) { top: 9.75rem; }
.front .button { width: 100%; }
.stages { flex-direction: column; }
.stage { flex: none; }
.seg { min-height: 5.5rem; }
.split { grid-template-columns: 1fr; }
.split h2, .frame, .index { grid-column: 1; width: auto; }
.split h2 { grid-row: 1; }
.frame { position: static; grid-row: 2; width: min(72vw, 360px); }
.index { grid-row: 3; }
.shot { width: min(70vw, 320px); margin-inline: auto; }
.close-grid { grid-template-columns: 1fr; }
.links, .where { grid-column: auto; }
.links { grid-template-columns: 1fr 1fr; }
.legal { flex-direction: column; align-items: flex-start; }
.mark { max-width: 100%; }
}
@media (prefers-reduced-motion: no-preference) {
.js [data-rise] { opacity: 0; transform: translateY(22px); animation: rise var(--t-reveal) var(--ease-out) forwards; animation-delay: calc(var(--i, 0) * 80ms + 80ms); }
.js [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity 700ms var(--ease-out), transform 800ms var(--ease-out); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js .shot img { transition: opacity var(--t-ui) linear; }
.js .shot img.is-on { animation: drift 16s ease-in-out infinite alternate; }
.button, .leaf, .row, .links a { transition: background-color var(--t-hover) ease, color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
}
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes drift { to { transform: scale(1.06); } }
</style>
</head>
<body>
<header class="hero" id="top">
<div class="top">
<a class="brand" href="#top">设备验收预警</a>
<a class="back" href="#close">返回停留情况</a>
</div>
<div class="giant" data-rise style="--i:2">
<img src="assets/gold-belt-mount-with-rivet.jpg" width="3140" height="4000" alt="八世纪金带扣,面上有一颗铆钉和一个孔。这不是托威斯拉钉机。">
</div>
<h1 data-rise style="--i:0">尚未计时</h1>
<p class="support" data-rise style="--i:1">托威斯这台拉钉机还停在品质担当,<br>签核天数是零。</p>
<div class="stack">
<a class="leaf" href="#ladder" data-rise style="--i:3; --leaf:#07160e"><span class="rivet" aria-hidden="true"><i></i></span>四档</a>
<a class="leaf" href="#facts" data-rise style="--i:4; --leaf:#0c2418"><span class="rivet" aria-hidden="true"><i></i></span>单据</a>
<a class="leaf" href="#handler" data-rise style="--i:5; --leaf:#12301f"><span class="rivet" aria-hidden="true"><i></i></span>经手</a>
<a class="leaf" href="#close" data-rise style="--i:6; --leaf:#184028"><span class="rivet" aria-hidden="true"><i></i></span>落款</a>
<div class="front" data-rise style="--i:7">
<div class="tabline"><span class="rivet" aria-hidden="true"><i></i></span>这张单</div>
<a class="button" href="#facts">看单据上的字</a>
<p>验收单 20260718000003,流程 20260718-1520。温德佳经手。审批还没结束,这张单可以验收,也没有退回。</p>
</div>
</div>
</header>
<section class="band ladder" id="ladder">
<h2 data-reveal>三十天才第一封</h2>
<div class="stages" data-ui>
<article class="stage s1" data-reveal style="--i:1">
<div class="seg">三十天</div>
<p>使用部门担当收到,并抄送主管。</p>
</article>
<article class="stage s2" data-reveal style="--i:2">
<div class="seg">七天</div>
<p>经副理收到,抄送 COO。</p>
</article>
<article class="stage s3" data-reveal style="--i:3">
<div class="seg">七天</div>
<p>COO 收到,抄送采购经副理。</p>
</article>
<article class="stage s4" data-reveal style="--i:4">
<div class="seg">七天</div>
<p>总经理默认不发。</p>
</article>
</div>
<div class="meter" data-reveal style="--i:5">
<div class="track" aria-hidden="true">
<div class="bar"></div>
<span class="pin" id="pin"><i></i></span>
</div>
<label for="dwell">假设已经签核 <output class="nums" id="days">0</output> 天</label>
<input id="dwell" type="range" min="0" max="60" value="0" step="1">
<p class="reading" id="reading">还在起点。进入使用部门担当之后,才从到达那天算。</p>
</div>
</section>
<section class="band facts" id="facts">
<div class="split">
<h2 data-reveal>单据上的字</h2>
<figure class="frame">
<div class="shot">
<img class="is-on" data-shot="0" src="assets/gold-belt-mount-with-rivet.jpg" width="3140" height="4000" alt="金带扣上的铆钉,阿瓦尔人,八世纪">
<img data-shot="1" src="assets/hammer.jpg" width="1984" height="860" alt="一把十八世纪的小锤" loading="lazy">
<img data-shot="2" src="assets/armorer-s-anvil.jpg" width="2100" height="1918" alt="十六世纪盔甲匠用的铁砧" loading="lazy">
<img data-shot="3" src="assets/armor.jpg" width="3001" height="4000" alt="十六世纪板甲,甲片用铆钉固定" loading="lazy">
</div>
<figcaption class="cap" id="cap">金带扣上的铆钉。阿瓦尔人,八世纪。大都会艺术博物馆藏,不是这台机器。</figcaption>
</figure>
<div class="index">
<button class="row is-on" type="button" data-shot="0" data-cap="金带扣上的铆钉。阿瓦尔人,八世纪。大都会艺术博物馆藏,不是这台机器。">
<span class="line"><span class="name"><span class="rivet" aria-hidden="true"><i></i></span>验收单</span><span class="val nums">20260718000003</span></span>
<span class="desc"><span><p>流程编号 20260718-1520。标题是托威斯平台式自动拉钉机,一套,提交 OA。创建于 2026-07-18 16:51:47。</p></span></span>
</button>
<button class="row" type="button" data-shot="1" data-cap="小锤。大概十八世纪。大都会艺术博物馆藏,不是采购单上的设备。">
<span class="line"><span class="name"><span class="rivet" aria-hidden="true"><i></i></span>采购单</span><span class="val nums">5202-2606030008</span></span>
<span class="desc"><span><p>申请人柴晓红。这张快照里没有合同号,采购单号就这一条。</p></span></span>
</button>
<button class="row" id="handler" type="button" data-shot="2" data-cap="盔甲匠的铁砧。十六世纪。人还没到计时的那一站,就像工件还搁在砧上。">
<span class="line"><span class="name"><span class="rivet" aria-hidden="true"><i></i></span>当前处理人</span><span class="val">温德佳</span></span>
<span class="desc"><span><p>节点是品质担当。计时要等使用部门担当,所以起点和天数都还是空的。工号这页没写。</p></span></span>
</button>
<button class="row" type="button" data-shot="3" data-cap="板甲。十六世纪,下萨克森一带。甲片靠铆钉固定,不是验收结论的照片。">
<span class="line"><span class="name"><span class="rivet" aria-hidden="true"><i></i></span>验收结论</span><span class="val">可以验收</span></span>
<span class="desc"><span><p>没有无法验收说明,也没有退回。流程仍是审批中,结束时间还没有。</p></span></span>
</button>
</div>
</div>
</section>
<footer class="band close" id="close">
<div class="mark" aria-hidden="true">
<span class="blob" data-reveal style="--g:0.62"><i></i></span>
<span class="blob" data-reveal style="--g:0.84; --i:1"><i></i></span>
<span class="blob" data-reveal style="--g:1; --i:2"><i></i></span>
<span class="blob" data-reveal style="--g:0.7; --i:3"><i></i></span>
<span class="blob" data-reveal style="--g:0.92; --i:4"><i></i></span>
<span class="blob" data-reveal style="--g:0.58; --i:5"><i></i></span>
<span class="blob" data-reveal style="--g:1; --i:6"><i></i></span>
</div>
<div class="close-grid">
<nav class="links" aria-label="页面">
<a href="#top">停留情况</a>
<a href="#ladder">四档天数</a>
<a href="#facts">这张单据</a>
<a href="#handler">当前处理人</a>
</nav>
<p class="where">验收单 20260718000003<br>流程 20260718-1520</p>
</div>
<div class="legal">
<p>正式页面里,返回会回到停留列表。这里只停在这一张单上。</p>
<a class="button" href="#top">返回停留情况</a>
</div>
<p class="credits">器物照片都来自大都会艺术博物馆,公有领域,不是托威斯的设备,也不是温德佳或柴晓红。<a href="https://www.metmuseum.org/art/collection/search/464103">金带扣与铆钉</a>,阿瓦尔人,八世纪。<a href="https://www.metmuseum.org/art/collection/search/204741">小锤</a>,约十八世纪。<a href="https://www.metmuseum.org/art/collection/search/471599">盔甲匠铁砧</a>,十六世纪。<a href="https://www.metmuseum.org/art/collection/search/35937">板甲</a>,约 1540–1550 年,可能来自下萨克森。</p>
</footer>
<script>
const rows = [...document.querySelectorAll('.row')];
const shots = [...document.querySelectorAll('.shot img')];
const cap = document.getElementById('cap');
function show(row) {
rows.forEach((item) => item.classList.toggle('is-on', item === row));
shots.forEach((img) => img.classList.toggle('is-on', img.dataset.shot === row.dataset.shot));
cap.textContent = row.dataset.cap;
}
rows.forEach((row) => {
row.addEventListener('mouseenter', () => show(row));
row.addEventListener('focus', () => show(row));
row.addEventListener('click', () => show(row));
});
const dwell = document.getElementById('dwell');
const days = document.getElementById('days');
const reading = document.getElementById('reading');
const pin = document.getElementById('pin');
const narrow = window.matchMedia('(max-width: 800px)');
function sentence(n) {
if (n <= 0) return '还在起点。进入使用部门担当之后,才从到达那天算。';
if (n < 30) return '已过 ' + n + ' 天,还没到三十天,一封都不发。';
if (n < 37) return '已过三十天。通知使用部门担当,抄送直接主管和采购担当。';
if (n < 44) return '已过三十七天。通知经副理,抄送 COO 和采购经副理。';
if (n < 51) return '已过四十四天。通知 COO,抄送采购经副理。';
return '已过五十一天。总经理这一档默认关着,打开后才发。';
}
function paint() {
const n = Number(dwell.value);
const pct = Math.min(100, (n / 51) * 100);
days.textContent = String(n);
reading.textContent = sentence(n);
if (narrow.matches) {
pin.style.top = '50%';
pin.style.left = pct + '%';
} else {
pin.style.top = '50%';
pin.style.left = pct + '%';
}
}
dwell.addEventListener('input', paint);
narrow.addEventListener('change', paint);
paint();
const targets = document.querySelectorAll('[data-reveal]');
if ('IntersectionObserver' in window) {
const io = new IntersectionObserver((entries) => {
entries.forEach((entry) => {
if (!entry.isIntersecting) return;
entry.target.classList.add('is-in');
io.unobserve(entry.target);
});
}, { rootMargin: '0px 0px -8% 0px', threshold: 0.12 });
targets.forEach((el) => io.observe(el));
} else {
targets.forEach((el) => el.classList.add('is-in'));
}
</script>
</body>
</html>