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:
co-authored by
Claude Opus 5.5
parent
353e65e7bd
commit
e43198b2fe
@@ -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
@@ -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,
|
||||
|
||||
@@ -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':
|
||||
|
||||
Reference in New Issue
Block a user