Files
helix/src/routes/posts/[slug]/+page.svelte

87 lines
1.8 KiB
Svelte
Raw Normal View History

<script lang="ts">
feat: rebrand to R&D-lab + WBD palette + lab-slide cards Identity refresh aligned to Waterschap Brabantse Delta. Brand - HELIX → R&D-lab everywhere user-facing (SITE.name; literal "HELIX"s swept across routes, app.html, login, error messages, seed). - New tagline: "Projects, innovations, and every strand between." - Site description updated. Palette (sourced from the official WSBD-logo.svg) - Primary #0d4f9e, secondary #1fa0db, accent #bed137 — added as --wbd-blue / --wbd-cyan / --wbd-lime CSS vars and as wbd.* in tailwind.config.js. helix.* aliases now point to the WBD palette. - Strand A (Projects) → #1fa0db cyan. Strand B (Innovations) → #bed137 lime. - Body vignette + scroll-bar + legend dots repainted accordingly. Composite logo - New 24px nav glyph + favicon.svg: WBD-style tilted-square mark in WBD blues at the centre, helix strands (lime + cyan) wrapping it, lime "active site" dot at the crossing. Says "R&D-lab × Brabantse Delta" in one mark. Lab-slide cards (VerticalHelix) - Frosted-glass surface (backdrop-filter blur+saturate). - Thick 5px strand-coloured stripe on the helix-facing edge (gradient, glowing shadow). Slide rounds the stripe corners; the rest is square. - Slide header has the strand badge and a monospace serial number (01/03 etc) — lab-specimen feel. - Dashed footer rule + "Open detail →" CTA. - Inline link chips (Gitea / Dashboard / Demo / Docs / Paper / Video) with inline SVG icons + short labels. Hover lights up in the strand colour. Capped at 5 visible, "+N" overflow indicator. - Real <a> chips inside the card without nested <a>: overlay-link pattern (transparent slide-link absolute fills the card, chips sit on z-index: 2 above it). Server load - + Page now fetches each project's links in one Drizzle relational query (db.query.projects.findMany with: { links }), capped at 12. - + Form: strand picker (Project / Innovation radios) reads + persists the new column. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-20 12:13:57 +02:00
import { SITE } from '$lib/config';
let { data } = $props();
const published = $derived(
data.post.publishedAt
? new Date(data.post.publishedAt).toLocaleDateString('en-GB', {
day: 'numeric',
month: 'long',
year: 'numeric'
})
: ''
);
</script>
<svelte:head>
feat: rebrand to R&D-lab + WBD palette + lab-slide cards Identity refresh aligned to Waterschap Brabantse Delta. Brand - HELIX → R&D-lab everywhere user-facing (SITE.name; literal "HELIX"s swept across routes, app.html, login, error messages, seed). - New tagline: "Projects, innovations, and every strand between." - Site description updated. Palette (sourced from the official WSBD-logo.svg) - Primary #0d4f9e, secondary #1fa0db, accent #bed137 — added as --wbd-blue / --wbd-cyan / --wbd-lime CSS vars and as wbd.* in tailwind.config.js. helix.* aliases now point to the WBD palette. - Strand A (Projects) → #1fa0db cyan. Strand B (Innovations) → #bed137 lime. - Body vignette + scroll-bar + legend dots repainted accordingly. Composite logo - New 24px nav glyph + favicon.svg: WBD-style tilted-square mark in WBD blues at the centre, helix strands (lime + cyan) wrapping it, lime "active site" dot at the crossing. Says "R&D-lab × Brabantse Delta" in one mark. Lab-slide cards (VerticalHelix) - Frosted-glass surface (backdrop-filter blur+saturate). - Thick 5px strand-coloured stripe on the helix-facing edge (gradient, glowing shadow). Slide rounds the stripe corners; the rest is square. - Slide header has the strand badge and a monospace serial number (01/03 etc) — lab-specimen feel. - Dashed footer rule + "Open detail →" CTA. - Inline link chips (Gitea / Dashboard / Demo / Docs / Paper / Video) with inline SVG icons + short labels. Hover lights up in the strand colour. Capped at 5 visible, "+N" overflow indicator. - Real <a> chips inside the card without nested <a>: overlay-link pattern (transparent slide-link absolute fills the card, chips sit on z-index: 2 above it). Server load - + Page now fetches each project's links in one Drizzle relational query (db.query.projects.findMany with: { links }), capped at 12. - + Form: strand picker (Project / Innovation radios) reads + persists the new column. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-20 12:13:57 +02:00
<title>{data.post.title} · {SITE.name}</title>
<meta name="description" content={data.post.summary || data.post.title} />
</svelte:head>
<article class="post">
<header class="head">
<a href="/posts" class="back">← Posts</a>
<h1>{data.post.title}</h1>
<div class="meta">
{#if data.author}
<span class="author">
{#if data.author.avatarUrl}
<img src={data.author.avatarUrl} alt="" />
{/if}
{data.author.name ?? data.author.username}
</span>
<span class="dot">·</span>
{/if}
<time>{published}</time>
</div>
</header>
<div class="prose-helix">
{@html data.bodyHtml}
</div>
</article>
<style>
.post {
max-width: 700px;
margin: 0 auto;
padding: 3rem 1.5rem 2rem;
}
.head {
margin-bottom: 2rem;
}
.back {
color: var(--color-helix-ink-dim);
text-decoration: none;
font-size: 0.875rem;
}
.back:hover {
color: var(--color-helix-accent);
}
h1 {
margin: 1rem 0 0.5rem;
font-size: clamp(1.8rem, 4.5vw, 2.6rem);
font-weight: 700;
letter-spacing: -0.02em;
line-height: 1.15;
}
.meta {
display: inline-flex;
align-items: center;
gap: 0.5rem;
font-size: 0.85rem;
color: var(--color-helix-ink-faint);
}
.author {
display: inline-flex;
align-items: center;
gap: 0.4rem;
}
.author img {
width: 22px;
height: 22px;
border-radius: 50%;
border: 1px solid var(--color-helix-border);
}
</style>