Skip to content

Commit e54e0b1

Browse files
committed
Pipeline: full-height strip, expand on hover, dim others, no instructions
1 parent 13a7fcb commit e54e0b1

File tree

2 files changed

+77
-93
lines changed

2 files changed

+77
-93
lines changed

src/pages/index.module.css

Lines changed: 57 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -326,115 +326,108 @@
326326
/* ── PIPELINE ────────────────────────────────────────────────── */
327327

328328
.pipeline {
329-
padding: 6rem 0 4rem;
330329
background: #000;
331-
}
332-
333-
.pipeInner {
334-
max-width: 1100px;
335-
margin: 0 auto;
336-
padding: 0 2rem;
337-
}
338-
339-
.pipeTitle {
340-
font-size: clamp(1.8rem, 4vw, 2.5rem);
341-
font-weight: 700;
342-
letter-spacing: -0.03em;
343-
margin: 0 0 0.5rem;
344-
}
345-
346-
.pipeSub {
347-
font-size: 0.95rem;
348-
color: rgba(255, 255, 255, 0.35);
349-
margin: 0 0 3rem;
330+
padding: 0;
350331
}
351332

352333
.strip {
353334
display: flex;
354335
width: 100%;
355-
height: 80px;
336+
min-height: 220px;
356337
}
357338

358339
.cell {
359340
flex: 1;
360341
display: flex;
361-
align-items: center;
342+
align-items: flex-end;
362343
justify-content: center;
363-
transition: all 0.3s ease;
344+
padding: 1.5rem 0.5rem;
345+
background: var(--cell-bg);
364346
text-decoration: none;
365347
color: #fff;
366348
position: relative;
367349
cursor: pointer;
368350
overflow: hidden;
351+
transition: flex 0.5s cubic-bezier(0.16, 1, 0.3, 1);
369352
}
370353

371-
.cell:first-child {
372-
border-radius: 0;
373-
}
374-
375-
.cell:last-child {
376-
border-radius: 0;
354+
.cell::before {
355+
content: '';
356+
position: absolute;
357+
inset: 0;
358+
background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.4) 100%);
359+
transition: opacity 0.4s;
377360
}
378361

379362
.cell:hover {
380363
text-decoration: none;
381364
color: #fff;
382365
}
383366

384-
.cellLabel {
385-
font-size: 0.65rem;
386-
font-weight: 600;
387-
letter-spacing: 0.08em;
388-
text-transform: uppercase;
389-
opacity: 0;
390-
transition: opacity 0.2s;
391-
white-space: nowrap;
367+
.cellActive {
368+
flex: 4;
392369
}
393370

394-
.cell:hover .cellLabel,
395-
.cellActive .cellLabel {
396-
opacity: 1;
371+
.cellActive::before {
372+
opacity: 0.3;
397373
}
398374

399-
.cellActive {
400-
flex: 3;
375+
.cellDim {
376+
filter: brightness(0.6);
401377
}
402378

403-
.pipeDetail {
404-
max-width: 1100px;
405-
margin: 0 auto;
406-
padding: 2rem 2rem 0;
407-
min-height: 80px;
379+
.cellContent {
380+
position: relative;
381+
z-index: 1;
408382
display: flex;
383+
flex-direction: column;
409384
align-items: center;
410-
gap: 1.5rem;
385+
gap: 0.3rem;
386+
transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
411387
}
412388

413-
.pipeDetailNum {
414-
font-size: 2.5rem;
415-
font-weight: 800;
416-
color: rgba(255, 255, 255, 0.06);
417-
letter-spacing: -0.03em;
389+
.cellNum {
390+
font-size: 0.6rem;
391+
font-weight: 600;
392+
letter-spacing: 0.15em;
393+
opacity: 0;
394+
color: rgba(255, 255, 255, 0.3);
418395
font-variant-numeric: tabular-nums;
419-
line-height: 1;
396+
transition: all 0.3s;
397+
transform: translateY(8px);
420398
}
421399

422-
.pipeDetail h3 {
423-
font-size: 1.1rem;
400+
.cellActive .cellNum {
401+
opacity: 1;
402+
transform: translateY(0);
403+
}
404+
405+
.cellName {
406+
font-size: 0.7rem;
424407
font-weight: 700;
425-
margin: 0 0 0.2rem;
408+
letter-spacing: 0.06em;
409+
text-transform: uppercase;
410+
white-space: nowrap;
411+
transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
426412
}
427413

428-
.pipeDetail p {
429-
font-size: 0.88rem;
414+
.cellActive .cellName {
415+
font-size: 1.1rem;
416+
letter-spacing: 0.02em;
417+
}
418+
419+
.cellSub {
420+
font-size: 0.72rem;
430421
color: rgba(255, 255, 255, 0.4);
431-
margin: 0;
422+
opacity: 0;
423+
transition: all 0.3s;
424+
transform: translateY(6px);
425+
white-space: nowrap;
432426
}
433427

434-
.pipeHint {
435-
font-size: 0.82rem;
436-
color: rgba(255, 255, 255, 0.15);
437-
margin: 0;
428+
.cellActive .cellSub {
429+
opacity: 1;
430+
transform: translateY(0);
438431
}
439432

440433
/* ── DOCS ────────────────────────────────────────────────────── */

src/pages/index.tsx

Lines changed: 20 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -148,52 +148,43 @@ function Docs() {
148148
/* ── PIPELINE ─────────────────────────────────────────────────── */
149149

150150
const pipeline = [
151-
{ color: '#0a1628', label: 'Network', detail: 'TCP connect, mux framing, handshake v13/v14', link: '/docs/architecture/network' },
152-
{ color: '#0c1f3d', label: 'ChainSync', detail: 'Header streaming, intersection, rollback handling', link: '/docs/spec/networking' },
153-
{ color: '#0e2854', label: 'BlockFetch', detail: 'Range requests, batch retrieval, era-tagged blocks', link: '/docs/spec/networking' },
154-
{ color: '#10326b', label: 'Decode', detail: 'CBOR schema, byte-preserving walk, ConwayBlock', link: '/docs/architecture/codec' },
155-
{ color: '#133d82', label: 'Consensus', detail: 'VRF proof, KES sig, leader check, nonce evolution', link: '/docs/spec/consensus' },
156-
{ color: '#164899', label: 'Validate', detail: '19 UTxO rules, witness sigs, script data hash', link: '/docs/spec/transactions' },
157-
{ color: '#1953b0', label: 'Plutus', detail: 'V1/V2/V3 CEK eval, ScriptContext, cost models', link: '/docs/spec/scripts' },
158-
{ color: '#1c5ec7', label: 'Apply', detail: 'Consume inputs, add outputs, collect fees, certs', link: '/docs/spec/ledger-state' },
159-
{ color: '#2069de', label: 'Epoch', detail: 'Rewards, pool retirement, snapshot rotation', link: '/docs/spec/epoch' },
160-
{ color: '#2575f5', label: 'Storage', detail: 'VolatileDB, ImmutableDB, LedgerDB checkpoints', link: '/docs/spec/storage' },
151+
{ color: '#081020', accent: '#1a3060', label: 'Network', sub: 'TCP + Mux', link: '/docs/architecture/network' },
152+
{ color: '#0a1630', accent: '#1e3d70', label: 'ChainSync', sub: 'Headers', link: '/docs/spec/networking' },
153+
{ color: '#0d1d40', accent: '#224a80', label: 'BlockFetch', sub: 'Bodies', link: '/docs/spec/networking' },
154+
{ color: '#102550', accent: '#285890', label: 'Decode', sub: 'CBOR', link: '/docs/architecture/codec' },
155+
{ color: '#132d60', accent: '#2e66a0', label: 'Consensus', sub: 'VRF + KES', link: '/docs/spec/consensus' },
156+
{ color: '#163670', accent: '#3574b0', label: 'Validate', sub: '19 Rules', link: '/docs/spec/transactions' },
157+
{ color: '#1a3f80', accent: '#3c82c0', label: 'Plutus', sub: 'CEK Machine', link: '/docs/spec/scripts' },
158+
{ color: '#1e4890', accent: '#4490d0', label: 'Apply', sub: 'State Update', link: '/docs/spec/ledger-state' },
159+
{ color: '#2252a0', accent: '#4c9ee0', label: 'Epoch', sub: 'Rewards', link: '/docs/spec/epoch' },
160+
{ color: '#265cb0', accent: '#55acf0', label: 'Storage', sub: 'Persist', link: '/docs/spec/storage' },
161161
];
162162

163163
function Pipeline() {
164164
const [active, setActive] = React.useState<number | null>(null);
165165
return (
166166
<section className={styles.pipeline}>
167-
<div className={styles.pipeInner}>
168-
<p className={styles.tag}>BLOCK PIPELINE</p>
169-
<h2 className={styles.pipeTitle}>From TCP byte to ledger state.</h2>
170-
<p className={styles.pipeSub}>Every block flows through 10 stages. Hover to explore each module.</p>
171-
</div>
172167
<div className={styles.strip}>
173168
{pipeline.map((p, i) => (
174169
<Link
175170
key={p.label}
176171
to={useBaseUrl(p.link)}
177-
className={`${styles.cell} ${active === i ? styles.cellActive : ''}`}
178-
style={{ background: p.color }}
172+
className={`${styles.cell} ${active === i ? styles.cellActive : ''} ${active !== null && active !== i ? styles.cellDim : ''}`}
173+
style={{
174+
'--cell-bg': p.color,
175+
'--cell-accent': p.accent,
176+
} as React.CSSProperties}
179177
onMouseEnter={() => setActive(i)}
180178
onMouseLeave={() => setActive(null)}
181179
>
182-
<span className={styles.cellLabel}>{p.label}</span>
180+
<div className={styles.cellContent}>
181+
<span className={styles.cellNum}>{String(i + 1).padStart(2, '0')}</span>
182+
<span className={styles.cellName}>{p.label}</span>
183+
<span className={styles.cellSub}>{p.sub}</span>
184+
</div>
183185
</Link>
184186
))}
185187
</div>
186-
<div className={styles.pipeDetail}>
187-
{active !== null ? (
188-
<>
189-
<span className={styles.pipeDetailNum}>0{active + 1}</span>
190-
<h3>{pipeline[active].label}</h3>
191-
<p>{pipeline[active].detail}</p>
192-
</>
193-
) : (
194-
<p className={styles.pipeHint}>Hover a stage above</p>
195-
)}
196-
</div>
197188
</section>
198189
);
199190
}

0 commit comments

Comments
 (0)