Reference site: follow main's block and token fixes

- entryList entryCollection, post template hero with the title, legal templates noindex
  (drop the reference's own workarounds)
- brand primary-inverse roles: 74/74 contrast pairs
- /design shows Light and Dark panels (tokens switch on any element)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Radosław Smoliński
2026-10-29 15:21:55 +01:00
co-authored by Claude Opus 5.5
parent 353e65e7bd
commit e43198b2fe
10 changed files with 66 additions and 55 deletions
+2 -3
View File
@@ -16,13 +16,12 @@ sage-green surfaces. Everything else stays quiet.
| accent | oklch(0.55 0.13 50) terracotta | oklch(0.76 0.12 55) | star ratings, badges, highlights only |
| accent-text | default | oklch(0.18 0.02 55) | text on accent in dark |
| link-inverse | oklch(0.82 0.08 160) | oklch(0.42 0.09 160) | links on inverted sections |
| primary-inverse / -text | oklch(0.74 0.09 160) / dark text | oklch(0.47 0.09 160) / white | buttons on inverted sections |
| bg | oklch(0.985 0.006 85) warm paper | oklch(0.2 0.01 160) | page |
| surface-muted | oklch(0.955 0.012 85) | oklch(0.25 0.012 160) | alternate sections, footer |
| secondary, surface, borders, text | default | default | — |
Contrast (`pnpm exec ipal-tokens --report`): 70 of 72 pairs pass. Open: "primary on surface-inverse"
2.75:1 (light) / 2.03:1 (dark), a 3:1 UI-component warning — primary buttons inside inverted sections.
Reported to the token standard (the inverse scope does not re-map primary); not a launch blocker for the reference.
Contrast (`pnpm exec ipal-tokens --report`): 74 of 74 pairs pass, light and dark, the inverse scope included.
## 3. Type
Body: Inter 400/500 (`--font-family-body`). Headings: Fraunces 600 (`--font-family-heading`).
@@ -5,7 +5,7 @@ import { Container } from '@intecion/ipal-kit/blocks/rsc'
import { TokenPanel } from '@/components/design/TokenPanel'
import { i18nConfig } from '@/i18n.config'
// The styleguide: every design token, in the current theme and in dark side by side. Technical page —
// The styleguide: every design token, light and dark side by side. Technical page —
// noindex, not in the sitemap (it is not a Pages document), labels are token names (AGENTS.md → Project decisions).
export const metadata: Metadata = { robots: { follow: false, index: false }, title: 'Design tokens' }
@@ -16,13 +16,13 @@ export default function DesignPage() {
<p className="text-sm uppercase tracking-heading text-fg-muted">ipal-kit</p>
<h1 className="font-heading text-h1 leading-heading text-fg-strong">Design tokens</h1>
<p className="max-w-measure text-lead text-fg-muted">
src/design/tokens.ts → pnpm tokens → src/design/tokens.css. The left panel follows the page theme; the right one is always dark
(data-theme=&quot;dark&quot; on the panel). The bottom row is the inverse scope (data-surface=&quot;inverse&quot;).
src/design/tokens.ts → pnpm tokens → src/design/tokens.css. The panels set data-theme=&quot;light&quot; and data-theme=&quot;dark&quot;
on themselves (the tokens switch on any element); the bottom row is the inverse scope (data-surface=&quot;inverse&quot;) in the page theme.
</p>
</header>
<div className="grid gap-gap lg:grid-cols-2">
<TokenPanel title="Current theme" />
<TokenPanel dark title="Dark" />
<TokenPanel theme="light" title="Light" />
<TokenPanel theme="dark" title="Dark" />
</div>
<TokenPanel inverse title="Inverse surface (data-surface=&quot;inverse&quot;)" />
</Container>
@@ -6,19 +6,19 @@ const TYPE = ['text-display', 'text-h1', 'text-h2', 'text-h3', 'text-h4', 'text-
const RADII = ['rounded-sm', 'rounded-control', 'rounded-card', 'rounded-media', 'rounded-full']
const SHADOWS = ['shadow-sm', 'shadow-md', 'shadow-lg']
type Props = { dark?: boolean; inverse?: boolean; title: string }
type Props = { inverse?: boolean; theme?: 'dark' | 'light'; title: string }
/**
* One panel of the styleguide. Swatches read IPAL_TOKENS (`var(--ipal-…)` strings from the plugin), so a new
* token appears here with no code change. Inline styles are the one place raw vars are fine: this page shows them.
*/
export function TokenPanel({ dark, inverse, title }: Props) {
export function TokenPanel({ inverse, theme, title }: Props) {
return (
<section
aria-label={title}
className={`grid gap-8 rounded-card border border-border p-6 ${inverse ? 'bg-inverse text-on-inverse' : 'bg-bg text-fg'}`}
data-surface={inverse ? 'inverse' : undefined}
data-theme={dark ? 'dark' : undefined}
data-theme={theme}
>
<h2 className="font-heading text-h3 text-fg-strong">{title}</h2>
+13 -6
View File
@@ -4,22 +4,29 @@
*/
:root {
--ipal-bg: oklch(0.985 0.006 85);
--ipal-primary: oklch(0.47 0.09 160);
--ipal-surface-muted: oklch(0.955 0.012 85);
--ipal-accent: oklch(0.55 0.13 50);
--ipal-link-inverse: oklch(0.82 0.08 160);
--ipal-fw-heading: 600;
--ipal-radius: 0.25rem;
--ipal-radius-card: 0.25rem;
}
:root[data-theme="dark"] {
:root, [data-theme="light"] {
--ipal-bg: oklch(0.985 0.006 85);
--ipal-primary: oklch(0.47 0.09 160);
--ipal-surface-muted: oklch(0.955 0.012 85);
--ipal-accent: oklch(0.55 0.13 50);
--ipal-link-inverse: oklch(0.82 0.08 160);
--ipal-primary-inverse: oklch(0.74 0.09 160);
--ipal-primary-inverse-text: oklch(0.18 0.02 160);
}
:root[data-theme="dark"], [data-theme="dark"] {
--ipal-bg: oklch(0.2 0.01 160);
--ipal-primary: oklch(0.74 0.09 160);
--ipal-surface-muted: oklch(0.25 0.012 160);
--ipal-accent: oklch(0.76 0.12 55);
--ipal-accent-text: oklch(0.18 0.02 55);
--ipal-link-inverse: oklch(0.42 0.09 160);
--ipal-primary-inverse: oklch(0.47 0.09 160);
--ipal-primary-inverse-text: oklch(0.99 0 0);
--ipal-primary-text: oklch(0.18 0.02 160);
}
+4
View File
@@ -11,6 +11,8 @@ export const tokens = defineTokens({
primary: 'oklch(0.47 0.09 160)', // deep sage green — the studio's brand colour (DESIGN.md §2)
accent: 'oklch(0.55 0.13 50)', // terracotta, for highlights only
'link-inverse': 'oklch(0.82 0.08 160)', // links and accents on inverted sections
'primary-inverse': 'oklch(0.74 0.09 160)', // buttons on inverted (dark) sections
'primary-inverse-text': 'oklch(0.18 0.02 160)',
bg: 'oklch(0.985 0.006 85)', // warm paper white
'surface-muted': 'oklch(0.955 0.012 85)',
},
@@ -20,6 +22,8 @@ export const tokens = defineTokens({
accent: 'oklch(0.76 0.12 55)',
'accent-text': 'oklch(0.18 0.02 55)',
'link-inverse': 'oklch(0.42 0.09 160)',
'primary-inverse': 'oklch(0.47 0.09 160)', // inverted sections are light in dark mode
'primary-inverse-text': 'oklch(0.99 0 0)',
bg: 'oklch(0.2 0.01 160)',
'surface-muted': 'oklch(0.25 0.012 160)',
},
+2 -2
View File
@@ -1101,7 +1101,7 @@ export interface PricingBlock {
*/
export interface EntryListBlock {
header?: SectionHeaderData;
collection: 'posts' | 'caseStudies';
entryCollection: 'posts' | 'caseStudies';
mode?: ('latest' | 'selected') | null;
limit?: number | null;
entries?:
@@ -1895,7 +1895,7 @@ export interface PricingBlockSelect<T extends boolean = true> {
*/
export interface EntryListBlockSelect<T extends boolean = true> {
header?: T | SectionHeaderDataSelect<T>;
collection?: T;
entryCollection?: T;
mode?: T;
limit?: T;
entries?: T;
+4 -4
View File
@@ -32,10 +32,10 @@ export async function seedBasePages(seed: Seeder) {
pageTemplates.services({ blocks }),
pageTemplates.contact({ blocks, form: { $form: 'Contact form' } }),
// The archive page lists its entries with an entry list block (the editor decides where)
pageTemplates.blogIndex({ blocks, layout: (b) => [b[0], { blockType: 'entryList', collection: 'posts', limit: 9, mode: 'latest', variant: 'cards' }, ...b.slice(1)] }),
{ ...pageTemplates.legal('privacyPolicy', { blocks }), noindex: true },
{ ...pageTemplates.legal('termsOfService', { blocks }), noindex: true },
{ ...pageTemplates.cookiePolicy({ blocks }), noindex: true },
pageTemplates.blogIndex({ blocks, layout: (b) => [b[0], { blockType: 'entryList', entryCollection: 'posts', limit: 9, mode: 'latest', variant: 'cards' }, ...b.slice(1)] }),
pageTemplates.legal('privacyPolicy', { blocks }),
pageTemplates.legal('termsOfService', { blocks }),
pageTemplates.cookiePolicy({ blocks }),
pageTemplates.notFound({ blocks }),
])
}
+10 -20
View File
@@ -169,14 +169,14 @@ export async function seedDemoPages(seed: Seeder, media: Record<string, string>)
const blogIndex = pageTemplates.blogIndex({
blocks,
layout: (b) => [b[0], { blockType: 'entryList', collection: 'posts', limit: 9, mode: 'latest', variant: 'cards' }, ...b.slice(1)],
layout: (b) => [b[0], { blockType: 'entryList', entryCollection: 'posts', limit: 9, mode: 'latest', variant: 'cards' }, ...b.slice(1)],
overrides: { cta: contactCta, hero: { header: header(tx('Blog', 'Blog'), tx('O projektowaniu, materiałach i budowie — bez żargonu.', 'On design, materials and building — without the jargon.')), variant: 'page' } },
})
const caseStudiesIndex = {
layout: [
{ blockType: 'hero', header: header(tx('Realizacje', 'Case studies'), tx('Domy, wnętrza i przebudowy, które zaprojektowaliśmy.', 'Houses, interiors and conversions we designed.')), variant: 'page' },
{ blockType: 'entryList', collection: 'caseStudies', limit: 9, mode: 'latest', variant: 'cards' },
{ blockType: 'entryList', entryCollection: 'caseStudies', limit: 9, mode: 'latest', variant: 'cards' },
{ blockType: 'cta', ...contactCta },
],
slug: { en: 'case-studies', pl: 'realizacje' },
@@ -302,8 +302,7 @@ export async function seedDemoPages(seed: Seeder, media: Record<string, string>)
quote,
blogIndex,
caseStudiesIndex,
{
...pageTemplates.legal('privacyPolicy', {
pageTemplates.legal('privacyPolicy', {
blocks,
overrides: {
richText: {
@@ -315,11 +314,8 @@ export async function seedDemoPages(seed: Seeder, media: Record<string, string>)
variant: 'narrow',
},
},
}),
noindex: true, // policies: noindex (AGENT.md §0c)
},
{
...pageTemplates.legal('termsOfService', {
}),
pageTemplates.legal('termsOfService', {
blocks,
overrides: {
richText: {
@@ -328,11 +324,8 @@ export async function seedDemoPages(seed: Seeder, media: Record<string, string>)
variant: 'narrow',
},
},
}),
noindex: true, // policies: noindex (AGENT.md §0c)
},
{
...pageTemplates.cookiePolicy({
}),
pageTemplates.cookiePolicy({
blocks,
overrides: {
richText: {
@@ -341,9 +334,7 @@ export async function seedDemoPages(seed: Seeder, media: Record<string, string>)
variant: 'narrow',
},
},
}),
noindex: true, // policies: noindex (AGENT.md §0c)
},
}),
pageTemplates.notFound({ blocks }),
showcasePage(media),
])
@@ -351,9 +342,8 @@ export async function seedDemoPages(seed: Seeder, media: Record<string, string>)
await seed.upsertBySlug('posts', POSTS.map((p) => ({
...pageTemplates.post({
blocks,
// The post template starts with the text; a page hero gives the post its title as the h1
layout: (b) => [{ blockType: 'hero', header: header(p.title, p.excerpt, tx('Blog', 'Blog')), variant: 'page' }, ...b],
overrides: { cta: contactCta, richText: { content: p.text, tableOfContents: { label: tx('Spis treści', 'Contents'), show: true }, variant: 'narrow' } },
overrides: { cta: contactCta, hero: { header: header(p.title, p.excerpt, tx('Blog', 'Blog')) }, richText: { content: p.text, tableOfContents: { label: tx('Spis treści', 'Contents'), show: true }, variant: 'narrow' } },
title: p.title,
}),
aiSummary: p.excerpt,
excerpt: p.excerpt,
+1 -1
View File
@@ -18,7 +18,7 @@ function sample(slug: string, media: Record<string, string>): Record<string, unk
case 'cta':
return { links: [pageLink(tx('Główny przycisk', 'Primary button'), 'kontakt'), pageLink(tx('Drugi przycisk', 'Secondary button'), 'o-nas', 'secondary')], media: media.pavilion }
case 'entryList':
return { collection: 'posts', limit: 3, mode: 'latest' }
return { entryCollection: 'posts', limit: 3, mode: 'latest' }
case 'faq':
return { items: items(4, (i) => ({ answer: tx(`Odpowiedź na pytanie ${i}.`, `The answer to question ${i}.`), question: tx(`Pytanie numer ${i}?`, `Question number ${i}?`) })) }
case 'featureGrid':