feat(web): Pressing Plant component library + describeJob
design.css component classes (masthead, contents nav, tiles, dept header, job row + severity stripe, status chip, progress bar, pressed list, buttons, fields). Presentational _ui components. describeJob maps worker Job.state to literal labels + severity kind + stepped progress (unit-tested). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,171 @@
|
||||
/* Lyra — "Pressing Plant" component classes. Styled through tokens (globals.css). */
|
||||
|
||||
/* ── Masthead ─────────────────────────────────────────── */
|
||||
.masthead {
|
||||
display: flex; align-items: flex-end; justify-content: space-between;
|
||||
gap: 20px; flex-wrap: wrap; padding: 40px 0 18px;
|
||||
}
|
||||
.wordmark { display: flex; align-items: baseline; gap: 16px; }
|
||||
.wordmark h1 {
|
||||
margin: 0; font-weight: 600; letter-spacing: -0.02em;
|
||||
font-size: clamp(2.6rem, 6vw, 3.7rem); line-height: 0.9;
|
||||
}
|
||||
.wordmark a { color: inherit; text-decoration: none; }
|
||||
.tagline {
|
||||
font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.14em;
|
||||
text-transform: uppercase; color: var(--graphite); max-width: 15ch; line-height: 1.5;
|
||||
}
|
||||
.press-status {
|
||||
display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
|
||||
font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em;
|
||||
text-transform: uppercase; color: var(--graphite); text-align: right; line-height: 1.7;
|
||||
}
|
||||
.press-status .catalog { color: var(--ink); letter-spacing: 0.18em; }
|
||||
.live-dot {
|
||||
display: inline-block; width: 7px; height: 7px; border-radius: 50%;
|
||||
background: var(--accent); margin-right: 6px; vertical-align: middle;
|
||||
animation: lyra-pulse 2.4s ease-out infinite;
|
||||
}
|
||||
@keyframes lyra-pulse {
|
||||
0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); }
|
||||
70% { box-shadow: 0 0 0 7px transparent; }
|
||||
100% { box-shadow: 0 0 0 0 transparent; }
|
||||
}
|
||||
|
||||
/* ── Contents-bar nav ─────────────────────────────────── */
|
||||
nav.contents {
|
||||
display: flex; gap: 26px; align-items: center; flex-wrap: wrap;
|
||||
border-top: 1.5px solid var(--rule-2); border-bottom: 1px solid var(--rule);
|
||||
padding: 11px 0; margin-bottom: 34px;
|
||||
font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase;
|
||||
}
|
||||
nav.contents a { color: var(--graphite); text-decoration: none; position: relative; padding: 2px 0; }
|
||||
nav.contents a:hover { color: var(--ink); }
|
||||
nav.contents a.here { color: var(--ink); }
|
||||
nav.contents a.here::after {
|
||||
content: ""; position: absolute; left: 0; right: 0; bottom: -12px; height: 2px; background: var(--accent);
|
||||
}
|
||||
nav.contents .sep { flex: 1; }
|
||||
|
||||
/* ── Summary tiles ────────────────────────────────────── */
|
||||
.tiles {
|
||||
display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
|
||||
background: var(--rule); border: 1px solid var(--rule); margin-bottom: 44px;
|
||||
}
|
||||
.tile { background: var(--paper); padding: 16px 18px 18px; }
|
||||
.tile .k {
|
||||
font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.16em;
|
||||
text-transform: uppercase; color: var(--graphite);
|
||||
}
|
||||
.tile .v {
|
||||
font-size: 2.5rem; line-height: 1; margin-top: 12px;
|
||||
font-variant-numeric: tabular-nums; letter-spacing: -0.02em;
|
||||
}
|
||||
.tile .v small { font-size: 0.8rem; font-family: var(--mono); color: var(--graphite); letter-spacing: 0.06em; margin-left: 4px; }
|
||||
.tile.accent .v { color: var(--accent); }
|
||||
|
||||
/* ── Section (dept) header ────────────────────────────── */
|
||||
.dept { display: flex; align-items: baseline; gap: 14px; margin: 0 0 4px; }
|
||||
.dept h2 {
|
||||
margin: 0; font-family: var(--mono); font-weight: 500; font-size: 0.78rem;
|
||||
letter-spacing: 0.22em; text-transform: uppercase;
|
||||
}
|
||||
.dept .count { font-family: var(--mono); font-size: 0.72rem; color: var(--graphite); letter-spacing: 0.1em; }
|
||||
.dept .fill { flex: 1; border-bottom: 1px solid var(--rule); transform: translateY(-3px); }
|
||||
|
||||
/* ── Job rows (the pressing floor) ────────────────────── */
|
||||
.floor { margin: 0 0 52px; }
|
||||
.job {
|
||||
display: grid; grid-template-columns: 4px 1fr auto; gap: 0 20px;
|
||||
align-items: start; padding: 20px 0 18px; border-bottom: 1px solid var(--rule);
|
||||
}
|
||||
.job .stripe { width: 4px; align-self: stretch; background: var(--graphite); }
|
||||
.job.working .stripe { background: var(--live); }
|
||||
.job.verify .stripe { background: var(--accent); }
|
||||
.job.attention .stripe { background: var(--alert); }
|
||||
.job .title { font-size: 1.42rem; line-height: 1.15; letter-spacing: -0.01em; margin: -3px 0 0; text-wrap: balance; }
|
||||
.job .title .artist { color: var(--graphite); }
|
||||
.job .meta {
|
||||
font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.06em; color: var(--graphite);
|
||||
text-transform: uppercase; margin-top: 9px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center;
|
||||
}
|
||||
.job .meta .dot { opacity: 0.5; }
|
||||
.job .note { grid-column: 2 / 3; margin-top: 12px; font-size: 0.98rem; color: var(--ink); }
|
||||
.job .note a { color: var(--accent); }
|
||||
|
||||
/* ── Progress bar ─────────────────────────────────────── */
|
||||
.prog { grid-column: 2 / 3; margin-top: 14px; display: flex; align-items: center; gap: 12px; }
|
||||
.bar { flex: 1; height: 3px; background: var(--rule); position: relative; overflow: hidden; }
|
||||
.bar > span { position: absolute; inset: 0 auto 0 0; background: var(--live); }
|
||||
.job.verify .bar > span, .job.done .bar > span { background: var(--accent); }
|
||||
.bar.indet > span { width: 34%; animation: lyra-slide 1.6s ease-in-out infinite; }
|
||||
@keyframes lyra-slide { 0% { left: -34%; } 100% { left: 100%; } }
|
||||
.pct {
|
||||
font-family: var(--mono); font-size: 0.72rem; color: var(--ink);
|
||||
font-variant-numeric: tabular-nums; min-width: 3.4em; text-align: right;
|
||||
}
|
||||
.pct.muted { color: var(--graphite); }
|
||||
|
||||
/* ── Status chip ──────────────────────────────────────── */
|
||||
.chip {
|
||||
font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase;
|
||||
padding: 5px 9px; white-space: nowrap; border: 1px solid var(--rule-2); color: var(--graphite); align-self: start;
|
||||
}
|
||||
.chip.working { color: var(--live); border-color: color-mix(in srgb, var(--live) 45%, var(--rule)); }
|
||||
.chip.verify, .chip.done { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, var(--rule)); }
|
||||
.chip.attention {
|
||||
color: var(--alert); border-color: color-mix(in srgb, var(--alert) 50%, var(--rule));
|
||||
background: color-mix(in srgb, var(--alert) 8%, transparent);
|
||||
}
|
||||
|
||||
/* ── Recently pressed (deadwax etch list) ─────────────── */
|
||||
.pressed { list-style: none; margin: 0; padding: 0; }
|
||||
.pressed li { display: flex; align-items: baseline; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
|
||||
.pressed .mark { color: var(--accent); font-family: var(--mono); font-size: 0.8rem; }
|
||||
.pressed .name { font-size: 1.08rem; }
|
||||
.pressed .name .artist { color: var(--graphite); }
|
||||
.pressed .matrix {
|
||||
margin-left: auto; font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.18em;
|
||||
color: var(--graphite); text-transform: uppercase;
|
||||
}
|
||||
|
||||
/* ── Empty state ──────────────────────────────────────── */
|
||||
.empty {
|
||||
padding: 28px 0 32px; color: var(--graphite); font-size: 1.05rem; line-height: 1.6; max-width: 46ch;
|
||||
}
|
||||
|
||||
/* ── Buttons + fields ─────────────────────────────────── */
|
||||
.btn {
|
||||
font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase;
|
||||
padding: 9px 16px; border: 1.5px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer;
|
||||
}
|
||||
.btn:hover { background: var(--ink); color: var(--paper); }
|
||||
.btn.accent { border-color: var(--accent); color: var(--accent); }
|
||||
.btn.accent:hover { background: var(--accent); color: var(--accent-ink); }
|
||||
.btn:disabled { opacity: 0.45; cursor: default; }
|
||||
.btn:disabled:hover { background: transparent; color: var(--ink); }
|
||||
|
||||
.request-form { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; margin: 22px 0 30px; }
|
||||
.field { display: flex; flex-direction: column; gap: 6px; }
|
||||
.field > span {
|
||||
font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--graphite);
|
||||
}
|
||||
.field input {
|
||||
font-family: var(--mono); font-size: 0.9rem; padding: 8px 2px; background: transparent;
|
||||
border: 0; border-bottom: 1.5px solid var(--rule-2); color: var(--ink); min-width: 200px;
|
||||
}
|
||||
.field input::placeholder { color: var(--graphite); opacity: 0.6; }
|
||||
.field input:focus { outline: none; border-bottom-color: var(--accent); }
|
||||
|
||||
/* ── Colophon ─────────────────────────────────────────── */
|
||||
.colophon {
|
||||
margin-top: 40px; font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.12em;
|
||||
text-transform: uppercase; color: var(--graphite); display: flex; justify-content: space-between;
|
||||
border-top: 1.5px solid var(--rule-2); padding-top: 14px; flex-wrap: wrap; gap: 10px;
|
||||
}
|
||||
|
||||
@media (max-width: 620px) {
|
||||
.tiles { grid-template-columns: repeat(2, 1fr); }
|
||||
.job { grid-template-columns: 4px 1fr; }
|
||||
.job .chip { grid-column: 2 / 3; justify-self: start; margin-top: 12px; }
|
||||
}
|
||||
Reference in New Issue
Block a user