Add Reference route, clean up gitignore, update mock firmware version, and refactor gallery frames into reusable component
Add Reference route with modal overlay accessible from Overview. Update .gitignore to consolidate reference/ and .claude/ exclusions. Change mock firmware version to 0.1.0-alpha. Remove unused scrubber_ts from UI state and store methods. Extract gallery frame rendering into GalleryFrame component with FrameSpec interface. Add chamber label cards above twin visualization showing
This commit is contained in:
1 parent
ccea0bf25a
commit
edf696f3ce
19 files changed
+2301
-724
No files matched your search
+202
-248
@@ -2,6 +2,7 @@
|
||||
import { cultivar } from '../store.svelte';
|
||||
import type { Chamber, BagState } from '../types';
|
||||
import FruitCluster from './FruitCluster.svelte';
|
||||
import GalleryFrame, { type FrameSpec } from './GalleryFrame.svelte';
|
||||
import { profileFor, imageFor } from './species';
|
||||
|
||||
interface Props {
|
||||
@@ -46,12 +47,11 @@
|
||||
|
||||
// Fill remaining slots with the beloved generic illustrations
|
||||
const generics = [
|
||||
{ strain: 'Family portrait', src: '/img/illustration.webp', slotId: 'est. the Proterozoic', isGeneric: true },
|
||||
{ strain: 'The boys', src: '/img/illustration_oysters.webp', slotId: 'oil on canvas · 2024', isGeneric: true },
|
||||
{ strain: 'Mycelial dreams', src: '/img/illustration_mycelium.webp', slotId: 'acrylic on canvas · 2025', isGeneric: true },
|
||||
{ strain: 'Fungi friends', src: '/img/illustration_mycelium.webp', slotId: 'watercolor · 2025', isGeneric: true },
|
||||
{ strain: 'Spore sisters', src: '/img/illustration_mycelium.webp', slotId: 'mixed media · 2025', isGeneric: true },
|
||||
{ strain: 'Hyphal harmony', src: '/img/illustration_mycelium.webp', slotId: 'digital art · 2025', isGeneric: true },
|
||||
{ strain: 'Family Portrait', src: '/img/illustration.webp', slotId: 'est. the Proterozoic', isGeneric: true },
|
||||
{ strain: 'The Boys', src: '/img/illustration_oysters.webp', slotId: 'oil on canvas · 2024', isGeneric: true },
|
||||
{ strain: 'Mycelial Dreams', src: '/img/illustration_mycelium.webp', slotId: 'acrylic on canvas · 2025', isGeneric: true },
|
||||
{ strain: 'Fungi Friends', src: '/img/illustration_mycelium.webp', slotId: 'watercolor · 2025', isGeneric: true },
|
||||
{ strain: 'Spore Sisters', src: '/img/illustration_mycelium.webp', slotId: 'mixed media · 2025', isGeneric: true },
|
||||
];
|
||||
|
||||
for (const gen of generics) {
|
||||
@@ -62,6 +62,87 @@
|
||||
return images;
|
||||
});
|
||||
|
||||
// ── Wall-gallery frames ─────────────────────────────────────────
|
||||
// One factory per physical frame on the wall. Each receives the
|
||||
// gallery entry in its slot (if any) and produces a FrameSpec for
|
||||
// <GalleryFrame>. Leaving the geometry hand-tuned — the frames are
|
||||
// meant to feel placed, not generated.
|
||||
type GalleryEntry = { strain: string; src: string; slotId: string; isGeneric?: boolean };
|
||||
|
||||
function placard(s: GalleryEntry): string {
|
||||
return s.isGeneric ? s.slotId : `Slot ${s.slotId}`;
|
||||
}
|
||||
|
||||
// Frame factories — indexed by position on the wall. `null` slots
|
||||
// belong to hand-authored frames (e.g. the "Welcome home" tapestry at
|
||||
// index 2) that stay inline in the template.
|
||||
const frameFactories: Array<((s: GalleryEntry) => FrameSpec) | null> = [
|
||||
// 1 · left wall, lower — dark walnut
|
||||
(s) => ({
|
||||
tx: -12, ty: 168, rotate: -3.5,
|
||||
frame: { x: -21, y: -34, w: 42, h: 60, fill: '#4a3a24' },
|
||||
liner: { stroke: '#7a5f3d', opacity: 0.8 },
|
||||
mat: { fill: '#f3e9ce' },
|
||||
image: { href: s.src, x: -16, y: -29, w: 32, h: 44 },
|
||||
placard: { x: -16, y: 30, w: 32, h: 11 },
|
||||
title: { text: s.strain, y: 35, size: 4.2 },
|
||||
subtitle: { text: placard(s), y: 39.2, size: 3 },
|
||||
}),
|
||||
// 2 · right wall, upper — gold
|
||||
(s) => ({
|
||||
tx: 490, ty: 65, rotate: 2.5,
|
||||
frame: { x: -18, y: -26, w: 36, h: 46, fill: '#8a6f3a', stroke: '#5a461e' },
|
||||
liner: { stroke: '#c2a55a', opacity: 0.75 },
|
||||
mat: { fill: '#fef7e4' },
|
||||
image: { href: s.src, x: -13.5, y: -21.5, w: 27, h: 32 },
|
||||
placard: { x: -14, y: 24, w: 28, h: 10.5, fill: '#f3ead0', stroke: '#a89466' },
|
||||
title: { text: s.strain, y: 28.8, size: 4.2 },
|
||||
subtitle: { text: placard(s), y: 32.8, size: 2.9 },
|
||||
}),
|
||||
// (frame 3 is hand-authored — the "Welcome home" tapestry — see template)
|
||||
null,
|
||||
// 4 · left wall, upper — mid-brown
|
||||
(s) => ({
|
||||
tx: -8, ty: 68, rotate: 0,
|
||||
frame: { x: -19, y: -30, w: 38, h: 52, fill: '#5a4632' },
|
||||
liner: { stroke: '#8a6f4a', opacity: 0.75 },
|
||||
mat: { fill: '#f4ebd1' },
|
||||
image: { href: s.src, x: -14, y: -25, w: 28, h: 38 },
|
||||
placard: { x: -14, y: 26, w: 28, h: 10, fill: '#f0e5c8' },
|
||||
title: { text: s.strain, y: 30, size: 4 },
|
||||
subtitle: { text: placard(s), y: 34, size: 2.8 },
|
||||
}),
|
||||
// 5 · left wall, bottom — warm brown
|
||||
(s) => ({
|
||||
tx: -12, ty: 260, rotate: 0.2,
|
||||
frame: { x: -20, y: -28, w: 40, h: 50, fill: '#6b5438' },
|
||||
liner: { stroke: '#9a7f58', opacity: 0.7 },
|
||||
mat: { fill: '#f8f0da' },
|
||||
image: { href: s.src, x: -15, y: -23, w: 30, h: 36 },
|
||||
placard: { x: -15, y: 27, w: 30, h: 10.5, fill: '#f3e8cc' },
|
||||
title: { text: s.strain, y: 31.2, size: 4.1 },
|
||||
subtitle: { text: placard(s), y: 35.2, size: 2.9 },
|
||||
}),
|
||||
// 6 · right wall, middle — large gold
|
||||
(s) => ({
|
||||
tx: 490, ty: 142, rotate: -2,
|
||||
frame: { x: -22.5, y: -22, w: 45, h: 57, fill: '#7a5f3d' },
|
||||
liner: { stroke: '#b09870', opacity: 0.7 },
|
||||
mat: { fill: '#fef9e8' },
|
||||
image: { href: s.src, x: -18, y: -17.5, w: 36, h: 47 },
|
||||
placard: { x: -20, y: 38, w: 40, h: 10, fill: '#f4ebd1', stroke: '#a89466' },
|
||||
title: { text: s.strain, y: 42.5, size: 5 },
|
||||
subtitle: { text: placard(s), y: 46.5, size: 3.5 },
|
||||
}),
|
||||
];
|
||||
|
||||
const galleryFrames = $derived(
|
||||
frameFactories.map((make, i) => {
|
||||
const entry = gallerySpecies[i];
|
||||
return make && entry ? make(entry) : null;
|
||||
})
|
||||
);
|
||||
|
||||
// Two fans — one per compartment, used for fresh-air exchange
|
||||
const colFan = $derived(hw.fans.find(f => f.chamber_id === 'main') ?? hw.fans[0] ?? { speed_pct: 0 });
|
||||
const fruitFan = $derived(hw.fans.find(f => f.chamber_id === 'second') ?? hw.fans[1] ?? { speed_pct: 0 });
|
||||
@@ -207,6 +288,27 @@
|
||||
</script>
|
||||
|
||||
<div class="twin-wrap">
|
||||
<div class="labels">
|
||||
<div class="label-card">
|
||||
<div class="lc-kicker">Colonization</div>
|
||||
<div class="lc-meta">
|
||||
<span class="lc-count">{occupiedCol}<span class="lc-total">/{totalCol}</span></span>
|
||||
<span class="lc-sep">·</span>
|
||||
<span class="lc-desc">{occupiedCol === 1 ? 'bag' : 'bags'} colonizing</span>
|
||||
</div>
|
||||
<div class="lc-poem font-serif italic">An underground forest floor.</div>
|
||||
</div>
|
||||
|
||||
<div class="label-card right">
|
||||
<div class="lc-kicker">Fruiting</div>
|
||||
<div class="lc-meta">
|
||||
<span class="lc-count">{occupiedFruit}<span class="lc-total">/{totalFruit}</span></span>
|
||||
<span class="lc-sep">·</span>
|
||||
<span class="lc-desc">{occupiedFruit === 1 ? 'bag' : 'bags'} fruiting</span>
|
||||
</div>
|
||||
<div class="lc-poem font-serif italic">A shaded grove after rain.</div>
|
||||
</div>
|
||||
</div>
|
||||
<svg
|
||||
class="appliance"
|
||||
viewBox="-48 -30 576 475"
|
||||
@@ -214,14 +316,6 @@
|
||||
aria-label="Your Cultivar — {occupiedCol + occupiedFruit} of {totalCol + totalFruit} bags growing"
|
||||
>
|
||||
<defs>
|
||||
<!-- ── Room atmosphere: a warm wall gradient behind the appliance ── -->
|
||||
<linearGradient id="room-wall" x1="0" y1="0" x2="0" y2="1">
|
||||
<stop offset="0%" stop-color="#f3ede0"/>
|
||||
<stop offset="45%" stop-color="#f6f1e5"/>
|
||||
<stop offset="85%" stop-color="#ece4d2"/>
|
||||
<stop offset="100%" stop-color="#e2d8c1"/>
|
||||
</linearGradient>
|
||||
|
||||
<!-- Ambient ceiling spotlight overhead of the appliance -->
|
||||
<radialGradient id="room-spot" cx="50%" cy="0%" r="75%">
|
||||
<stop offset="0%" stop-color="#fff7e2" stop-opacity="0.75"/>
|
||||
@@ -254,12 +348,6 @@
|
||||
<stop offset="0%" stop-color="#fff"/>
|
||||
<stop offset="100%" stop-color="#fff"/>
|
||||
</linearGradient>
|
||||
|
||||
<linearGradient id="glass-shine" x1="0" y1="0" x2="0" y2="1">
|
||||
<stop offset="0%" stop-color="#ffffff" stop-opacity="0.16"/>
|
||||
<stop offset="22%" stop-color="#ffffff" stop-opacity="0.04"/>
|
||||
<stop offset="100%" stop-color="#ffffff" stop-opacity="0"/>
|
||||
</linearGradient>
|
||||
|
||||
<radialGradient id="col-led" cx="50%" cy="0%" r="120%" fy="0%">
|
||||
<stop offset="0%" stop-color={colLedColor} stop-opacity={colLedOpacity * 0.9}/>
|
||||
@@ -306,7 +394,7 @@
|
||||
</feMerge>
|
||||
</filter>
|
||||
|
||||
<!-- Mercedes-style bloom for the door-ajar light spill -->
|
||||
<!-- Bloom for the door-ajar light spill -->
|
||||
<filter id="ajar-bloom" x="-50%" y="-50%" width="200%" height="200%">
|
||||
<feGaussianBlur in="SourceGraphic" stdDeviation="2.4"/>
|
||||
</filter>
|
||||
@@ -391,8 +479,8 @@
|
||||
</clipPath>
|
||||
</defs>
|
||||
|
||||
<!-- ─── Room backdrop: gives the appliance a sense of place ─── -->
|
||||
<rect x="-960" y="10" width="1920px" height="415" fill="url(#room-wall)"/>
|
||||
<!-- Room backdrop is now rendered as a full-width CSS layer in the
|
||||
HTML above; no SVG rect needed here. -->
|
||||
|
||||
<!-- ─── Back-wall gallery: tilted frames + museum placards ───
|
||||
Sits behind the appliance so the frames feel hung on the
|
||||
@@ -400,161 +488,39 @@
|
||||
Displays up to 3 unique species currently growing. -->
|
||||
<g class="wall-gallery" aria-hidden="true" pointer-events="none">
|
||||
|
||||
{#if gallerySpecies[0]}
|
||||
<!-- Frame 1 · LEFT wall — species portrait #1 -->
|
||||
{@const s1 = gallerySpecies[0]}
|
||||
<g transform="translate(-12, 188) rotate(-3.5)">
|
||||
<rect x="-21" y="-34" width="42" height="60" rx="0.6"
|
||||
fill="#000" opacity="0.25" transform="translate(1.8, 2.2)"/>
|
||||
<rect x="-21" y="-34" width="42" height="60" rx="0.8"
|
||||
fill="#4a3a24" stroke="#2a1f12" stroke-width="0.3"/>
|
||||
<rect x="-19.5" y="-32.5" width="39" height="57" rx="0.5"
|
||||
fill="none" stroke="#7a5f3d" stroke-width="0.35" opacity="0.8"/>
|
||||
<rect x="-18" y="-31" width="36" height="54" fill="#f3e9ce"/>
|
||||
<image href={s1.src}
|
||||
x="-16" y="-29" width="32" height="44"
|
||||
preserveAspectRatio="xMidYMid slice"/>
|
||||
<rect x="-16" y="-29" width="32" height="44"
|
||||
fill="none" stroke="#2a1f12" stroke-width="0.3" opacity="0.3"/>
|
||||
<rect x="-16" y="30" width="32" height="11" rx="0.5"
|
||||
fill="#ebe0c2" stroke="#9d8b61" stroke-width="0.2"/>
|
||||
<text x="0" y="35" text-anchor="middle" fill="#2f2615"
|
||||
style="font-size: 4.2px; font-family: 'DM Serif Display', Georgia, serif;">{s1.strain}</text>
|
||||
<text x="0" y="39.2" text-anchor="middle" fill="#8a7650"
|
||||
style="font-size: 3px; font-style: italic; font-family: 'DM Sans', sans-serif;">{s1.isGeneric ? s1.slotId : `Slot ${s1.slotId}`}</text>
|
||||
</g>
|
||||
{/if}
|
||||
<!-- Species-portrait frames (geometry in frameFactories above) -->
|
||||
{#each galleryFrames as frame, i (i)}
|
||||
{#if frame}
|
||||
<GalleryFrame spec={frame} />
|
||||
{/if}
|
||||
{/each}
|
||||
|
||||
{#if gallerySpecies[1]}
|
||||
<!-- Frame 2 · RIGHT wall top — species portrait #2 -->
|
||||
{@const s2 = gallerySpecies[1]}
|
||||
<g transform="translate(493, 108) rotate(4.5)">
|
||||
<rect x="-18" y="-26" width="36" height="46" rx="0.6"
|
||||
fill="#000" opacity="0.22" transform="translate(1.5, 2)"/>
|
||||
<rect x="-18" y="-26" width="36" height="46" rx="0.8"
|
||||
fill="#8a6f3a" stroke="#5a461e" stroke-width="0.3"/>
|
||||
<rect x="-16.5" y="-24.5" width="33" height="43" rx="0.5"
|
||||
fill="none" stroke="#c2a55a" stroke-width="0.35" opacity="0.75"/>
|
||||
<rect x="-15" y="-23" width="30" height="40" fill="#fef7e4"/>
|
||||
<image href={s2.src}
|
||||
x="-13.5" y="-21.5" width="27" height="32"
|
||||
preserveAspectRatio="xMidYMid slice"/>
|
||||
<rect x="-13.5" y="-21.5" width="27" height="32"
|
||||
fill="none" stroke="#5a461e" stroke-width="0.25" opacity="0.3"/>
|
||||
<rect x="-14" y="24" width="28" height="10.5" rx="0.5"
|
||||
fill="#f3ead0" stroke="#a89466" stroke-width="0.2"/>
|
||||
<text x="0" y="28.8" text-anchor="middle" fill="#2f2615"
|
||||
style="font-size: 4.2px; font-family: 'DM Serif Display', Georgia, serif;">{s2.strain}</text>
|
||||
<text x="0" y="32.8" text-anchor="middle" fill="#8a7650"
|
||||
style="font-size: 2.9px; font-style: italic; font-family: 'DM Sans', sans-serif;">{s2.isGeneric ? s2.slotId : `Slot ${s2.slotId}`}</text>
|
||||
</g>
|
||||
{/if}
|
||||
|
||||
<!-- Fallback when fewer than 3 species: show the classic "Live, Laugh, Lignify" -->
|
||||
<g transform="translate(492, 278) rotate(-2.5)">
|
||||
<rect x="-22" y="-30" width="44" height="50" rx="0.8"
|
||||
fill="#000" opacity="0.22" transform="translate(1.8, 2.4)"/>
|
||||
<rect x="-22" y="-30" width="44" height="50" rx="1"
|
||||
fill="#cbb592" stroke="#85714b" stroke-width="0.4"/>
|
||||
<rect x="-19" y="-27" width="38" height="44" fill="#fff8e7"/>
|
||||
<image href="/img/illustration_mycelium.webp"
|
||||
x="-19" y="-27" width="38" height="44"
|
||||
preserveAspectRatio="xMidYMid slice" opacity="0.85"/>
|
||||
<text x="0" y="-14" text-anchor="middle" fill="#fff"
|
||||
style="font-size: 6.5px; font-family: 'DM Serif Display', Georgia, serif;">Live</text>
|
||||
<text x="0" y="-6" text-anchor="middle" fill="#fff"
|
||||
style="font-size: 6.5px; font-family: 'DM Serif Display', Georgia, serif;">Laugh</text>
|
||||
<text x="0" y="3" text-anchor="middle" fill="#fff"
|
||||
style="font-size: 6.5px; font-family: 'DM Serif Display', Georgia, serif;">Lignify</text>
|
||||
<line x1="-7" y1="12" x2="7" y2="12" stroke="#b09870" stroke-width="0.4" opacity="0.7"/>
|
||||
<rect x="-19" y="22" width="40" height="12" rx="0.6"
|
||||
fill="#ece2c3" stroke="#a89466" stroke-width="0.25"/>
|
||||
<text x="1" y="27.5" text-anchor="middle" fill="#2f2615"
|
||||
style="font-size: 4.5px; font-family: 'DM Serif Display', Georgia, serif;">Welcome home</text>
|
||||
<text x="1" y="32" text-anchor="middle" fill="#8a7650"
|
||||
style="font-size: 3.4px; font-style: italic; font-family: 'DM Sans', sans-serif;">hand-stitched, probably</text>
|
||||
</g>
|
||||
|
||||
{#if gallerySpecies[3]}
|
||||
<!-- Frame 4 · LEFT wall top — species portrait #4 -->
|
||||
{@const s4 = gallerySpecies[3]}
|
||||
<g transform="translate(-8, 88) rotate(2.8)">
|
||||
<rect x="-19" y="-30" width="38" height="52" rx="0.6"
|
||||
fill="#000" opacity="0.23" transform="translate(1.6, 2)"/>
|
||||
<rect x="-19" y="-30" width="38" height="52" rx="0.8"
|
||||
fill="#5a4632" stroke="#2a1f12" stroke-width="0.3"/>
|
||||
<rect x="-17.5" y="-28.5" width="35" height="49" rx="0.5"
|
||||
fill="none" stroke="#8a6f4a" stroke-width="0.35" opacity="0.75"/>
|
||||
<rect x="-16" y="-27" width="32" height="46" fill="#f4ebd1"/>
|
||||
<image href={s4.src}
|
||||
x="-14" y="-25" width="28" height="38"
|
||||
preserveAspectRatio="xMidYMid slice"/>
|
||||
<rect x="-14" y="-25" width="28" height="38"
|
||||
fill="none" stroke="#2a1f12" stroke-width="0.3" opacity="0.3"/>
|
||||
<rect x="-14" y="26" width="28" height="10" rx="0.5"
|
||||
fill="#f0e5c8" stroke="#9d8b61" stroke-width="0.2"/>
|
||||
<text x="0" y="30" text-anchor="middle" fill="#2f2615"
|
||||
style="font-size: 4px; font-family: 'DM Serif Display', Georgia, serif;">{s4.strain}</text>
|
||||
<text x="0" y="34" text-anchor="middle" fill="#8a7650"
|
||||
style="font-size: 2.8px; font-style: italic; font-family: 'DM Sans', sans-serif;">{s4.isGeneric ? s4.slotId : `Slot ${s4.slotId}`}</text>
|
||||
</g>
|
||||
{/if}
|
||||
|
||||
{#if gallerySpecies[4]}
|
||||
<!-- Frame 5 · LEFT wall bottom — species portrait #5 -->
|
||||
{@const s5 = gallerySpecies[4]}
|
||||
<g transform="translate(-16, 300) rotate(4.2)">
|
||||
<rect x="-20" y="-28" width="40" height="50" rx="0.6"
|
||||
fill="#000" opacity="0.24" transform="translate(1.7, 2.1)"/>
|
||||
<rect x="-20" y="-28" width="40" height="50" rx="0.8"
|
||||
fill="#6b5438" stroke="#2a1f12" stroke-width="0.3"/>
|
||||
<rect x="-18.5" y="-26.5" width="37" height="47" rx="0.5"
|
||||
fill="none" stroke="#9a7f58" stroke-width="0.35" opacity="0.7"/>
|
||||
<rect x="-17" y="-25" width="34" height="44" fill="#f8f0da"/>
|
||||
<image href={s5.src}
|
||||
x="-15" y="-23" width="30" height="36"
|
||||
preserveAspectRatio="xMidYMid slice"/>
|
||||
<rect x="-15" y="-23" width="30" height="36"
|
||||
fill="none" stroke="#2a1f12" stroke-width="0.3" opacity="0.3"/>
|
||||
<rect x="-15" y="27" width="30" height="10.5" rx="0.5"
|
||||
fill="#f3e8cc" stroke="#9d8b61" stroke-width="0.2"/>
|
||||
<text x="0" y="31.2" text-anchor="middle" fill="#2f2615"
|
||||
style="font-size: 4.1px; font-family: 'DM Serif Display', Georgia, serif;">{s5.strain}</text>
|
||||
<text x="0" y="35.2" text-anchor="middle" fill="#8a7650"
|
||||
style="font-size: 2.9px; font-style: italic; font-family: 'DM Sans', sans-serif;">{s5.isGeneric ? s5.slotId : `Slot ${s5.slotId}`}</text>
|
||||
</g>
|
||||
{/if}
|
||||
|
||||
{#if gallerySpecies[5]}
|
||||
<!-- Frame 6 · RIGHT wall middle — species portrait #6 -->
|
||||
{@const s6 = gallerySpecies[5]}
|
||||
<g transform="translate(485, 198) rotate(3.8)">
|
||||
<rect x="-15" y="-22" width="30" height="38" rx="0.6"
|
||||
fill="#000" opacity="0.21" transform="translate(1.3, 1.8)"/>
|
||||
<rect x="-15" y="-22" width="30" height="38" rx="0.8"
|
||||
fill="#7a5f3d" stroke="#2a1f12" stroke-width="0.3"/>
|
||||
<rect x="-13.5" y="-20.5" width="27" height="35" rx="0.5"
|
||||
fill="none" stroke="#b09870" stroke-width="0.35" opacity="0.7"/>
|
||||
<rect x="-12" y="-19" width="24" height="32" fill="#fef9e8"/>
|
||||
<image href={s6.src}
|
||||
x="-10.5" y="-17.5" width="21" height="25"
|
||||
preserveAspectRatio="xMidYMid slice"/>
|
||||
<rect x="-10.5" y="-17.5" width="21" height="25"
|
||||
fill="none" stroke="#5a461e" stroke-width="0.25" opacity="0.3"/>
|
||||
<rect x="-15" y="18" width="30" height="9.5" rx="0.5"
|
||||
fill="#f4ebd1" stroke="#a89466" stroke-width="0.2"/>
|
||||
<text x="0" y="21.8" text-anchor="middle" fill="#2f2615"
|
||||
style="font-size: 3.6px; font-family: 'DM Serif Display', Georgia, serif;">{s6.strain}</text>
|
||||
<text x="0" y="25.3" text-anchor="middle" fill="#8a7650"
|
||||
style="font-size: 2.5px; font-style: italic; font-family: 'DM Sans', sans-serif;">{s6.isGeneric ? s6.slotId : `Slot ${s6.slotId}`}</text>
|
||||
</g>
|
||||
{/if}
|
||||
<!-- Frame 3 · "Welcome home" tapestry — unique layout, stays inline -->
|
||||
<g transform="translate(492, 252) rotate(3.4)">
|
||||
<rect x="-22" y="-30" width="44" height="50" rx="0.8"
|
||||
fill="#000" opacity="0.22" transform="translate(1.8, 2.4)"/>
|
||||
<rect x="-22" y="-30" width="44" height="50" rx="1"
|
||||
fill="#cbb592" stroke="#85714b" stroke-width="0.4"/>
|
||||
<rect x="-19" y="-27" width="38" height="44" fill="#fff8e7"/>
|
||||
<image href="/img/illustration_mycelium.webp"
|
||||
x="-19" y="-27" width="38" height="44"
|
||||
preserveAspectRatio="xMidYMid slice" opacity="0.85"/>
|
||||
<text x="0" y="-14" text-anchor="middle" fill="#fff"
|
||||
style="font-size: 6.5px; font-family: 'DM Serif Display', Georgia, serif;">Live</text>
|
||||
<text x="0" y="-6" text-anchor="middle" fill="#fff"
|
||||
style="font-size: 6.5px; font-family: 'DM Serif Display', Georgia, serif;">Laugh</text>
|
||||
<text x="0" y="3" text-anchor="middle" fill="#fff"
|
||||
style="font-size: 6.5px; font-family: 'DM Serif Display', Georgia, serif;">Lignify</text>
|
||||
<line x1="-7" y1="12" x2="7" y2="12" stroke="#b09870" stroke-width="0.4" opacity="0.7"/>
|
||||
<rect x="-19" y="22" width="40" height="12" rx="0.6"
|
||||
fill="#ece2c3" stroke="#a89466" stroke-width="0.25"/>
|
||||
<text x="1" y="27.5" text-anchor="middle" fill="#2f2615"
|
||||
style="font-size: 4.5px; font-family: 'DM Serif Display', Georgia, serif;">Welcome home</text>
|
||||
<text x="1" y="32" text-anchor="middle" fill="#8a7650"
|
||||
style="font-size: 3.4px; font-style: italic; font-family: 'DM Sans', sans-serif;">hand-stitched, probably</text>
|
||||
</g>
|
||||
</g>
|
||||
|
||||
<!-- Floor line (soft horizon where wall meets counter) -->
|
||||
<line x1="-48" y1="398" x2="528" y2="398"
|
||||
stroke="#cbbfa3" stroke-width="0.6" opacity="0.55"/>
|
||||
|
||||
<!-- Floor reflection band beneath the appliance -->
|
||||
<rect x="20" y="398" width="440" height="30" rx="2" fill="url(#floor-reflection)" opacity="0.6"/>
|
||||
|
||||
@@ -580,18 +546,7 @@
|
||||
<text x="34" y="388"
|
||||
font-family="DM Serif Display, Georgia, serif" font-size="8" font-weight="400"
|
||||
fill="#8b8269" letter-spacing="0.04em">Cultivar</text>
|
||||
<circle cx="70" cy="385" r="1" fill="#7bb27b" class="status-led"/>
|
||||
|
||||
<!-- Seam between doors (also where both doors hinge, French-door style) -->
|
||||
<line x1="240" y1="52" x2="240" y2="349"
|
||||
stroke="#cdc3aa" stroke-width="0.8" opacity="0.6"/>
|
||||
<!-- Hinge pins at top + bottom of the seam -->
|
||||
<g aria-hidden="true">
|
||||
<circle cx="237" cy="54" r="1.1" fill="#9d9377" opacity="0.7"/>
|
||||
<circle cx="243" cy="54" r="1.1" fill="#9d9377" opacity="0.7"/>
|
||||
<circle cx="237" cy="347" r="1.1" fill="#9d9377" opacity="0.7"/>
|
||||
<circle cx="243" cy="347" r="1.1" fill="#9d9377" opacity="0.7"/>
|
||||
</g>
|
||||
<circle cx="70" cy="385" r="1" fill="#7bb27b" class="status-led"/>
|
||||
|
||||
<!-- ═══ LEFT COMPARTMENT · colonization ═══ -->
|
||||
<g aria-label="Colonization compartment">
|
||||
@@ -717,17 +672,8 @@
|
||||
{/each}
|
||||
{/each}
|
||||
|
||||
<!-- Glass shine + handle on the colonization door.
|
||||
Door opens to the outer LEFT (hinges at center seam). -->
|
||||
<rect x={LEFT.x + LEFT.w * 0.45} y={LEFT.y} width={LEFT.w * 0.55} height={LEFT.h}
|
||||
fill="url(#glass-shine)" pointer-events="none"/>
|
||||
<!-- Metallic handle (outer left edge, inside the body bezel) -->
|
||||
<rect x={LEFT.x - 7} y={LEFT.y + 12} width="3" height={LEFT.h - 24} rx="1.5"
|
||||
fill="#b0a788" opacity="0.8"/>
|
||||
<rect x={LEFT.x - 7} y={LEFT.y + 12} width="1.2" height={LEFT.h - 24} rx="0.6"
|
||||
fill="#f3ecd8" opacity="0.7"/>
|
||||
|
||||
<!-- Door-ajar visual (Mercedes-style light leak) — colonization opens OUTER LEFT -->
|
||||
|
||||
<!-- Door-ajar visual (light leak) — colonization opens OUTER LEFT -->
|
||||
{#if colDoorOpen}
|
||||
<rect x={LEFT.x} y={LEFT.y} width={LEFT.w} height={LEFT.h} rx="4"
|
||||
fill="url(#ajar-bloom-col)" pointer-events="none" class="ajar-bloom"/>
|
||||
@@ -890,17 +836,7 @@
|
||||
{/each}
|
||||
{/each}
|
||||
|
||||
<!-- Glass door shine -->
|
||||
<rect x={RIGHT.x} y={RIGHT.y} width={RIGHT.w * 0.55} height={RIGHT.h}
|
||||
fill="url(#glass-shine)" pointer-events="none"/>
|
||||
|
||||
<!-- Glass door handle (outer right, metallic two-tone) -->
|
||||
<rect x={RIGHT.x + RIGHT.w + 4} y={RIGHT.y + 12} width="3" height={RIGHT.h - 24} rx="1.5"
|
||||
fill="#b0a788" opacity="0.8"/>
|
||||
<rect x={RIGHT.x + RIGHT.w + 4 + 1.8} y={RIGHT.y + 12} width="1.2" height={RIGHT.h - 24} rx="0.6"
|
||||
fill="#f3ecd8" opacity="0.7"/>
|
||||
|
||||
<!-- Door-ajar visual (Mercedes-style) — fruiting hinges on the RIGHT -->
|
||||
<!-- Door-ajar visual — fruiting hinges on the RIGHT -->
|
||||
{#if fruitDoorOpen}
|
||||
<rect x={RIGHT.x} y={RIGHT.y} width={RIGHT.w} height={RIGHT.h} rx="4"
|
||||
fill="url(#ajar-bloom-fruit)" pointer-events="none" class="ajar-bloom"/>
|
||||
@@ -1060,29 +996,6 @@
|
||||
</g>
|
||||
{/if}
|
||||
</svg>
|
||||
|
||||
<!-- Compartment labels below the appliance -->
|
||||
<div class="labels">
|
||||
<div class="label-card">
|
||||
<div class="lc-kicker">Left side · Colonization</div>
|
||||
<div class="lc-meta">
|
||||
<span class="lc-count">{occupiedCol}<span class="lc-total">/{totalCol}</span></span>
|
||||
<span class="lc-sep">·</span>
|
||||
<span class="lc-desc">{occupiedCol === 1 ? 'bag' : 'bags'} colonizing</span>
|
||||
</div>
|
||||
<div class="lc-poem font-serif italic">Like a forest floor, underground.</div>
|
||||
</div>
|
||||
|
||||
<div class="label-card right">
|
||||
<div class="lc-kicker">Right side · Fruiting</div>
|
||||
<div class="lc-meta">
|
||||
<span class="lc-count">{occupiedFruit}<span class="lc-total">/{totalFruit}</span></span>
|
||||
<span class="lc-sep">·</span>
|
||||
<span class="lc-desc">{occupiedFruit === 1 ? 'bag' : 'bags'} fruiting</span>
|
||||
</div>
|
||||
<div class="lc-poem font-serif italic">Like a shaded grove after rain.</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
@@ -1092,10 +1005,29 @@
|
||||
gap: 10px;
|
||||
width: 100%;
|
||||
min-width: 0;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
/* Skip painting the whole twin while it's scrolled offscreen */
|
||||
content-visibility: auto;
|
||||
contain-intrinsic-size: 680px 500px;
|
||||
}
|
||||
.twin-wrap::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
z-index: 1;
|
||||
pointer-events: none;
|
||||
background: linear-gradient(
|
||||
to bottom,
|
||||
var(--paper-1) 0%,
|
||||
var(--paper-2) 40%,
|
||||
var(--paper-3) 78%,
|
||||
var(--paper) 78%,
|
||||
var(--paper) 82%,
|
||||
var(--ink-muted) 82%,
|
||||
var(--ink-muted) 94%
|
||||
);
|
||||
}
|
||||
|
||||
.appliance {
|
||||
width: 100%;
|
||||
@@ -1104,6 +1036,7 @@
|
||||
margin: 0 auto;
|
||||
display: block;
|
||||
overflow: visible;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* ── Humidifier mist rings (replacement for SMIL <animate>) ── */
|
||||
@@ -1289,15 +1222,19 @@
|
||||
.labels {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 24px;
|
||||
max-width: 680px;
|
||||
gap: 4px;
|
||||
max-width: 500px;
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
padding: 0 8px;
|
||||
margin: 10px auto -80px;
|
||||
padding: 0 28px;
|
||||
}
|
||||
|
||||
.label-card { display: flex; flex-direction: column; gap: 4px; }
|
||||
.label-card.right { text-align: right; }
|
||||
.label-card {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
line-height: 1.25;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.lc-kicker {
|
||||
font-family: var(--font-sans);
|
||||
@@ -1305,21 +1242,23 @@
|
||||
font-weight: 500;
|
||||
letter-spacing: 0.08em;
|
||||
text-transform: uppercase;
|
||||
color: var(--ink-2);
|
||||
color: var(--ink);
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.lc-meta {
|
||||
font-size: 12.5px;
|
||||
color: var(--ink-muted);
|
||||
color: var(--ink);
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
justify-content: center;
|
||||
gap: 6px;
|
||||
}
|
||||
.label-card.right .lc-meta { justify-content: flex-end; }
|
||||
|
||||
.lc-poem {
|
||||
font-size: 12.5px;
|
||||
font-size: 11.5px;
|
||||
color: var(--ink-muted);
|
||||
opacity: 0.45;
|
||||
letter-spacing: 0.005em;
|
||||
margin-top: 2px;
|
||||
}
|
||||
@@ -1327,15 +1266,30 @@
|
||||
.lc-count {
|
||||
font-family: var(--font-serif);
|
||||
font-size: 15px;
|
||||
color: var(--forest);
|
||||
z-index: 10;
|
||||
color: var(--ink);
|
||||
font-weight: var(--fw-display);
|
||||
letter-spacing: -0.01em;
|
||||
}
|
||||
.lc-total { color: var(--ink-muted); font-size: 12px; }
|
||||
.lc-sep { opacity: 0.4; }
|
||||
.lc-desc { font-style: italic; font-family: var(--font-serif); color: var(--ink-2); }
|
||||
.lc-total {
|
||||
font-family: var(--font-serif);
|
||||
color: var(--ink);
|
||||
opacity: 1;
|
||||
font-size: 15px;
|
||||
}
|
||||
.lc-sep { opacity: 0.3; color: var(--ink); }
|
||||
.lc-desc {
|
||||
font-style: italic;
|
||||
font-family: var(--font-serif);
|
||||
color: var(--ink-muted);
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
@media (max-width: 600px) {
|
||||
.labels { gap: 14px; }
|
||||
@media (max-width: 640px) {
|
||||
.labels { gap: 2px; margin-bottom: -62px; }
|
||||
}
|
||||
|
||||
@media (max-width: 440px) {
|
||||
.labels { gap: 2px; margin-bottom: -50px; }
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,80 @@
|
||||
<script lang="ts">
|
||||
// A single "framed painting" hung on the room's back wall behind the
|
||||
// Cultivar appliance. All geometry is authored per-frame so each one
|
||||
// can feel hand-placed — the component just handles the repeated SVG
|
||||
// structure (drop shadow, frame, optional liner, mat, image, placard).
|
||||
|
||||
export type FrameSpec = {
|
||||
/** Group translation + rotation (origin = placard-hang point) */
|
||||
tx: number;
|
||||
ty: number;
|
||||
rotate: number;
|
||||
/** Outer frame rect (coordinates relative to the group origin) */
|
||||
frame: { x: number; y: number; w: number; h: number; fill: string; stroke?: string };
|
||||
/** Optional thin inner "gold leaf" liner */
|
||||
liner?: { stroke: string; opacity?: number };
|
||||
/** Mat inset inside the frame (usually 3 on all sides) */
|
||||
mat: { fill: string; inset?: number };
|
||||
/** Painting image */
|
||||
image: { href: string; x: number; y: number; w: number; h: number };
|
||||
/** Placard that hangs below the frame */
|
||||
placard: { x: number; y: number; w: number; h: number; fill?: string; stroke?: string };
|
||||
/** Title + subtitle text baselines (y relative to group origin) */
|
||||
title: { text: string; y: number; size: number };
|
||||
subtitle: { text: string; y: number; size: number };
|
||||
};
|
||||
|
||||
interface Props { spec: FrameSpec }
|
||||
const { spec }: Props = $props();
|
||||
|
||||
const matInset = $derived(spec.mat.inset ?? 3);
|
||||
// Drop shadow offset derives from frame size so it always looks proportional
|
||||
const shadowDx = $derived(spec.frame.w * 0.043);
|
||||
const shadowDy = $derived(spec.frame.h * 0.037);
|
||||
const frameStroke = $derived(spec.frame.stroke ?? '#2a1f12');
|
||||
const placardFill = $derived(spec.placard.fill ?? '#ebe0c2');
|
||||
const placardStroke = $derived(spec.placard.stroke ?? '#9d8b61');
|
||||
</script>
|
||||
|
||||
<g transform="translate({spec.tx}, {spec.ty}) rotate({spec.rotate})">
|
||||
<!-- Drop shadow -->
|
||||
<rect x={spec.frame.x} y={spec.frame.y} width={spec.frame.w} height={spec.frame.h}
|
||||
rx="0.6" fill="#000" opacity="0.23"
|
||||
transform="translate({shadowDx}, {shadowDy})"/>
|
||||
|
||||
<!-- Frame -->
|
||||
<rect x={spec.frame.x} y={spec.frame.y} width={spec.frame.w} height={spec.frame.h}
|
||||
rx="0.8" fill={spec.frame.fill} stroke={frameStroke} stroke-width="0.3"/>
|
||||
|
||||
<!-- Optional inner gold liner -->
|
||||
{#if spec.liner}
|
||||
<rect
|
||||
x={spec.frame.x + 1.5} y={spec.frame.y + 1.5}
|
||||
width={spec.frame.w - 3} height={spec.frame.h - 3} rx="0.5"
|
||||
fill="none" stroke={spec.liner.stroke} stroke-width="0.35"
|
||||
opacity={spec.liner.opacity ?? 0.78}/>
|
||||
{/if}
|
||||
|
||||
<!-- Mat -->
|
||||
<rect
|
||||
x={spec.frame.x + matInset} y={spec.frame.y + matInset}
|
||||
width={spec.frame.w - matInset * 2} height={spec.frame.h - matInset * 2}
|
||||
fill={spec.mat.fill}/>
|
||||
|
||||
<!-- Image -->
|
||||
<image href={spec.image.href}
|
||||
x={spec.image.x} y={spec.image.y} width={spec.image.w} height={spec.image.h}
|
||||
preserveAspectRatio="xMidYMid slice"/>
|
||||
<rect x={spec.image.x} y={spec.image.y} width={spec.image.w} height={spec.image.h}
|
||||
fill="none" stroke={frameStroke} stroke-width="0.3" opacity="0.3"/>
|
||||
|
||||
<!-- Placard -->
|
||||
<rect x={spec.placard.x} y={spec.placard.y} width={spec.placard.w} height={spec.placard.h}
|
||||
rx="0.5" fill={placardFill} stroke={placardStroke} stroke-width="0.2"/>
|
||||
<text x="0" y={spec.title.y} text-anchor="middle" fill="#2f2615"
|
||||
style="font-size: {spec.title.size}px; font-family: 'DM Serif Display', Georgia, serif;"
|
||||
>{spec.title.text}</text>
|
||||
<text x="0" y={spec.subtitle.y} text-anchor="middle" fill="#8a7650"
|
||||
style="font-size: {spec.subtitle.size}px; font-style: italic; font-family: 'DM Sans', sans-serif;"
|
||||
>{spec.subtitle.text}</text>
|
||||
</g>
|
||||
Reference in new issue
Block a user