Reference site: Example Studio on ipal-kit (reference/), index for agents, CI job
reference/ is one complete client site on the plugin (made-up company, pl/en, MongoDB, every library block and template, token standard light/dark, forms, consent, SEO/GEO, enforced CSP, 2FA, base + demo seeds, Coolify runbook, smoke tests). It uses the plugin as file:.. (injected) and is not shipped. - docs/agent/reference-site/INDEX.md (generated by scripts/reference-index.mjs, kept current by test/referenceIndex.test.ts) - AGENT.md section and pointers in ipal-site, ipal-setup, ipal-reference, ipal-upgrade, ipal-block; release steps in PROGRAMISTA §8.1b - CI: reference (fast) on every push, reference-full on main; doctor steps wired, commented until ipal-doctor ships Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
8bb5ebd394
commit
8adac41f92
@@ -0,0 +1,37 @@
|
||||
import { AlternateLinksUpdater } from '@intecion/ipal-kit/client'
|
||||
import { createPageRoute } from '@intecion/ipal-kit/rsc'
|
||||
import { notFound, permanentRedirect, redirect } from 'next/navigation'
|
||||
|
||||
import { blockRegistry } from '@/blocks/registry'
|
||||
import * as content from '@/lib/content'
|
||||
|
||||
// ISR — a literal in the file (Next reads it statically)
|
||||
export const revalidate = 3600
|
||||
|
||||
// Archive pages (Blog, Case studies) list their entries with an entry list block in their own layout,
|
||||
// so the editor decides where the list goes; entries render their own `layout` like pages.
|
||||
const route = createPageRoute(content, {
|
||||
blocks: blockRegistry,
|
||||
notFound,
|
||||
permanentRedirect,
|
||||
redirect, // Site settings → Maintenance: hidden pages → homepage with a notice
|
||||
render: async ({ blocks, locale, segments }) => {
|
||||
// This page's address in every language → the language switcher never leads to a 404
|
||||
const { alternates } = await content.generatePageMetadata(locale, segments)
|
||||
const links = Object.fromEntries(
|
||||
Object.entries(alternates?.languages ?? {})
|
||||
.filter(([code]) => code !== 'x-default')
|
||||
.map(([code, href]) => [code, new URL(String(href)).pathname]),
|
||||
)
|
||||
return (
|
||||
<>
|
||||
<AlternateLinksUpdater links={links} />
|
||||
{blocks}
|
||||
</>
|
||||
)
|
||||
},
|
||||
})
|
||||
|
||||
export default route.Page
|
||||
export const generateMetadata = route.generateMetadata
|
||||
export const generateStaticParams = route.generateStaticParams
|
||||
@@ -0,0 +1,9 @@
|
||||
'use server'
|
||||
// ONE server action for every builder form: honeypot → client IP (IPAL_IP_HEADER) → submitForm
|
||||
// (rate limit, Turnstile, validation, consent, save) → the message from Notifications.
|
||||
import { createSubmitAction } from '@intecion/ipal-kit/server'
|
||||
import { headers } from 'next/headers'
|
||||
|
||||
import { getCachedPayload } from '@/lib/content'
|
||||
|
||||
export const sendForm = createSubmitAction({ getCachedPayload, headers })
|
||||
@@ -0,0 +1,32 @@
|
||||
import type { Metadata } from 'next'
|
||||
|
||||
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 —
|
||||
// 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' }
|
||||
|
||||
export default function DesignPage() {
|
||||
return (
|
||||
<Container className="grid gap-10 py-section">
|
||||
<header className="grid gap-stack">
|
||||
<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="dark" on the panel). The bottom row is the inverse scope (data-surface="inverse").
|
||||
</p>
|
||||
</header>
|
||||
<div className="grid gap-gap lg:grid-cols-2">
|
||||
<TokenPanel title="Current theme" />
|
||||
<TokenPanel dark title="Dark" />
|
||||
</div>
|
||||
<TokenPanel inverse title="Inverse surface (data-surface="inverse")" />
|
||||
</Container>
|
||||
)
|
||||
}
|
||||
|
||||
export const generateStaticParams = () => i18nConfig.locales.map(({ code }) => ({ locale: code }))
|
||||
@@ -0,0 +1,60 @@
|
||||
import type { Metadata } from 'next'
|
||||
|
||||
import { buildIconsMetadata } from '@intecion/ipal-kit'
|
||||
import { AlternateLinksProvider, CookieBanner } from '@intecion/ipal-kit/client'
|
||||
import { SiteProviders } from '@intecion/ipal-kit/rsc'
|
||||
import { Fraunces, Inter } from 'next/font/google'
|
||||
import { notFound } from 'next/navigation'
|
||||
|
||||
import { Footer } from '@/components/layout/Footer'
|
||||
import { Header } from '@/components/layout/Header'
|
||||
import { getConfiguredLocales, getSettings, getSiteShell } from '@/lib/content'
|
||||
import { getCompany, getFooter, getHeader } from '@/lib/globals'
|
||||
|
||||
import '../styles.css'
|
||||
|
||||
// Fixed slot names from the token standard: --font-family-body / --font-family-heading (design-tokens.md)
|
||||
const body = Inter({ display: 'swap', subsets: ['latin', 'latin-ext'], variable: '--font-family-body' })
|
||||
const heading = Fraunces({ display: 'swap', subsets: ['latin', 'latin-ext'], variable: '--font-family-heading' })
|
||||
|
||||
type Props = { children: React.ReactNode; params: Promise<{ locale: string }> }
|
||||
|
||||
// Favicon + apple-touch-icon from Site settings → Favicon
|
||||
export async function generateMetadata({ params }: Props): Promise<Metadata> {
|
||||
const { locale } = await params
|
||||
const favicon = (await getSettings(locale))?.favicon
|
||||
return buildIconsMetadata(typeof favicon === 'object' ? favicon : null)
|
||||
}
|
||||
|
||||
export default async function LocaleLayout({ children, params }: Props) {
|
||||
const { locale } = await params
|
||||
if (!(await getConfiguredLocales()).includes(locale)) {notFound()}
|
||||
const [shell, settings, header, footer, company] = await Promise.all([
|
||||
getSiteShell(locale),
|
||||
getSettings(locale),
|
||||
getHeader(locale),
|
||||
getFooter(locale),
|
||||
getCompany(locale),
|
||||
])
|
||||
return (
|
||||
// suppressHydrationWarning: ThemeScript sets data-theme on <html> before hydration (pages are ISR, one HTML for all)
|
||||
<html className={`${body.variable} ${heading.variable}`} lang={locale} suppressHydrationWarning>
|
||||
{/* NO <head> — Next manages it */}
|
||||
<body className="flex min-h-screen flex-col bg-bg font-body text-fg antialiased">
|
||||
<SiteProviders
|
||||
banner={<CookieBanner controls="switch" equalChoice settings="detailed" />}
|
||||
lightbox
|
||||
logEndpoint="/api/ipal/consent"
|
||||
shell={shell}
|
||||
theme
|
||||
>
|
||||
<AlternateLinksProvider>
|
||||
<Header header={header} locale={locale} settings={settings} themeLabel={shell.theme.allowToggle ? shell.theme.toggleLabel : null} />
|
||||
<main className="flex-1" id="main">{children}</main>
|
||||
<Footer company={company} footer={footer} locale={locale} />
|
||||
</AlternateLinksProvider>
|
||||
</SiteProviders>
|
||||
</body>
|
||||
</html>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
import { createNotFoundPage } from '@intecion/ipal-kit/rsc'
|
||||
|
||||
import * as content from '@/lib/content'
|
||||
|
||||
import { loadNotFoundView } from './notFoundView'
|
||||
|
||||
export default createNotFoundPage(content, { load: loadNotFoundView })
|
||||
@@ -0,0 +1,10 @@
|
||||
'use server'
|
||||
import { renderNotFoundView } from '@intecion/ipal-kit/rsc'
|
||||
|
||||
import { blockRegistry } from '@/blocks/registry'
|
||||
import * as content from '@/lib/content'
|
||||
|
||||
/** 404 content from the panel (System pages → 404), in the URL's language. */
|
||||
export async function loadNotFoundView(locale: string) {
|
||||
return renderNotFoundView(content, { blocks: blockRegistry }, locale)
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
/* The same on every site (design-tokens.md) — no brand values here; the brand lives in src/design/tokens.ts */
|
||||
@import "tailwindcss";
|
||||
@import "@intecion/ipal-kit/fluid-wide.css";
|
||||
@import "@intecion/ipal-kit/tokens.css";
|
||||
@import "@intecion/ipal-kit/tailwind.css";
|
||||
@import "../../design/tokens.css";
|
||||
@source "../../../node_modules/@intecion/ipal-kit/dist/**/*.js";
|
||||
@@ -0,0 +1,25 @@
|
||||
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
|
||||
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
|
||||
import type { Metadata } from 'next'
|
||||
|
||||
import config from '@payload-config'
|
||||
import { generatePageMetadata, NotFoundPage } from '@payloadcms/next/views'
|
||||
|
||||
import { importMap } from '../importMap.js'
|
||||
|
||||
type Args = {
|
||||
params: Promise<{
|
||||
segments: string[]
|
||||
}>
|
||||
searchParams: Promise<{
|
||||
[key: string]: string | string[]
|
||||
}>
|
||||
}
|
||||
|
||||
export const generateMetadata = ({ params, searchParams }: Args): Promise<Metadata> =>
|
||||
generatePageMetadata({ config, params, searchParams })
|
||||
|
||||
const NotFound = ({ params, searchParams }: Args) =>
|
||||
NotFoundPage({ config, importMap, params, searchParams })
|
||||
|
||||
export default NotFound
|
||||
@@ -0,0 +1,25 @@
|
||||
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
|
||||
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
|
||||
import type { Metadata } from 'next'
|
||||
|
||||
import config from '@payload-config'
|
||||
import { generatePageMetadata, RootPage } from '@payloadcms/next/views'
|
||||
|
||||
import { importMap } from '../importMap.js'
|
||||
|
||||
type Args = {
|
||||
params: Promise<{
|
||||
segments: string[]
|
||||
}>
|
||||
searchParams: Promise<{
|
||||
[key: string]: string | string[]
|
||||
}>
|
||||
}
|
||||
|
||||
export const generateMetadata = ({ params, searchParams }: Args): Promise<Metadata> =>
|
||||
generatePageMetadata({ config, params, searchParams })
|
||||
|
||||
const Page = ({ params, searchParams }: Args) =>
|
||||
RootPage({ config, importMap, params, searchParams })
|
||||
|
||||
export default Page
|
||||
@@ -0,0 +1,102 @@
|
||||
import { RowLabel as RowLabel_7568fe47d582ff15ce85d2e1873c2c23 } from '@intecion/ipal-kit/admin'
|
||||
import { RscEntryLexicalCell as RscEntryLexicalCell_44fe37237e0ebf4470c9990d8cb7b07e } from '@payloadcms/richtext-lexical/rsc'
|
||||
import { RscEntryLexicalField as RscEntryLexicalField_44fe37237e0ebf4470c9990d8cb7b07e } from '@payloadcms/richtext-lexical/rsc'
|
||||
import { LexicalDiffComponent as LexicalDiffComponent_44fe37237e0ebf4470c9990d8cb7b07e } from '@payloadcms/richtext-lexical/rsc'
|
||||
import { InlineToolbarFeatureClient as InlineToolbarFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client'
|
||||
import { HorizontalRuleFeatureClient as HorizontalRuleFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client'
|
||||
import { UploadFeatureClient as UploadFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client'
|
||||
import { BlockquoteFeatureClient as BlockquoteFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client'
|
||||
import { RelationshipFeatureClient as RelationshipFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client'
|
||||
import { LinkFeatureClient as LinkFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client'
|
||||
import { ChecklistFeatureClient as ChecklistFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client'
|
||||
import { OrderedListFeatureClient as OrderedListFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client'
|
||||
import { UnorderedListFeatureClient as UnorderedListFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client'
|
||||
import { IndentFeatureClient as IndentFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client'
|
||||
import { AlignFeatureClient as AlignFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client'
|
||||
import { HeadingFeatureClient as HeadingFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client'
|
||||
import { ParagraphFeatureClient as ParagraphFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client'
|
||||
import { InlineCodeFeatureClient as InlineCodeFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client'
|
||||
import { SuperscriptFeatureClient as SuperscriptFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client'
|
||||
import { SubscriptFeatureClient as SubscriptFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client'
|
||||
import { StrikethroughFeatureClient as StrikethroughFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client'
|
||||
import { UnderlineFeatureClient as UnderlineFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client'
|
||||
import { BoldFeatureClient as BoldFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client'
|
||||
import { ItalicFeatureClient as ItalicFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client'
|
||||
import { OverviewComponent as OverviewComponent_a8a977ebc872c5d5ea7ee689724c0860 } from '@payloadcms/plugin-seo/client'
|
||||
import { MetaTitleComponent as MetaTitleComponent_a8a977ebc872c5d5ea7ee689724c0860 } from '@payloadcms/plugin-seo/client'
|
||||
import { MetaDescriptionComponent as MetaDescriptionComponent_a8a977ebc872c5d5ea7ee689724c0860 } from '@payloadcms/plugin-seo/client'
|
||||
import { MetaDescriptionCheck as MetaDescriptionCheck_7568fe47d582ff15ce85d2e1873c2c23 } from '@intecion/ipal-kit/admin'
|
||||
import { MetaImageComponent as MetaImageComponent_a8a977ebc872c5d5ea7ee689724c0860 } from '@payloadcms/plugin-seo/client'
|
||||
import { PreviewComponent as PreviewComponent_a8a977ebc872c5d5ea7ee689724c0860 } from '@payloadcms/plugin-seo/client'
|
||||
import { TOTPField as TOTPField_3eb2cc20d1a2569c2ccbafcee15bd128 } from '@clocklimited/payload-2fa/rsc'
|
||||
import { CookieScanButton as CookieScanButton_7568fe47d582ff15ce85d2e1873c2c23 } from '@intecion/ipal-kit/admin'
|
||||
import { FaviconCheck as FaviconCheck_7568fe47d582ff15ce85d2e1873c2c23 } from '@intecion/ipal-kit/admin'
|
||||
import { IntegrationStatusBanner as IntegrationStatusBanner_7568fe47d582ff15ce85d2e1873c2c23 } from '@intecion/ipal-kit/admin'
|
||||
import { MaskedField as MaskedField_7568fe47d582ff15ce85d2e1873c2c23 } from '@intecion/ipal-kit/admin'
|
||||
import { TestEmailButton as TestEmailButton_7568fe47d582ff15ce85d2e1873c2c23 } from '@intecion/ipal-kit/admin'
|
||||
import { CookieReviewTab as CookieReviewTab_7568fe47d582ff15ce85d2e1873c2c23 } from '@intecion/ipal-kit/admin'
|
||||
import { CookieSiteCheckTab as CookieSiteCheckTab_7568fe47d582ff15ce85d2e1873c2c23 } from '@intecion/ipal-kit/admin'
|
||||
import { AdminIcon as AdminIcon_7568fe47d582ff15ce85d2e1873c2c23 } from '@intecion/ipal-kit/admin'
|
||||
import { AdminLogo as AdminLogo_7568fe47d582ff15ce85d2e1873c2c23 } from '@intecion/ipal-kit/admin'
|
||||
import { IntecionCredit as IntecionCredit_7568fe47d582ff15ce85d2e1873c2c23 } from '@intecion/ipal-kit/admin'
|
||||
import { CookieCrawlAlert as CookieCrawlAlert_7568fe47d582ff15ce85d2e1873c2c23 } from '@intecion/ipal-kit/admin'
|
||||
import { IntegrationAlerts as IntegrationAlerts_7568fe47d582ff15ce85d2e1873c2c23 } from '@intecion/ipal-kit/admin'
|
||||
import { TotpRedirectProvider as TotpRedirectProvider_7568fe47d582ff15ce85d2e1873c2c23 } from '@intecion/ipal-kit/admin'
|
||||
import { TOTPSetup as TOTPSetup_3eb2cc20d1a2569c2ccbafcee15bd128 } from '@clocklimited/payload-2fa/rsc'
|
||||
import { TOTPVerify as TOTPVerify_3eb2cc20d1a2569c2ccbafcee15bd128 } from '@clocklimited/payload-2fa/rsc'
|
||||
import { CookieApprovalView as CookieApprovalView_7568fe47d582ff15ce85d2e1873c2c23 } from '@intecion/ipal-kit/admin'
|
||||
import { CollectionCards as CollectionCards_f9c02e79a4aed9a3924487c0cd4cafb1 } from '@payloadcms/next/rsc'
|
||||
import { S3ClientUploadHandler as S3ClientUploadHandler_f97aa6c64367fa259c5bc0567239ef24 } from '@payloadcms/storage-s3/client'
|
||||
|
||||
/** @type import('payload').ImportMap */
|
||||
export const importMap = {
|
||||
"@intecion/ipal-kit/admin#RowLabel": RowLabel_7568fe47d582ff15ce85d2e1873c2c23,
|
||||
"@payloadcms/richtext-lexical/rsc#RscEntryLexicalCell": RscEntryLexicalCell_44fe37237e0ebf4470c9990d8cb7b07e,
|
||||
"@payloadcms/richtext-lexical/rsc#RscEntryLexicalField": RscEntryLexicalField_44fe37237e0ebf4470c9990d8cb7b07e,
|
||||
"@payloadcms/richtext-lexical/rsc#LexicalDiffComponent": LexicalDiffComponent_44fe37237e0ebf4470c9990d8cb7b07e,
|
||||
"@payloadcms/richtext-lexical/client#InlineToolbarFeatureClient": InlineToolbarFeatureClient_e70f5e05f09f93e00b997edb1ef0c864,
|
||||
"@payloadcms/richtext-lexical/client#HorizontalRuleFeatureClient": HorizontalRuleFeatureClient_e70f5e05f09f93e00b997edb1ef0c864,
|
||||
"@payloadcms/richtext-lexical/client#UploadFeatureClient": UploadFeatureClient_e70f5e05f09f93e00b997edb1ef0c864,
|
||||
"@payloadcms/richtext-lexical/client#BlockquoteFeatureClient": BlockquoteFeatureClient_e70f5e05f09f93e00b997edb1ef0c864,
|
||||
"@payloadcms/richtext-lexical/client#RelationshipFeatureClient": RelationshipFeatureClient_e70f5e05f09f93e00b997edb1ef0c864,
|
||||
"@payloadcms/richtext-lexical/client#LinkFeatureClient": LinkFeatureClient_e70f5e05f09f93e00b997edb1ef0c864,
|
||||
"@payloadcms/richtext-lexical/client#ChecklistFeatureClient": ChecklistFeatureClient_e70f5e05f09f93e00b997edb1ef0c864,
|
||||
"@payloadcms/richtext-lexical/client#OrderedListFeatureClient": OrderedListFeatureClient_e70f5e05f09f93e00b997edb1ef0c864,
|
||||
"@payloadcms/richtext-lexical/client#UnorderedListFeatureClient": UnorderedListFeatureClient_e70f5e05f09f93e00b997edb1ef0c864,
|
||||
"@payloadcms/richtext-lexical/client#IndentFeatureClient": IndentFeatureClient_e70f5e05f09f93e00b997edb1ef0c864,
|
||||
"@payloadcms/richtext-lexical/client#AlignFeatureClient": AlignFeatureClient_e70f5e05f09f93e00b997edb1ef0c864,
|
||||
"@payloadcms/richtext-lexical/client#HeadingFeatureClient": HeadingFeatureClient_e70f5e05f09f93e00b997edb1ef0c864,
|
||||
"@payloadcms/richtext-lexical/client#ParagraphFeatureClient": ParagraphFeatureClient_e70f5e05f09f93e00b997edb1ef0c864,
|
||||
"@payloadcms/richtext-lexical/client#InlineCodeFeatureClient": InlineCodeFeatureClient_e70f5e05f09f93e00b997edb1ef0c864,
|
||||
"@payloadcms/richtext-lexical/client#SuperscriptFeatureClient": SuperscriptFeatureClient_e70f5e05f09f93e00b997edb1ef0c864,
|
||||
"@payloadcms/richtext-lexical/client#SubscriptFeatureClient": SubscriptFeatureClient_e70f5e05f09f93e00b997edb1ef0c864,
|
||||
"@payloadcms/richtext-lexical/client#StrikethroughFeatureClient": StrikethroughFeatureClient_e70f5e05f09f93e00b997edb1ef0c864,
|
||||
"@payloadcms/richtext-lexical/client#UnderlineFeatureClient": UnderlineFeatureClient_e70f5e05f09f93e00b997edb1ef0c864,
|
||||
"@payloadcms/richtext-lexical/client#BoldFeatureClient": BoldFeatureClient_e70f5e05f09f93e00b997edb1ef0c864,
|
||||
"@payloadcms/richtext-lexical/client#ItalicFeatureClient": ItalicFeatureClient_e70f5e05f09f93e00b997edb1ef0c864,
|
||||
"@payloadcms/plugin-seo/client#OverviewComponent": OverviewComponent_a8a977ebc872c5d5ea7ee689724c0860,
|
||||
"@payloadcms/plugin-seo/client#MetaTitleComponent": MetaTitleComponent_a8a977ebc872c5d5ea7ee689724c0860,
|
||||
"@payloadcms/plugin-seo/client#MetaDescriptionComponent": MetaDescriptionComponent_a8a977ebc872c5d5ea7ee689724c0860,
|
||||
"@intecion/ipal-kit/admin#MetaDescriptionCheck": MetaDescriptionCheck_7568fe47d582ff15ce85d2e1873c2c23,
|
||||
"@payloadcms/plugin-seo/client#MetaImageComponent": MetaImageComponent_a8a977ebc872c5d5ea7ee689724c0860,
|
||||
"@payloadcms/plugin-seo/client#PreviewComponent": PreviewComponent_a8a977ebc872c5d5ea7ee689724c0860,
|
||||
"@clocklimited/payload-2fa/rsc#TOTPField": TOTPField_3eb2cc20d1a2569c2ccbafcee15bd128,
|
||||
"@intecion/ipal-kit/admin#CookieScanButton": CookieScanButton_7568fe47d582ff15ce85d2e1873c2c23,
|
||||
"@intecion/ipal-kit/admin#FaviconCheck": FaviconCheck_7568fe47d582ff15ce85d2e1873c2c23,
|
||||
"@intecion/ipal-kit/admin#IntegrationStatusBanner": IntegrationStatusBanner_7568fe47d582ff15ce85d2e1873c2c23,
|
||||
"@intecion/ipal-kit/admin#MaskedField": MaskedField_7568fe47d582ff15ce85d2e1873c2c23,
|
||||
"@intecion/ipal-kit/admin#TestEmailButton": TestEmailButton_7568fe47d582ff15ce85d2e1873c2c23,
|
||||
"@intecion/ipal-kit/admin#CookieReviewTab": CookieReviewTab_7568fe47d582ff15ce85d2e1873c2c23,
|
||||
"@intecion/ipal-kit/admin#CookieSiteCheckTab": CookieSiteCheckTab_7568fe47d582ff15ce85d2e1873c2c23,
|
||||
"@intecion/ipal-kit/admin#AdminIcon": AdminIcon_7568fe47d582ff15ce85d2e1873c2c23,
|
||||
"@intecion/ipal-kit/admin#AdminLogo": AdminLogo_7568fe47d582ff15ce85d2e1873c2c23,
|
||||
"@intecion/ipal-kit/admin#IntecionCredit": IntecionCredit_7568fe47d582ff15ce85d2e1873c2c23,
|
||||
"@intecion/ipal-kit/admin#CookieCrawlAlert": CookieCrawlAlert_7568fe47d582ff15ce85d2e1873c2c23,
|
||||
"@intecion/ipal-kit/admin#IntegrationAlerts": IntegrationAlerts_7568fe47d582ff15ce85d2e1873c2c23,
|
||||
"@intecion/ipal-kit/admin#TotpRedirectProvider": TotpRedirectProvider_7568fe47d582ff15ce85d2e1873c2c23,
|
||||
"@clocklimited/payload-2fa/rsc#TOTPSetup": TOTPSetup_3eb2cc20d1a2569c2ccbafcee15bd128,
|
||||
"@clocklimited/payload-2fa/rsc#TOTPVerify": TOTPVerify_3eb2cc20d1a2569c2ccbafcee15bd128,
|
||||
"@intecion/ipal-kit/admin#CookieApprovalView": CookieApprovalView_7568fe47d582ff15ce85d2e1873c2c23,
|
||||
"@payloadcms/next/rsc#CollectionCards": CollectionCards_f9c02e79a4aed9a3924487c0cd4cafb1,
|
||||
"@payloadcms/storage-s3/client#S3ClientUploadHandler": S3ClientUploadHandler_f97aa6c64367fa259c5bc0567239ef24
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
|
||||
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
|
||||
import config from '@payload-config'
|
||||
import '@payloadcms/next/css'
|
||||
import {
|
||||
REST_DELETE,
|
||||
REST_GET,
|
||||
REST_OPTIONS,
|
||||
REST_PATCH,
|
||||
REST_POST,
|
||||
REST_PUT,
|
||||
} from '@payloadcms/next/routes'
|
||||
|
||||
export const GET = REST_GET(config)
|
||||
export const POST = REST_POST(config)
|
||||
export const DELETE = REST_DELETE(config)
|
||||
export const PATCH = REST_PATCH(config)
|
||||
export const PUT = REST_PUT(config)
|
||||
export const OPTIONS = REST_OPTIONS(config)
|
||||
@@ -0,0 +1,7 @@
|
||||
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
|
||||
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
|
||||
import config from '@payload-config'
|
||||
import '@payloadcms/next/css'
|
||||
import { GRAPHQL_PLAYGROUND_GET } from '@payloadcms/next/routes'
|
||||
|
||||
export const GET = GRAPHQL_PLAYGROUND_GET(config)
|
||||
@@ -0,0 +1,8 @@
|
||||
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
|
||||
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
|
||||
import config from '@payload-config'
|
||||
import { GRAPHQL_POST, REST_OPTIONS } from '@payloadcms/next/routes'
|
||||
|
||||
export const POST = GRAPHQL_POST(config)
|
||||
|
||||
export const OPTIONS = REST_OPTIONS(config)
|
||||
@@ -0,0 +1,32 @@
|
||||
import type { ServerFunctionClient } from 'payload'
|
||||
|
||||
import '@payloadcms/next/css'
|
||||
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
|
||||
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
|
||||
import config from '@payload-config'
|
||||
import { handleServerFunctions, RootLayout } from '@payloadcms/next/layouts'
|
||||
import React from 'react'
|
||||
|
||||
import { importMap } from './admin/importMap.js'
|
||||
import './custom.scss'
|
||||
|
||||
type Args = {
|
||||
children: React.ReactNode
|
||||
}
|
||||
|
||||
const serverFunction: ServerFunctionClient = async function (args) {
|
||||
'use server'
|
||||
return handleServerFunctions({
|
||||
...args,
|
||||
config,
|
||||
importMap,
|
||||
})
|
||||
}
|
||||
|
||||
const Layout = ({ children }: Args) => (
|
||||
<RootLayout config={config} importMap={importMap} serverFunction={serverFunction}>
|
||||
{children}
|
||||
</RootLayout>
|
||||
)
|
||||
|
||||
export default Layout
|
||||
@@ -0,0 +1,4 @@
|
||||
import { createCspReportRoute } from '@intecion/ipal-kit'
|
||||
|
||||
// CSP violation reports → `[csp]` lines in the logs (security.md)
|
||||
export const POST = createCspReportRoute()
|
||||
@@ -0,0 +1,3 @@
|
||||
// Coolify health check: 200, or 503 without the database
|
||||
export { healthRoute as GET } from '@/lib/content'
|
||||
export const dynamic = 'force-dynamic'
|
||||
@@ -0,0 +1,3 @@
|
||||
// GEO: public MCP server (read-only)
|
||||
export { mcpGET as GET, mcpPOST as POST } from '@/lib/content'
|
||||
export const dynamic = 'force-dynamic'
|
||||
@@ -0,0 +1,3 @@
|
||||
// IndexNow key (Site integrations or INDEXNOW_KEY)
|
||||
export { indexNowKeyRoute as GET } from '@/lib/content'
|
||||
export const dynamic = 'force-dynamic'
|
||||
@@ -0,0 +1,3 @@
|
||||
// GEO: full page content for AI assistants
|
||||
export { llmsFullRoute as GET } from '@/lib/content'
|
||||
export const dynamic = 'force-dynamic'
|
||||
@@ -0,0 +1,3 @@
|
||||
// GEO: site summary for AI assistants
|
||||
export { llmsRoute as GET } from '@/lib/content'
|
||||
export const dynamic = 'force-dynamic'
|
||||
@@ -0,0 +1,2 @@
|
||||
export { manifest as default } from '@/lib/content'
|
||||
export const dynamic = 'force-dynamic'
|
||||
@@ -0,0 +1,3 @@
|
||||
// GEO: every page as Markdown (noindex, canonical to the HTML)
|
||||
export { markdownRoute as GET } from '@/lib/content'
|
||||
export const dynamic = 'force-dynamic'
|
||||
@@ -0,0 +1,3 @@
|
||||
// robots.txt from code + the AI crawler policy from Site settings → Search engines
|
||||
export { getRobots as default } from '@/lib/content'
|
||||
export const dynamic = 'force-dynamic'
|
||||
@@ -0,0 +1,3 @@
|
||||
// sitemap: one only (no sitemap.ts), styled by the plugin
|
||||
export { sitemapRoute as GET } from '@/lib/content'
|
||||
export const dynamic = 'force-dynamic'
|
||||
@@ -0,0 +1,30 @@
|
||||
import { libraryBlocks, type LibraryBlocksOptions } from '@intecion/ipal-kit/blocks'
|
||||
|
||||
/**
|
||||
* Every library block is on, because the reference site shows all of them (the Blocks showcase page).
|
||||
* A client site turns on only what its site map needs (docs/block-library.md "Setup").
|
||||
*/
|
||||
export const blockOptions = {
|
||||
contact: true,
|
||||
cta: true,
|
||||
entryList: {
|
||||
collections: [
|
||||
{ label: { en: 'Blog posts', pl: 'Wpisy' }, value: 'posts' },
|
||||
{ label: { en: 'Case studies', pl: 'Realizacje' }, value: 'caseStudies' },
|
||||
],
|
||||
},
|
||||
faq: true,
|
||||
featureGrid: true,
|
||||
gallery: true,
|
||||
hero: true,
|
||||
logos: true,
|
||||
pricing: true,
|
||||
richText: true,
|
||||
stats: true,
|
||||
steps: true,
|
||||
team: true,
|
||||
testimonials: true,
|
||||
textMedia: true,
|
||||
} satisfies LibraryBlocksOptions
|
||||
|
||||
export const pageBlocks = [...libraryBlocks(blockOptions)]
|
||||
@@ -0,0 +1,31 @@
|
||||
import { createBlockRegistry } from '@intecion/ipal-kit/blocks/rsc'
|
||||
import Image from 'next/image'
|
||||
import Link from 'next/link'
|
||||
|
||||
import { sendForm } from '@/app/(frontend)/[locale]/actions'
|
||||
import { formClasses } from '@/components/forms/formClasses'
|
||||
import * as content from '@/lib/content'
|
||||
import { getCompany } from '@/lib/globals'
|
||||
|
||||
/** Contact details beside the contact form — from the Company global, never from code. */
|
||||
async function contactDetails(locale: string) {
|
||||
const company = await getCompany(locale)
|
||||
const labels = locale === 'pl' ? { address: 'Adres', email: 'E-mail', hours: 'Godziny', phone: 'Telefon' } : { address: 'Address', email: 'E-mail', hours: 'Hours', phone: 'Phone' }
|
||||
const address = [company.address?.street, [company.address?.postalCode, company.address?.city].filter(Boolean).join(' ')].filter(Boolean).join(', ')
|
||||
return [
|
||||
...(company.phone ? [{ href: `tel:${company.phone.replace(/[^\d+]/g, '')}`, label: labels.phone, value: company.phone }] : []),
|
||||
...(company.email ? [{ href: `mailto:${company.email}`, label: labels.email, value: company.email }] : []),
|
||||
...(address ? [{ label: labels.address, value: address }] : []),
|
||||
...(company.hours ? [{ label: labels.hours, value: company.hours }] : []),
|
||||
]
|
||||
}
|
||||
|
||||
/** blockType → component for every library block, bound to lib/content (docs/block-library.md "The registry"). */
|
||||
export const blockRegistry = createBlockRegistry(content, {
|
||||
contactDetails,
|
||||
formClassNames: formClasses,
|
||||
Image,
|
||||
Link,
|
||||
noSnippet: ['cta'], // the same call to action closes most pages
|
||||
sendForm,
|
||||
})
|
||||
@@ -0,0 +1,21 @@
|
||||
import type { CollectionConfig } from 'payload'
|
||||
|
||||
import { buildRevalidateHook } from '@intecion/ipal-kit'
|
||||
import { revalidatePath } from 'next/cache'
|
||||
|
||||
import { i18nConfig } from '@/i18n.config'
|
||||
|
||||
import { entryFields } from './entryFields'
|
||||
|
||||
const revalidate = buildRevalidateHook({ config: i18nConfig, revalidatePath })
|
||||
|
||||
/** The project's own archive collection (skill ipal-collection) — the library has no case-study type. */
|
||||
export const CaseStudies: CollectionConfig = {
|
||||
slug: 'caseStudies',
|
||||
admin: { defaultColumns: ['title', 'publishedAt', 'updatedAt'], useAsTitle: 'title' },
|
||||
access: { read: () => true },
|
||||
defaultSort: '-publishedAt',
|
||||
fields: entryFields,
|
||||
hooks: { afterChange: [revalidate.afterChange], afterDelete: [revalidate.afterDelete] },
|
||||
labels: { plural: { en: 'Case studies', pl: 'Realizacje' }, singular: { en: 'Case study', pl: 'Realizacja' } },
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
import type { CollectionConfig } from 'payload'
|
||||
|
||||
import {
|
||||
buildMediaPlaceholderField,
|
||||
buildMediaPlaceholderHook,
|
||||
buildOptimizeUploadField,
|
||||
buildOptimizeUploadHook,
|
||||
normalizeFilenameHook,
|
||||
} from '@intecion/ipal-kit'
|
||||
|
||||
/** media.md "Full collection", 1:1. */
|
||||
export const Media: CollectionConfig = {
|
||||
slug: 'media',
|
||||
access: { read: () => true }, // public files; media are served by the app (/api/media/file/…)
|
||||
upload: { focalPoint: true, mimeTypes: ['image/*', 'application/pdf', 'video/mp4', 'video/webm'] },
|
||||
hooks: {
|
||||
beforeOperation: [normalizeFilenameHook, buildOptimizeUploadHook(), buildMediaPlaceholderHook()],
|
||||
},
|
||||
fields: [
|
||||
{ name: 'alt', type: 'text', localized: true, required: true },
|
||||
buildOptimizeUploadField(),
|
||||
buildMediaPlaceholderField(),
|
||||
],
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
import type { CollectionConfig } from 'payload'
|
||||
|
||||
import {
|
||||
buildNoindexField,
|
||||
buildPreventDeleteSystemPage,
|
||||
buildRevalidateHook,
|
||||
buildSlugField,
|
||||
buildSummaryField,
|
||||
trackSlugHistoryHook,
|
||||
} from '@intecion/ipal-kit'
|
||||
import { revalidatePath } from 'next/cache'
|
||||
|
||||
import { pageBlocks } from '@/blocks/configs'
|
||||
import { i18nConfig } from '@/i18n.config'
|
||||
|
||||
const revalidate = buildRevalidateHook({ config: i18nConfig, revalidatePath })
|
||||
|
||||
export const Pages: CollectionConfig = {
|
||||
slug: 'pages',
|
||||
admin: { defaultColumns: ['title', 'slug', 'updatedAt'], useAsTitle: 'title' },
|
||||
access: { read: () => true },
|
||||
fields: [
|
||||
{ name: 'title', type: 'text', localized: true, required: true },
|
||||
buildSlugField({ from: 'title' }),
|
||||
{ name: 'layout', type: 'blocks', blocks: pageBlocks, minRows: 1 },
|
||||
buildSummaryField(), // aiSummary — GEO (llms.txt, MCP)
|
||||
buildNoindexField(),
|
||||
{ name: 'slugHistory', type: 'array', admin: { readOnly: true }, fields: [{ name: 'slug', type: 'text' }] },
|
||||
],
|
||||
hooks: {
|
||||
afterChange: [revalidate.afterChange],
|
||||
afterDelete: [revalidate.afterDelete],
|
||||
beforeChange: [trackSlugHistoryHook],
|
||||
beforeDelete: [buildPreventDeleteSystemPage({ settingsSlug: 'site-settings' })],
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
import type { CollectionConfig } from 'payload'
|
||||
|
||||
import { buildRevalidateHook } from '@intecion/ipal-kit'
|
||||
import { revalidatePath } from 'next/cache'
|
||||
|
||||
import { i18nConfig } from '@/i18n.config'
|
||||
|
||||
import { entryFields } from './entryFields'
|
||||
|
||||
const revalidate = buildRevalidateHook({ config: i18nConfig, revalidatePath })
|
||||
|
||||
/** Blog entries — listed on the page assigned in Site settings → System pages → Blog (content.config.ts). */
|
||||
export const Posts: CollectionConfig = {
|
||||
slug: 'posts',
|
||||
admin: { defaultColumns: ['title', 'publishedAt', 'updatedAt'], useAsTitle: 'title' },
|
||||
access: { read: () => true },
|
||||
defaultSort: '-publishedAt',
|
||||
fields: entryFields,
|
||||
hooks: { afterChange: [revalidate.afterChange], afterDelete: [revalidate.afterDelete] },
|
||||
labels: { plural: { en: 'Blog posts', pl: 'Wpisy' }, singular: { en: 'Blog post', pl: 'Wpis' } },
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
import type { Field } from 'payload'
|
||||
|
||||
import { buildNoindexField, buildSlugField, buildSummaryField } from '@intecion/ipal-kit'
|
||||
|
||||
import { pageBlocks } from '@/blocks/configs'
|
||||
|
||||
/**
|
||||
* Fields every archive collection shares (posts, case studies). The entry card of the entry list block
|
||||
* reads `title`, `excerpt`, `media` and `publishedAt` (defaultEntryCard), so the names follow it.
|
||||
*/
|
||||
export const entryFields: Field[] = [
|
||||
{ name: 'title', type: 'text', localized: true, required: true },
|
||||
buildSlugField({ from: 'title' }),
|
||||
{ name: 'excerpt', type: 'textarea', localized: true, admin: { description: 'One or two sentences on the card in lists.' } },
|
||||
{ name: 'media', type: 'upload', relationTo: 'media', admin: { description: 'Card and share image.' } },
|
||||
{ name: 'publishedAt', type: 'date', admin: { position: 'sidebar' }, defaultValue: () => new Date().toISOString() },
|
||||
{ name: 'layout', type: 'blocks', blocks: pageBlocks },
|
||||
buildSummaryField(),
|
||||
buildNoindexField(),
|
||||
]
|
||||
@@ -0,0 +1,84 @@
|
||||
import { buttonClass } from '@intecion/ipal-kit/blocks/rsc'
|
||||
import { COLOR_DEFAULTS, FLUID_TOKENS, IPAL_TOKENS, type IpalTokenName, STATIC_DEFAULTS } from '@intecion/ipal-kit/tokens'
|
||||
|
||||
const COLORS = Object.keys(COLOR_DEFAULTS) as IpalTokenName[]
|
||||
const TYPE = ['text-display', 'text-h1', 'text-h2', 'text-h3', 'text-h4', 'text-lead', 'text-base', 'text-sm', 'text-xs']
|
||||
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 }
|
||||
|
||||
/**
|
||||
* 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) {
|
||||
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}
|
||||
>
|
||||
<h2 className="font-heading text-h3 text-fg-strong">{title}</h2>
|
||||
|
||||
<div className="grid gap-3">
|
||||
<h3 className="font-semibold text-fg-strong">Colour roles</h3>
|
||||
<ul className="grid grid-cols-2 gap-3 sm:grid-cols-3">
|
||||
{COLORS.map((name) => (
|
||||
<li className="flex items-center gap-3" key={name}>
|
||||
<span className="size-8 shrink-0 rounded-sm border border-border" style={{ background: IPAL_TOKENS[name] }} />
|
||||
<code className="text-xs text-fg-muted">{name}</code>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div className="grid gap-3">
|
||||
<h3 className="font-semibold text-fg-strong">Buttons, links, focus</h3>
|
||||
<div className="flex flex-wrap items-center gap-3">
|
||||
<a className={buttonClass('primary')} href="#design">Primary</a>
|
||||
<a className={buttonClass('secondary')} href="#design">Secondary</a>
|
||||
<a className={buttonClass('link')} href="#design">Link</a>
|
||||
<span className="rounded-control px-3 py-2 outline-2 outline-offset-2 outline-focus">Focus ring</span>
|
||||
</div>
|
||||
<p className="flex flex-wrap gap-3 text-sm">
|
||||
<span className="rounded-sm bg-success-surface px-2 py-1 text-success">success</span>
|
||||
<span className="rounded-sm bg-warning-surface px-2 py-1 text-warning">warning</span>
|
||||
<span className="rounded-sm bg-danger-surface px-2 py-1 text-danger">danger</span>
|
||||
<span className="rounded-sm bg-info-surface px-2 py-1 text-info">info</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="grid gap-2">
|
||||
<h3 className="font-semibold text-fg-strong">Type scale (fluid)</h3>
|
||||
{TYPE.map((cls) => (
|
||||
<p className={`${cls} ${cls.startsWith('text-h') || cls === 'text-display' ? 'font-heading leading-heading text-fg-strong' : ''}`} key={cls}>
|
||||
{cls} — Zażółć gęślą jaźń
|
||||
</p>
|
||||
))}
|
||||
</div>
|
||||
|
||||
<div className="grid gap-3">
|
||||
<h3 className="font-semibold text-fg-strong">Radius and depth</h3>
|
||||
<div className="flex flex-wrap gap-4">
|
||||
{RADII.map((cls) => (
|
||||
<span className={`grid size-20 place-items-center border border-border-strong bg-surface text-xs text-fg-muted ${cls}`} key={cls}>{cls.replace('rounded-', '')}</span>
|
||||
))}
|
||||
{SHADOWS.map((cls) => (
|
||||
<span className={`grid size-20 place-items-center rounded-card bg-surface text-xs text-fg-muted ${cls}`} key={cls}>{cls}</span>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<details className="grid gap-2">
|
||||
<summary className="cursor-pointer font-semibold text-fg-strong">Fluid and static tokens ({FLUID_TOKENS.length + Object.keys(STATIC_DEFAULTS).length})</summary>
|
||||
<ul className="mt-3 grid gap-1 text-xs text-fg-muted sm:grid-cols-2">
|
||||
{[...FLUID_TOKENS, ...Object.keys(STATIC_DEFAULTS)].map((name) => (
|
||||
<li key={name}><code>--ipal-{name}</code></li>
|
||||
))}
|
||||
</ul>
|
||||
</details>
|
||||
</section>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
import type { BuilderFormClassNames } from '@intecion/ipal-kit/client'
|
||||
import { buttonClass } from '@intecion/ipal-kit/blocks/rsc'
|
||||
|
||||
const control =
|
||||
'w-full rounded-control border border-border bg-surface px-3 py-2 text-fg placeholder:text-fg-muted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus'
|
||||
|
||||
/** The ONLY place panel forms are styled (ipal-form). Token utilities only — no hex, no dark:. */
|
||||
export const formClasses: BuilderFormClassNames = {
|
||||
actions: 'flex flex-wrap gap-3',
|
||||
back: buttonClass('secondary'),
|
||||
checkboxLabel: 'flex items-start gap-2 text-fg',
|
||||
choice: 'flex items-center gap-2',
|
||||
choices: 'grid gap-2',
|
||||
error: 'mt-1 text-sm text-danger',
|
||||
field: 'col-span-12',
|
||||
fieldHalf: 'md:col-span-6',
|
||||
fields: 'grid grid-cols-12 gap-4',
|
||||
form: 'grid gap-6',
|
||||
formError: 'rounded-control bg-danger-surface p-3 text-danger',
|
||||
input: control,
|
||||
label: 'mb-1 block font-medium text-fg-strong',
|
||||
legend: 'mb-1 font-medium text-fg-strong',
|
||||
progress: 'text-sm text-fg-muted',
|
||||
select: control,
|
||||
step: 'grid gap-4',
|
||||
stepDescription: 'text-fg-muted',
|
||||
stepTitle: 'font-heading text-h4 text-fg-strong',
|
||||
submit: buttonClass('primary'),
|
||||
success: 'rounded-card bg-success-surface p-6 text-fg',
|
||||
textarea: `${control} min-h-32`,
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
import { Container } from '@intecion/ipal-kit/blocks/rsc'
|
||||
import { NoSnippet } from '@intecion/ipal-kit/rsc'
|
||||
import Link from 'next/link'
|
||||
|
||||
import type { Company, Footer as FooterData } from '@/payload-types'
|
||||
|
||||
import { getSystemLinks, resolveNav } from '@/lib/content'
|
||||
|
||||
type Props = { company: Company; footer: FooterData; locale: string }
|
||||
|
||||
/** Footer: link columns, company data, legal links from System pages. Inside NoSnippet (seo.md). */
|
||||
export async function Footer({ company, footer, locale }: Props) {
|
||||
const [columns, legal] = await Promise.all([
|
||||
Promise.all((footer.columns ?? []).map(async (c) => ({ heading: c.heading, id: c.id, items: await resolveNav(c.items, locale) }))),
|
||||
getSystemLinks(locale),
|
||||
])
|
||||
const address = [company.address?.street, [company.address?.postalCode, company.address?.city].filter(Boolean).join(' ')].filter(Boolean).join(', ')
|
||||
return (
|
||||
<footer className="border-t border-border bg-surface-muted text-fg" data-surface="muted">
|
||||
<NoSnippet>
|
||||
<Container className="grid gap-10 py-section-sm md:grid-cols-4">
|
||||
<div className="grid content-start gap-2">
|
||||
<p className="font-heading text-h4 text-fg-strong">{company.name}</p>
|
||||
{address ? <p className="text-fg-muted">{address}</p> : null}
|
||||
{company.phone ? <a className="text-link hover:text-link-hover" href={`tel:${company.phone.replace(/[^\d+]/g, '')}`}>{company.phone}</a> : null}
|
||||
{company.email ? <a className="text-link hover:text-link-hover" href={`mailto:${company.email}`}>{company.email}</a> : null}
|
||||
{company.taxId ? <p className="text-sm text-fg-muted">NIP {company.taxId}</p> : null}
|
||||
</div>
|
||||
{columns.map((column) => (
|
||||
<nav aria-label={column.heading ?? undefined} className="grid content-start gap-2" key={column.id}>
|
||||
{column.heading ? <p className="font-semibold text-fg-strong">{column.heading}</p> : null}
|
||||
<ul className="grid gap-1">
|
||||
{column.items.map((item) => (
|
||||
<li key={item.href}>
|
||||
<Link className="text-fg-muted hover:text-link-hover" href={item.href} {...item.targetProps}>{item.label}</Link>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</nav>
|
||||
))}
|
||||
</Container>
|
||||
<Container className="flex flex-wrap items-center justify-between gap-4 border-t border-border py-6 text-sm text-fg-muted">
|
||||
<p>© {new Date().getFullYear()} {company.legalName ?? company.name}. {footer.note}</p>
|
||||
<ul className="flex flex-wrap gap-4">
|
||||
{legal.map((link) => (
|
||||
<li key={link.href}>
|
||||
<Link className="hover:text-link-hover" href={link.href}>{link.label}</Link>
|
||||
</li>
|
||||
))}
|
||||
{(company.socials ?? []).map((s) => (
|
||||
<li key={s.url}>
|
||||
<a className="hover:text-link-hover" href={s.url} rel="noopener noreferrer" target="_blank">{s.label}</a>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</Container>
|
||||
</NoSnippet>
|
||||
</footer>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
import { ThemeSwitcher } from '@intecion/ipal-kit/client'
|
||||
import { buttonClass, Container, Media } from '@intecion/ipal-kit/blocks/rsc'
|
||||
import Image from 'next/image'
|
||||
import Link from 'next/link'
|
||||
|
||||
import type { Header as HeaderData } from '@/payload-types'
|
||||
|
||||
import { i18nConfig } from '@/i18n.config'
|
||||
|
||||
import { resolveLink, resolveNav } from '@/lib/content'
|
||||
|
||||
import { LocaleSwitcher } from './LocaleSwitcher'
|
||||
import { MobileNav } from './MobileNav'
|
||||
|
||||
type Props = { header: HeaderData; locale: string; settings: null | Record<string, unknown>; themeLabel: null | string }
|
||||
|
||||
/** Site header: logo and name from Site settings, menu from the Header global (ipal-nav). */
|
||||
export async function Header({ header, locale, settings, themeLabel }: Props) {
|
||||
const items = await resolveNav(header.navItems, locale)
|
||||
const cta = header.links?.[0]?.link ? await resolveLink(header.links[0].link, locale) : null
|
||||
const home = `/${locale}`
|
||||
const logo = settings?.logo && typeof settings.logo === 'object' ? (settings.logo as Record<string, unknown>) : null
|
||||
return (
|
||||
<header className="sticky top-0 z-header border-b border-border bg-surface-raised/95 backdrop-blur">
|
||||
<Container className="flex items-center justify-between gap-6 py-4">
|
||||
<Link className="flex items-center gap-3 font-heading text-h4 text-fg-strong" href={home}>
|
||||
{logo ? <Media alt="" className="h-8 w-auto" Image={Image} priority resource={logo} sizes="160px" /> : null}
|
||||
<span>{typeof settings?.siteName === 'string' ? settings.siteName : null}</span>
|
||||
</Link>
|
||||
<nav aria-label={header.menuLabel ?? undefined} className="hidden md:block">
|
||||
<ul className="flex items-center gap-6">
|
||||
{items.map((item) => (
|
||||
<li key={item.href}>
|
||||
<Link className="text-fg hover:text-link-hover" href={item.href} {...item.targetProps}>
|
||||
{item.label}
|
||||
</Link>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</nav>
|
||||
<div className="flex items-center gap-3">
|
||||
<LocaleSwitcher config={i18nConfig} locale={locale} />
|
||||
{themeLabel ? <ThemeSwitcher classNames={{ dark: 'hidden dark:block', light: 'block dark:hidden', root: 'rounded-control p-2 text-fg hover:bg-hover' }} label={themeLabel} /> : null}
|
||||
{cta?.href ? (
|
||||
// wrapper: buttonClass carries its own inline-flex, so `hidden` goes on the parent
|
||||
<span className="hidden md:block">
|
||||
<Link className={buttonClass('primary')} href={cta.href}>
|
||||
{cta.label}
|
||||
</Link>
|
||||
</span>
|
||||
) : null}
|
||||
<MobileNav items={items} menuLabel={header.menuLabel ?? 'Menu'} />
|
||||
</div>
|
||||
</Container>
|
||||
</header>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
'use client'
|
||||
import type { I18nConfig } from '@intecion/ipal-kit'
|
||||
|
||||
import { LanguageSwitcher } from '@intecion/ipal-kit/client'
|
||||
|
||||
/** Client wrapper: renderLabel is a function, which a server component cannot pass to a client component. */
|
||||
export function LocaleSwitcher({ config, locale }: { config: I18nConfig; locale: string }) {
|
||||
return (
|
||||
<LanguageSwitcher
|
||||
classNames={{
|
||||
item: 'block px-3 py-2 text-fg hover:bg-hover',
|
||||
itemActive: 'font-semibold text-fg-strong',
|
||||
menu: 'absolute right-0 mt-2 min-w-32 rounded-card border border-border bg-surface-raised py-1 shadow-md',
|
||||
root: 'relative',
|
||||
trigger: 'rounded-control px-2 py-1 text-sm text-fg hover:bg-hover',
|
||||
}}
|
||||
config={config}
|
||||
currentLocale={locale}
|
||||
renderLabel={(l) => l.code.toUpperCase()}
|
||||
/>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
'use client'
|
||||
import type { NavItem } from '@intecion/ipal-kit'
|
||||
|
||||
import Link from 'next/link'
|
||||
import { useEffect, useState } from 'react'
|
||||
|
||||
/** Mobile menu: open state only, data via props (ipal-nav). Esc closes it. */
|
||||
export function MobileNav({ items, menuLabel }: { items: NavItem[]; menuLabel: string }) {
|
||||
const [open, setOpen] = useState(false)
|
||||
useEffect(() => {
|
||||
if (!open) {return}
|
||||
const onKey = (e: KeyboardEvent) => e.key === 'Escape' && setOpen(false)
|
||||
window.addEventListener('keydown', onKey)
|
||||
return () => window.removeEventListener('keydown', onKey)
|
||||
}, [open])
|
||||
return (
|
||||
<div className="md:hidden">
|
||||
<button
|
||||
aria-controls="mobile-nav"
|
||||
aria-expanded={open}
|
||||
className="rounded-control px-3 py-2 text-fg hover:bg-hover focus-visible:outline-2 focus-visible:outline-focus"
|
||||
onClick={() => setOpen(!open)}
|
||||
type="button"
|
||||
>
|
||||
{menuLabel}
|
||||
</button>
|
||||
{open ? (
|
||||
<ul className="absolute inset-x-0 top-full grid gap-1 border-b border-border bg-surface-raised p-4 shadow-md" id="mobile-nav">
|
||||
{items.map((item) => (
|
||||
<li key={item.href}>
|
||||
<Link className="block rounded-control px-3 py-2 text-fg hover:bg-hover" href={item.href} onClick={() => setOpen(false)}>
|
||||
{item.label}
|
||||
</Link>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
) : null}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import type { ContentOption } from '@intecion/ipal-kit'
|
||||
|
||||
/**
|
||||
* Collections with an archive page (docs/content.md). The archive page is picked in
|
||||
* Site settings → System pages, so `/pl/blog/<entry>` follows the page's slug.
|
||||
*/
|
||||
export const contentConfig: ContentOption = {
|
||||
collections: [
|
||||
{ slug: 'posts', label: 'Blog', perPage: 9 },
|
||||
{ slug: 'caseStudies', label: 'Case studies', perPage: 9 },
|
||||
],
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
import { mongooseAdapter } from '@payloadcms/db-mongodb'
|
||||
|
||||
// MongoDB only (AGENTS.md → Project decisions). Database name from databaseNamesFor('example-studio.pl'):
|
||||
// example-studiopl_dev locally, example-studiopl_prod in the Coolify MongoDB resource.
|
||||
export const db = mongooseAdapter({ url: process.env.DATABASE_URI ?? '' })
|
||||
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* GENERATED by `ipal-tokens` from src/design/tokens.ts — do not edit; change src/design/tokens.ts and run
|
||||
* `pnpm exec ipal-tokens`. Import it in styles.css after @intecion/ipal-kit/tokens.css (and tailwind.css).
|
||||
*/
|
||||
|
||||
: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"] {
|
||||
--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-text: oklch(0.18 0.02 160);
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
// src/design/tokens.ts — the ONLY file edited to rebrand the site (docs/design-tokens.md).
|
||||
// After every change: `pnpm tokens` → writes src/design/tokens.css (commit it) and prints the WCAG contrast check.
|
||||
// Leave out anything the brand does not change: the neutral defaults in @intecion/ipal-kit/tokens.css apply.
|
||||
import { defineTokens } from '@intecion/ipal-kit/tokens'
|
||||
|
||||
export const tokens = defineTokens({
|
||||
theme: 'both', // must match Site settings → Theme (seeded: system, toggle on)
|
||||
fluid: 'wide',
|
||||
color: {
|
||||
light: {
|
||||
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
|
||||
bg: 'oklch(0.985 0.006 85)', // warm paper white
|
||||
'surface-muted': 'oklch(0.955 0.012 85)',
|
||||
},
|
||||
dark: {
|
||||
primary: 'oklch(0.74 0.09 160)',
|
||||
'primary-text': 'oklch(0.18 0.02 160)', // dark text on the lighter dark-mode primary
|
||||
accent: 'oklch(0.76 0.12 55)',
|
||||
'accent-text': 'oklch(0.18 0.02 55)',
|
||||
'link-inverse': 'oklch(0.42 0.09 160)',
|
||||
bg: 'oklch(0.2 0.01 160)',
|
||||
'surface-muted': 'oklch(0.25 0.012 160)',
|
||||
},
|
||||
},
|
||||
font: { fwHeading: 600 },
|
||||
radius: { card: '0.25rem', control: '0.25rem' }, // "sharp": architectural, precise
|
||||
})
|
||||
@@ -0,0 +1,37 @@
|
||||
import type { GlobalConfig } from 'payload'
|
||||
|
||||
import { buildGlobalRevalidateHook } from '@intecion/ipal-kit'
|
||||
import { revalidatePath } from 'next/cache'
|
||||
|
||||
/** Company data for a PL market site: footer, contact block details, LocalBusiness JSON-LD. */
|
||||
export const Company: GlobalConfig = {
|
||||
slug: 'company',
|
||||
access: { read: () => true },
|
||||
fields: [
|
||||
{ name: 'name', type: 'text', required: true },
|
||||
{ name: 'legalName', type: 'text' },
|
||||
{ name: 'taxId', type: 'text', label: 'NIP' },
|
||||
{
|
||||
name: 'address',
|
||||
type: 'group',
|
||||
fields: [
|
||||
{ name: 'street', type: 'text' },
|
||||
{ name: 'postalCode', type: 'text' },
|
||||
{ name: 'city', type: 'text' },
|
||||
{ name: 'country', type: 'text', defaultValue: 'PL' },
|
||||
],
|
||||
},
|
||||
{ name: 'phone', type: 'text' },
|
||||
{ name: 'email', type: 'email' },
|
||||
{ name: 'hours', type: 'text', localized: true, admin: { description: 'Shown next to the contact form, e.g. "Mon–Fri 9:00–17:00".' } },
|
||||
{
|
||||
name: 'socials',
|
||||
type: 'array',
|
||||
fields: [
|
||||
{ name: 'label', type: 'text', required: true },
|
||||
{ name: 'url', type: 'text', required: true },
|
||||
],
|
||||
},
|
||||
],
|
||||
hooks: { afterChange: [buildGlobalRevalidateHook({ revalidatePath })] },
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
import type { GlobalConfig } from 'payload'
|
||||
|
||||
import { buildGlobalRevalidateHook, buildLinkField, rowLabel } from '@intecion/ipal-kit'
|
||||
import { revalidatePath } from 'next/cache'
|
||||
|
||||
/** ipal-nav: link columns and a note. Legal links come from System pages (getSystemLinks), not from here. */
|
||||
export const Footer: GlobalConfig = {
|
||||
slug: 'footer',
|
||||
access: { read: () => true },
|
||||
fields: [
|
||||
{
|
||||
name: 'columns',
|
||||
type: 'array',
|
||||
admin: { components: rowLabel('heading', 'Column'), initCollapsed: true },
|
||||
fields: [
|
||||
{ name: 'heading', type: 'text', localized: true },
|
||||
{
|
||||
name: 'items',
|
||||
type: 'array',
|
||||
admin: { components: rowLabel('link.label', 'Link'), initCollapsed: true },
|
||||
fields: [buildLinkField({ appearances: false })],
|
||||
labels: { plural: 'Links', singular: 'Link' },
|
||||
},
|
||||
],
|
||||
labels: { plural: 'Columns', singular: 'Column' },
|
||||
maxRows: 4,
|
||||
},
|
||||
{ name: 'note', type: 'textarea', localized: true },
|
||||
],
|
||||
hooks: { afterChange: [buildGlobalRevalidateHook({ revalidatePath })] },
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
import type { GlobalConfig } from 'payload'
|
||||
|
||||
import { buildGlobalRevalidateHook, buildLinkField, buildLinksField, rowLabel } from '@intecion/ipal-kit'
|
||||
import { revalidatePath } from 'next/cache'
|
||||
|
||||
/** ipal-nav: menu with one submenu level, a CTA button, the mobile menu label. Logo comes from Site settings. */
|
||||
export const Header: GlobalConfig = {
|
||||
slug: 'header',
|
||||
access: { read: () => true },
|
||||
fields: [
|
||||
{
|
||||
name: 'navItems',
|
||||
type: 'array',
|
||||
admin: { components: rowLabel('link.label', 'Menu item'), initCollapsed: true },
|
||||
fields: [
|
||||
buildLinkField({ appearances: false }),
|
||||
{
|
||||
name: 'subItems',
|
||||
type: 'array',
|
||||
admin: { components: rowLabel('link.label', 'Submenu item'), initCollapsed: true },
|
||||
fields: [buildLinkField({ appearances: false })],
|
||||
labels: { plural: 'Submenu', singular: 'Submenu item' },
|
||||
maxRows: 10,
|
||||
},
|
||||
],
|
||||
labels: { plural: 'Menu items', singular: 'Menu item' },
|
||||
maxRows: 8,
|
||||
},
|
||||
buildLinksField({ maxRows: 1 }),
|
||||
{ name: 'menuLabel', type: 'text', admin: { description: 'Accessible label of the mobile menu button, e.g. "Menu".' }, localized: true },
|
||||
],
|
||||
hooks: { afterChange: [buildGlobalRevalidateHook({ revalidatePath })] },
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import type { I18nConfig } from '@intecion/ipal-kit'
|
||||
|
||||
/** The ONLY source of languages (AGENT.md §3). Every language has a URL prefix: /pl/…, /en/…. */
|
||||
export const i18nConfig = {
|
||||
defaultLocale: 'pl',
|
||||
locales: [
|
||||
{ code: 'pl', label: 'Polski' },
|
||||
{ code: 'en', label: 'English' },
|
||||
],
|
||||
} as const satisfies I18nConfig
|
||||
|
||||
export type Locale = (typeof i18nConfig.locales)[number]['code']
|
||||
@@ -0,0 +1,14 @@
|
||||
import { assertEnv, ipalEnvRules } from '@intecion/ipal-kit/env'
|
||||
|
||||
export function register() {
|
||||
if (process.env.NEXT_RUNTIME !== 'nodejs') {return}
|
||||
// storage: R2 is required in production. ALLOW_LOCAL_MEDIA=1 lets a production build run on local disk for
|
||||
// local checks and CI only — never set it in Coolify.
|
||||
// databaseName: DATABASE_URI must name example-studiopl_dev / example-studiopl_prod (databaseNamesFor).
|
||||
// R2_PUBLIC_URL optional: media are served through the app by default (storage.md, env.md).
|
||||
assertEnv(
|
||||
ipalEnvRules({ databaseName: { domain: 'example-studio.pl' }, ipHeader: true, storage: process.env.ALLOW_LOCAL_MEDIA !== '1' }).map((rule) =>
|
||||
rule.name === 'R2_PUBLIC_URL' ? { ...rule, required: false } : rule,
|
||||
),
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
import { faqItemsFromLayout } from '@intecion/ipal-kit/blocks'
|
||||
import { buildLocalBusinessJsonLd, createContentHelpers } from '@intecion/ipal-kit'
|
||||
|
||||
import { getPayload } from 'payload'
|
||||
import { contentConfig } from '@/content.config'
|
||||
import { i18nConfig, type Locale } from '@/i18n.config'
|
||||
import config from '@/payload.config'
|
||||
|
||||
/** The ONLY access to Payload, routes, links and navigation (AGENT.md §3, PROGRAMISTA §2.7). */
|
||||
export const {
|
||||
// data
|
||||
getCachedPayload,
|
||||
getSettings,
|
||||
getConfiguredLocales,
|
||||
getConstructionMode,
|
||||
resolveRoute,
|
||||
getEntries,
|
||||
getNotFoundPage,
|
||||
generatePageMetadata,
|
||||
generateStaticParams,
|
||||
getPageJsonLd,
|
||||
resolvePageRedirect,
|
||||
i18n,
|
||||
// layout, forms, links
|
||||
getSiteShell,
|
||||
getFormTexts,
|
||||
getLinkOptions,
|
||||
getHomeSlug,
|
||||
resolveLink,
|
||||
resolveNav,
|
||||
getSystemLinks,
|
||||
// routes (re-exported in app/)
|
||||
sitemap,
|
||||
sitemapRoute,
|
||||
getRobots,
|
||||
manifest,
|
||||
llmsRoute,
|
||||
llmsFullRoute,
|
||||
markdownRoute,
|
||||
mcpGET,
|
||||
mcpPOST,
|
||||
healthRoute,
|
||||
indexNowKeyRoute,
|
||||
} = createContentHelpers({
|
||||
baseUrl: process.env.NEXT_PUBLIC_SERVER_URL,
|
||||
config,
|
||||
content: contentConfig,
|
||||
i18n: i18nConfig,
|
||||
markdownAlternate: true, // GEO: <link rel="alternate" type="text/markdown"> on every page
|
||||
mcp: { serverName: 'example-studio-site' },
|
||||
pageJsonLd: { faq: (doc) => faqItemsFromLayout(doc) }, // FAQ blocks → FAQPage rich results
|
||||
// LocalBusiness from the Company global (replaces the default WebSite + Organization from Site settings)
|
||||
siteJsonLd: async ({ baseUrl, locale }) => {
|
||||
const payload = await getPayload({ config })
|
||||
const company = await payload.findGlobal({ slug: 'company', locale: locale as Locale })
|
||||
return [
|
||||
buildLocalBusinessJsonLd({
|
||||
address: { city: company.address?.city ?? undefined, country: company.address?.country ?? 'PL', postalCode: company.address?.postalCode ?? undefined, street: company.address?.street ?? undefined },
|
||||
name: company.name,
|
||||
openingHours: company.hours ?? undefined,
|
||||
sameAs: (company.socials ?? []).map((s) => s.url),
|
||||
telephone: company.phone ?? undefined,
|
||||
type: 'ProfessionalService',
|
||||
url: baseUrl,
|
||||
}),
|
||||
]
|
||||
},
|
||||
summaryField: 'aiSummary',
|
||||
})
|
||||
@@ -0,0 +1,10 @@
|
||||
import { cache } from 'react'
|
||||
|
||||
import type { Locale } from '@/i18n.config'
|
||||
|
||||
import { getCachedPayload } from './content'
|
||||
|
||||
/** Cached getters for the project's own globals — the layout passes them down as props (ipal-nav). */
|
||||
export const getHeader = cache(async (locale: string) => (await getCachedPayload()).findGlobal({ slug: 'header', depth: 1, locale: locale as Locale }))
|
||||
export const getFooter = cache(async (locale: string) => (await getCachedPayload()).findGlobal({ slug: 'footer', depth: 1, locale: locale as Locale }))
|
||||
export const getCompany = cache(async (locale: string) => (await getCachedPayload()).findGlobal({ slug: 'company', locale: locale as Locale }))
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,58 @@
|
||||
import { payloadTotp } from '@clocklimited/payload-2fa'
|
||||
import { buildR2Storage, ipalKit, mailAdapter } from '@intecion/ipal-kit'
|
||||
import { lexicalEditor } from '@payloadcms/richtext-lexical'
|
||||
import { s3Storage } from '@payloadcms/storage-s3'
|
||||
import { revalidatePath } from 'next/cache'
|
||||
import path from 'path'
|
||||
import { buildConfig } from 'payload'
|
||||
import sharp from 'sharp'
|
||||
import { fileURLToPath } from 'url'
|
||||
|
||||
import { CaseStudies } from './collections/CaseStudies'
|
||||
import { Media } from './collections/Media'
|
||||
import { Pages } from './collections/Pages'
|
||||
import { Posts } from './collections/Posts'
|
||||
import { contentConfig } from './content.config'
|
||||
import { db } from './db'
|
||||
import { Company } from './globals/Company'
|
||||
import { Footer } from './globals/Footer'
|
||||
import { Header } from './globals/Header'
|
||||
import { i18nConfig } from './i18n.config'
|
||||
|
||||
const dirname = path.dirname(fileURLToPath(import.meta.url))
|
||||
|
||||
export default buildConfig({
|
||||
admin: {
|
||||
user: 'users',
|
||||
importMap: { baseDir: path.resolve(dirname) },
|
||||
},
|
||||
// absolute URLs in form e-mails (logo, links)
|
||||
serverURL: process.env.NEXT_PUBLIC_SERVER_URL,
|
||||
collections: [Pages, Posts, CaseStudies, Media], // ipalKit injects `users` (roles + 2FA)
|
||||
globals: [Header, Footer, Company],
|
||||
db,
|
||||
editor: lexicalEditor(),
|
||||
email: mailAdapter(), // transport from Site integrations (SMTP / Graph); without it form e-mails are not sent
|
||||
secret: process.env.PAYLOAD_SECRET ?? '',
|
||||
sharp,
|
||||
typescript: { outputFile: path.resolve(dirname, 'payload-types.ts') },
|
||||
plugins: [
|
||||
ipalKit({
|
||||
i18n: i18nConfig,
|
||||
access: { authCollection: 'users' },
|
||||
pages: { slug: 'pages' },
|
||||
content: contentConfig,
|
||||
seo: { collections: ['pages', 'posts', 'caseStudies'] },
|
||||
forms: { redirectRelationships: ['pages'], emailLayout: true },
|
||||
twoFactor: { issuer: 'Example Studio', plugin: payloadTotp },
|
||||
whiteLabel: true,
|
||||
indexNow: true,
|
||||
consentLog: true,
|
||||
// Privacy → Cookie review: scan + approval; crawl needs IPAL_COOKIE_SCAN_URL / IPAL_COOKIE_SCAN_TOKEN
|
||||
cookieScanner: { crawl: true },
|
||||
lightbox: true,
|
||||
revalidatePath,
|
||||
}),
|
||||
buildR2Storage(['media'], { s3Storage }), // R2 with the full R2_* set, local disk without it
|
||||
],
|
||||
})
|
||||
@@ -0,0 +1,10 @@
|
||||
import { createProxy } from '@intecion/ipal-kit'
|
||||
import { NextResponse } from 'next/server'
|
||||
|
||||
import { i18nConfig } from '@/i18n.config'
|
||||
|
||||
// markdown: true (GEO) — /md/… passes without a locale redirect; `Accept: text/markdown` gets the Markdown page
|
||||
export const proxy = createProxy(i18nConfig, { markdown: true, NextResponse })
|
||||
|
||||
// Inline LITERAL — Next reads the matcher statically (importing DEFAULT_PROXY_MATCHER breaks /admin)
|
||||
export const config = { matcher: ['/((?!api|admin|_next|.*\\..*).*)'] }
|
||||
@@ -0,0 +1,102 @@
|
||||
import type { Seeder } from '@intecion/ipal-kit/seed'
|
||||
|
||||
import { libraryBlockSlugs } from '@intecion/ipal-kit/blocks'
|
||||
import { pageTemplates, systemPageRefs } from '@intecion/ipal-kit/templates'
|
||||
|
||||
import { blockOptions } from '@/blocks/configs'
|
||||
|
||||
import { pageLink, tx } from './lib'
|
||||
|
||||
/**
|
||||
* BASE layer — what every new site needs, kept by the project starter: the standard pages from the library
|
||||
* templates ([TO FILL] where only the client can write), system page roles, navigation, cookie banner texts,
|
||||
* the cookie list and the image viewer labels. Create-only: pages and fields the demo layer (or an editor)
|
||||
* already filled are skipped.
|
||||
*/
|
||||
const blocks = libraryBlockSlugs(blockOptions)
|
||||
|
||||
export async function seedBaseGlobals(seed: Seeder) {
|
||||
await seed.fillGlobal('company', { email: '[TO FILL: e-mail that receives form submissions]', name: '[TO FILL: company name]' })
|
||||
await seed.fillGlobal('site-settings', {
|
||||
allowThemeToggle: true,
|
||||
defaultTheme: 'system',
|
||||
siteName: '[TO FILL: site name]',
|
||||
themeToggleLabel: tx('Tryb ciemny', 'Dark mode'),
|
||||
})
|
||||
}
|
||||
|
||||
export async function seedBasePages(seed: Seeder) {
|
||||
await seed.upsertBySlug('pages', [
|
||||
pageTemplates.home({ blocks }),
|
||||
pageTemplates.about({ blocks }),
|
||||
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.notFound({ blocks }),
|
||||
])
|
||||
}
|
||||
|
||||
export async function seedBaseNavigation(seed: Seeder) {
|
||||
const link = (label: { en: string; pl: string }, slug: string) => ({ link: { label, page: { $page: slug }, type: 'internal' } })
|
||||
await seed.fillGlobal('site-settings', {
|
||||
...systemPageRefs({ cookiePolicy: 'polityka-cookies', homepage: 'start', notFound: 'nie-znaleziono', privacyPolicy: 'polityka-prywatnosci', termsOfService: 'regulamin' }),
|
||||
postsArchive: { $page: 'blog' },
|
||||
})
|
||||
await seed.fillGlobal('header', {
|
||||
links: [pageLink(tx('Kontakt', 'Contact'), 'kontakt')],
|
||||
menuLabel: tx('Menu', 'Menu'),
|
||||
navItems: [link(tx('O nas', 'About'), 'o-nas'), link(tx('Usługi', 'Services'), 'uslugi'), link(tx('Blog', 'Blog'), 'blog'), link(tx('Kontakt', 'Contact'), 'kontakt')],
|
||||
})
|
||||
await seed.fillGlobal('footer', {
|
||||
columns: [{ heading: tx('Strona', 'Site'), items: [link(tx('O nas', 'About'), 'o-nas'), link(tx('Usługi', 'Services'), 'uslugi'), link(tx('Blog', 'Blog'), 'blog')] }],
|
||||
})
|
||||
}
|
||||
|
||||
/** Cookie banner and image viewer texts in both languages; the cookie list holds what the site itself sets. */
|
||||
export async function seedBaseTexts(seed: Seeder) {
|
||||
await seed.fillGlobal('cookie-settings', {
|
||||
alwaysActiveLabel: tx('Zawsze aktywne', 'Always active'),
|
||||
buttons: {
|
||||
acceptAll: tx('Akceptuj wszystkie', 'Accept all'),
|
||||
back: tx('Wstecz', 'Back'),
|
||||
close: tx('Zamknij', 'Close'),
|
||||
reject: tx('Odrzuć', 'Reject'),
|
||||
savePreferences: tx('Zapisz wybór', 'Save my choice'),
|
||||
settings: tx('Ustawienia', 'Settings'),
|
||||
},
|
||||
categories: [
|
||||
{ description: tx('Potrzebne, żeby strona działała: zapamiętują zgodę i język.', 'Needed for the site to work: they remember your consent and language.'), key: 'necessary', title: tx('Niezbędne', 'Necessary') },
|
||||
{ description: tx('Zapamiętują ustawienia, np. motyw jasny lub ciemny.', 'Remember settings such as the light or dark theme.'), key: 'functional', title: tx('Funkcjonalne', 'Functional') },
|
||||
{ description: tx('Pomagają zrozumieć, jak odwiedzający korzystają ze strony.', 'Help us understand how visitors use the site.'), key: 'analytics', title: tx('Analityczne', 'Analytics') },
|
||||
{ description: tx('Służą do mierzenia skuteczności reklam.', 'Used to measure how well ads work.'), key: 'marketing', title: tx('Marketingowe', 'Marketing') },
|
||||
],
|
||||
cookies: [
|
||||
{ category: 'necessary', duration: tx('12 miesięcy', '12 months'), name: 'cookie-consent', provider: tx('ta strona', 'this site'), purpose: tx('Zapamiętuje Twój wybór w sprawie cookies.', 'Remembers your cookie choice.'), storage: 'cookie' },
|
||||
{ category: 'necessary', duration: tx('12 miesięcy', '12 months'), name: 'NEXT_LOCALE', provider: tx('ta strona', 'this site'), purpose: tx('Zapamiętuje wybrany język.', 'Remembers the chosen language.'), storage: 'cookie' },
|
||||
{ category: 'functional', duration: tx('bez limitu', 'no expiry'), name: 'theme', provider: tx('ta strona', 'this site'), purpose: tx('Zapamiętuje motyw jasny lub ciemny.', 'Remembers the light or dark theme.'), storage: 'localStorage' },
|
||||
],
|
||||
detailLabels: { cookies: tx('Pliki cookies', 'Cookies'), duration: tx('Czas', 'Duration'), provider: tx('Dostawca', 'Provider'), purpose: tx('Cel', 'Purpose'), storage: tx('Rodzaj', 'Type') },
|
||||
message: tx(
|
||||
'Używamy niezbędnych plików cookies, żeby strona działała. Za Twoją zgodą użyjemy też cookies analitycznych.',
|
||||
'We use necessary cookies to make the site work. With your consent we also use analytics cookies.',
|
||||
),
|
||||
privacyLinkLabel: tx('Polityka prywatności', 'Privacy policy'),
|
||||
settingsDescription: tx('Wybierz, na które kategorie się zgadzasz. Zmienisz to w każdej chwili.', 'Choose which categories you agree to. You can change it at any time.'),
|
||||
settingsTitle: tx('Ustawienia cookies', 'Cookie settings'),
|
||||
title: tx('Szanujemy Twoją prywatność', 'We respect your privacy'),
|
||||
})
|
||||
await seed.fillGlobal('notifications', {
|
||||
lightbox: {
|
||||
close: tx('Zamknij', 'Close'),
|
||||
counter: tx('{current} / {total}', '{current} / {total}'),
|
||||
dialog: tx('Podgląd zdjęcia', 'Image viewer'),
|
||||
next: tx('Następne zdjęcie', 'Next image'),
|
||||
open: tx('Powiększ zdjęcie', 'Enlarge image'),
|
||||
previous: tx('Poprzednie zdjęcie', 'Previous image'),
|
||||
},
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,409 @@
|
||||
import type { Seeder } from '@intecion/ipal-kit/seed'
|
||||
|
||||
import { libraryBlockSlugs } from '@intecion/ipal-kit/blocks'
|
||||
import { pageTemplates, systemPageRefs } from '@intecion/ipal-kit/templates'
|
||||
|
||||
import { blockOptions } from '@/blocks/configs'
|
||||
|
||||
import { header, pageLink, rich, tx } from './lib'
|
||||
import { showcasePage } from './showcase'
|
||||
|
||||
/**
|
||||
* DEMO layer — the made-up company "Example Studio" / `Pracownia Przykład` (an architecture and interior studio).
|
||||
* Every name, number, address and quote here is invented. The project starter drops this file (starter.manifest.json).
|
||||
* Runs BEFORE the base layer: pages are create-only, so these filled pages win over the base templates' [TO FILL] versions.
|
||||
*/
|
||||
const blocks = libraryBlockSlugs(blockOptions)
|
||||
|
||||
const company = {
|
||||
address: { city: 'Warszawa', country: 'PL', postalCode: '00-000', street: 'ul. Przykładowa 1' },
|
||||
email: '[email protected]',
|
||||
hours: tx('pon.–pt. 9:00–17:00', 'Mon–Fri 9:00–17:00'),
|
||||
legalName: 'Pracownia Przykład sp. z o.o.',
|
||||
name: 'Example Studio',
|
||||
phone: '+48 000 000 000',
|
||||
socials: [
|
||||
{ label: 'Instagram', url: 'https://www.instagram.com/example' },
|
||||
{ label: 'LinkedIn', url: 'https://www.linkedin.com/company/example' },
|
||||
],
|
||||
taxId: '000-000-00-00',
|
||||
}
|
||||
|
||||
export const DEMO_NOTIFY_EMAIL = company.email
|
||||
|
||||
const contactCta = {
|
||||
header: header(tx('Masz działkę, budynek albo wnętrze do zaprojektowania?', 'Have a plot, a building or an interior to design?'), tx('Opowiedz nam o nim. Pierwsza rozmowa jest bezpłatna i do niczego nie zobowiązuje.', 'Tell us about it. The first conversation is free and commits you to nothing.')),
|
||||
links: [pageLink(tx('Umów rozmowę', 'Book a call'), 'kontakt'), pageLink(tx('Poproś o wycenę', 'Ask for a quote'), 'wycena', 'secondary')],
|
||||
variant: 'band',
|
||||
}
|
||||
|
||||
const SERVICES = [
|
||||
{
|
||||
benefits: [tx('Koncepcja w trzech wariantach', 'A concept in three options'), tx('Projekt budowlany i wykonawczy', 'Permit and construction drawings'), tx('Analiza nasłonecznienia', 'Daylight analysis'), tx('Kosztorys inwestorski', 'Cost estimate')],
|
||||
intro: tx('Domy jednorodzinne i małe budynki usługowe — od analizy działki po pozwolenie na budowę.', 'Single-family houses and small commercial buildings — from the site analysis to the building permit.'),
|
||||
media: 'facade',
|
||||
slug: { en: 'residential-architecture', pl: 'architektura-domow' },
|
||||
text: tx('Zaczynamy od działki: światła, widoków i tego, jak chcesz mieszkać. Dopiero potem rysujemy bryłę. Każdy projekt prowadzi jeden architekt, który odpowiada za całość aż do odbioru.', 'We start with the plot: its light, its views and how you want to live. Only then do we draw the building. One architect leads each project and stays responsible for it until handover.'),
|
||||
title: tx('Architektura domów', 'Residential architecture'),
|
||||
},
|
||||
{
|
||||
benefits: [tx('Układ funkcjonalny i meble na wymiar', 'Layout and built-in furniture'), tx('Dobór materiałów z próbkami', 'Materials chosen with samples'), tx('Wizualizacje każdego pomieszczenia', 'Renderings of every room'), tx('Lista zakupów z linkami', 'A shopping list with links')],
|
||||
intro: tx('Wnętrza mieszkań, domów i biur, które dobrze się starzeją.', 'Interiors for flats, houses and offices that age well.'),
|
||||
media: 'interior',
|
||||
slug: { en: 'interior-design', pl: 'projektowanie-wnetrz' },
|
||||
text: tx('Projektujemy wnętrza od układu ścian po klamki. Pracujemy na naturalnych materiałach i ponadczasowych formach, więc wnętrze nie zestarzeje się po dwóch sezonach.', 'We design interiors from the wall layout to the door handles. We work with natural materials and timeless forms, so the interior does not date after two seasons.'),
|
||||
title: tx('Projektowanie wnętrz', 'Interior design'),
|
||||
},
|
||||
{
|
||||
benefits: [tx('Wizyty na budowie co tydzień', 'Weekly site visits'), tx('Odbiory etapów z protokołem', 'Stage inspections with a report'), tx('Kontakt z wykonawcami', 'Liaison with contractors'), tx('Zmiany w projekcie na bieżąco', 'Design changes as you go')],
|
||||
intro: tx('Pilnujemy, żeby budynek powstał tak, jak został zaprojektowany.', 'We make sure the building is built the way it was designed.'),
|
||||
media: 'volumes',
|
||||
slug: { en: 'site-supervision', pl: 'nadzor-autorski' },
|
||||
text: tx('Nadzór autorski to nasza obecność na budowie: odpowiadamy na pytania wykonawców, sprawdzamy detale i dokumentujemy postęp. Ty dostajesz raport po każdej wizycie.', 'Site supervision means we are present on site: we answer the contractors’ questions, check the details and record the progress. You get a report after every visit.'),
|
||||
title: tx('Nadzór autorski', 'Site supervision'),
|
||||
},
|
||||
]
|
||||
|
||||
const POSTS = [
|
||||
{
|
||||
excerpt: tx('Pięć pytań, które warto zadać, zanim kupisz działkę pod dom.', 'Five questions to ask before you buy a plot for a house.'),
|
||||
media: 'courtyard',
|
||||
publishedAt: '2026-09-02T09:00:00.000Z',
|
||||
slug: { en: 'before-you-buy-a-plot', pl: 'zanim-kupisz-dzialke' },
|
||||
text: rich(
|
||||
['## Plan miejscowy', 'Miejscowy plan zagospodarowania przestrzennego mówi, co i jak wysoko można zbudować. Przeczytaj go przed podpisaniem umowy.', '## Media i dojazd', 'Sprawdź, czy prąd, woda i kanalizacja są w drodze, i ile kosztuje przyłącze.', '## Strony świata', 'Działka z wjazdem od północy pozwala otworzyć dom na ogród od południa.'],
|
||||
['## The local plan', 'The local zoning plan says what can be built and how tall. Read it before you sign anything.', '## Utilities and access', 'Check that power, water and sewage are in the road, and what the connection costs.', '## Orientation', 'A plot entered from the north lets the house open onto a south-facing garden.'],
|
||||
),
|
||||
title: tx('Zanim kupisz działkę', 'Before you buy a plot'),
|
||||
},
|
||||
{
|
||||
excerpt: tx('Dlaczego zaczynamy projekt od światła, a nie od rzutu.', 'Why we start a design with light, not with a floor plan.'),
|
||||
media: 'arches',
|
||||
publishedAt: '2026-09-23T09:00:00.000Z',
|
||||
slug: { en: 'designing-with-daylight', pl: 'projektowanie-ze-swiatlem' },
|
||||
text: rich(
|
||||
['## Światło jako materiał', 'Okno to nie otwór w ścianie, tylko sposób, w jaki dzień wchodzi do domu.', '## Analiza nasłonecznienia', 'Dla każdego projektu liczymy, ile godzin słońca dostaje każde pomieszczenie w grudniu i w czerwcu.'],
|
||||
['## Light as a material', 'A window is not a hole in a wall but the way the day enters the house.', '## Daylight analysis', 'For every project we calculate how many hours of sun each room gets in December and in June.'],
|
||||
),
|
||||
title: tx('Projektowanie ze światłem', 'Designing with daylight'),
|
||||
},
|
||||
{
|
||||
excerpt: tx('Drewno, wapno, glina: materiały, do których wracamy.', 'Timber, lime, clay: the materials we keep coming back to.'),
|
||||
media: 'pavilion',
|
||||
publishedAt: '2026-10-14T09:00:00.000Z',
|
||||
slug: { en: 'natural-materials', pl: 'naturalne-materialy' },
|
||||
text: rich(
|
||||
['## Drewno', 'Ciepłe w dotyku, łatwe w naprawie i coraz lepiej udokumentowane w przepisach.', '## Tynki wapienne', 'Oddychają, regulują wilgotność i pięknie się starzeją.'],
|
||||
['## Timber', 'Warm to the touch, easy to repair and increasingly well covered by the building code.', '## Lime plaster', 'It breathes, balances humidity and ages beautifully.'],
|
||||
),
|
||||
title: tx('Naturalne materiały', 'Natural materials'),
|
||||
},
|
||||
]
|
||||
|
||||
const CASES = [
|
||||
{
|
||||
excerpt: tx('Dom jednorodzinny na skraju lasu, 180 m².', 'A family house at the edge of a forest, 180 m².'),
|
||||
gallery: ['facade', 'interior', 'stairs'],
|
||||
media: 'facade',
|
||||
publishedAt: '2026-06-10T09:00:00.000Z',
|
||||
slug: { en: 'house-by-the-forest', pl: 'dom-pod-lasem' },
|
||||
stats: [[tx('180 m²', '180 m²'), tx('powierzchni użytkowej', 'of floor area')], [tx('14 mies.', '14 months'), tx('od koncepcji do odbioru', 'from concept to handover')]],
|
||||
text: tx('Parterowy dom z dachem dwuspadowym, otwarty na las przez przeszkloną ścianę salonu.', 'A single-storey house with a pitched roof, opening onto the forest through a glazed living-room wall.'),
|
||||
title: tx('Dom pod lasem', 'House by the forest'),
|
||||
},
|
||||
{
|
||||
excerpt: tx('Przebudowa kamienicy na sześć mieszkań.', 'A tenement building converted into six flats.'),
|
||||
gallery: ['library', 'courtyard', 'arches'],
|
||||
media: 'courtyard',
|
||||
publishedAt: '2026-07-21T09:00:00.000Z',
|
||||
slug: { en: 'tenement-conversion', pl: 'przebudowa-kamienicy' },
|
||||
stats: [[tx('6', '6'), tx('mieszkań', 'flats')], [tx('1912', '1912'), tx('rok budowy kamienicy', 'year the building was built')]],
|
||||
text: tx('Zachowaliśmy klatkę schodową i stropy, a w oficynie powstały jasne mieszkania z dostępem do dziedzińca.', 'We kept the staircase and the floors, and the rear wing now holds bright flats with access to the courtyard.'),
|
||||
title: tx('Przebudowa kamienicy', 'Tenement conversion'),
|
||||
},
|
||||
{
|
||||
excerpt: tx('Wnętrze kawiarni z czytelnią, 90 m².', 'A café interior with a reading room, 90 m².'),
|
||||
gallery: ['interior', 'library', 'pavilion'],
|
||||
media: 'library',
|
||||
publishedAt: '2026-08-30T09:00:00.000Z',
|
||||
slug: { en: 'cafe-reading-room', pl: 'kawiarnia-czytelnia' },
|
||||
stats: [[tx('90 m²', '90 m²'), tx('wnętrza', 'of interior')], [tx('40', '40'), tx('miejsc siedzących', 'seats')]],
|
||||
text: tx('Długi regał z dębu dzieli kawiarnię od cichej czytelni, a wapienne tynki wyciszają salę.', 'A long oak bookcase separates the café from a quiet reading room, and lime plaster softens the acoustics.'),
|
||||
title: tx('Kawiarnia z czytelnią', 'Café with a reading room'),
|
||||
},
|
||||
]
|
||||
|
||||
export async function seedDemoGlobals(seed: Seeder, media: Record<string, string>) {
|
||||
await seed.fillGlobal('company', company)
|
||||
await seed.fillGlobal('site-settings', {
|
||||
allowThemeToggle: true,
|
||||
defaultShareImage: media.arches,
|
||||
defaultTheme: 'system',
|
||||
favicon: media['icon-example-studio'],
|
||||
llmsIntro: tx(
|
||||
'Example Studio to fikcyjna pracownia architektury i wnętrz z Warszawy, stworzona jako strona referencyjna ipal-kit. Projektuje domy jednorodzinne, wnętrza i prowadzi nadzór autorski.',
|
||||
'Example Studio is a made-up architecture and interior studio from Warsaw, built as the ipal-kit reference site. It designs family houses and interiors and provides site supervision.',
|
||||
),
|
||||
siteDescription: tx('Pracownia architektury i wnętrz: domy, wnętrza, nadzór autorski. Projekty, które dobrze się starzeją.', 'Architecture and interior studio: houses, interiors, site supervision. Designs that age well.'),
|
||||
siteName: 'Example Studio',
|
||||
themeToggleLabel: tx('Tryb ciemny', 'Dark mode'),
|
||||
})
|
||||
}
|
||||
|
||||
export async function seedDemoPages(seed: Seeder, media: Record<string, string>) {
|
||||
const services = SERVICES.map((s, i) =>
|
||||
pageTemplates.service({
|
||||
blocks,
|
||||
form: { $form: 'Quote form' },
|
||||
overrides: {
|
||||
faq: { header: header(tx('Pytania o tę usługę', 'Questions about this service')), items: [{ answer: tx('Zwykle od dwóch do czterech miesięcy, zależnie od wielkości projektu.', 'Usually two to four months, depending on the size of the project.'), question: tx('Ile trwa projekt?', 'How long does a project take?') }, { answer: tx('Tak, pracujemy w całej Polsce; na budowę dojeżdżamy według harmonogramu.', 'Yes, we work across Poland and visit sites on a schedule.'), question: tx('Czy pracujecie poza Warszawą?', 'Do you work outside Warsaw?') }] },
|
||||
featureGrid: { header: header(tx('Co dostajesz', 'What you get')), items: s.benefits.map((heading) => ({ heading })) },
|
||||
gallery: { header: header(tx('Wybrane realizacje', 'Selected work')), items: ['facade', 'interior', 'courtyard'].map((m) => ({ media: media[m] })) },
|
||||
hero: { header: header(s.title, s.intro, tx('Usługa', 'Service')), media: media[s.media] },
|
||||
textMedia: { content: rich([s.text.pl], [s.text.en]), header: header(tx('Jak pracujemy', 'How we work')), media: media[['stairs', 'arches', 'pavilion'][i]] },
|
||||
},
|
||||
slug: s.slug,
|
||||
title: s.title,
|
||||
}),
|
||||
)
|
||||
|
||||
const blogIndex = pageTemplates.blogIndex({
|
||||
blocks,
|
||||
layout: (b) => [b[0], { blockType: 'entryList', collection: '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: 'cta', ...contactCta },
|
||||
],
|
||||
slug: { en: 'case-studies', pl: 'realizacje' },
|
||||
title: tx('Realizacje', 'Case studies'),
|
||||
}
|
||||
|
||||
const quote = {
|
||||
layout: [
|
||||
{ blockType: 'hero', header: header(tx('Wycena projektu', 'Project quote'), tx('Trzy krótkie kroki. Odpowiemy z wyceną w ciągu trzech dni roboczych.', 'Three short steps. We reply with a quote within three working days.')), variant: 'page' },
|
||||
{ blockType: 'contact', form: { $form: 'Quote form' }, variant: 'formOnly' },
|
||||
],
|
||||
slug: { en: 'quote', pl: 'wycena' },
|
||||
title: tx('Wycena', 'Quote'),
|
||||
}
|
||||
|
||||
await seed.upsertBySlug('pages', [
|
||||
pageTemplates.home({
|
||||
blocks,
|
||||
overrides: {
|
||||
cta: contactCta,
|
||||
faq: {
|
||||
header: header(tx('Najczęstsze pytania', 'Frequently asked questions')),
|
||||
items: [
|
||||
{ answer: tx('Pierwsza rozmowa jest bezpłatna. Potem przygotowujemy wycenę dopasowaną do zakresu.', 'The first conversation is free. Then we prepare a quote that fits the scope.'), question: tx('Ile kosztuje pierwsze spotkanie?', 'What does the first meeting cost?') },
|
||||
{ answer: tx('Projekt domu trwa zwykle od trzech do sześciu miesięcy, wnętrza — od jednego do trzech.', 'A house design usually takes three to six months; an interior one to three.'), question: tx('Jak długo trwa projekt?', 'How long does a design take?') },
|
||||
{ answer: tx('Tak. Prowadzimy cały proces, łącznie z wnioskiem i kontaktem z urzędem.', 'Yes. We handle the whole process, including the application and contact with the office.'), question: tx('Czy załatwiacie pozwolenie na budowę?', 'Do you handle the building permit?') },
|
||||
{ answer: tx('Tak, nadzór autorski jest osobną usługą i można go zamówić na każdym etapie.', 'Yes, site supervision is a separate service you can order at any stage.'), question: tx('Czy możecie nadzorować budowę?', 'Can you supervise the construction?') },
|
||||
],
|
||||
},
|
||||
featureGrid: {
|
||||
header: header(tx('Czym się zajmujemy', 'What we do'), tx('Trzy usługi, jeden zespół od pierwszego szkicu do odbioru.', 'Three services, one team from the first sketch to handover.')),
|
||||
items: SERVICES.map((s) => ({ heading: s.title, link: { label: s.title, page: { $page: s.slug.pl }, type: 'internal' }, text: s.intro })),
|
||||
},
|
||||
hero: {
|
||||
header: header(tx('Architektura, która dobrze się starzeje', 'Architecture that ages well'), tx('Projektujemy domy i wnętrza z naturalnych materiałów, z myślą o świetle i o tym, jak naprawdę mieszkasz.', 'We design houses and interiors in natural materials, with light in mind and the way you really live.'), tx('Pracownia architektury', 'Architecture studio')),
|
||||
links: [pageLink(tx('Umów rozmowę', 'Book a call'), 'kontakt'), pageLink(tx('Zobacz realizacje', 'See our work'), 'realizacje', 'secondary')],
|
||||
media: media.arches,
|
||||
},
|
||||
logos: { header: header(tx('Zaufali nam', 'They trust us')), items: ['logo-north', 'logo-oak', 'logo-vistula', 'logo-rynek'].map((m, i) => ({ heading: ['North Bank', 'Oak & Co', 'Vistula Homes', 'Rynek Hotel'][i], media: media[m] })) },
|
||||
stats: { items: [{ heading: tx('lat doświadczenia', 'years of experience'), value: '12' }, { heading: tx('zrealizowanych projektów', 'completed projects'), value: '140' }, { heading: tx('architektów w zespole', 'architects on the team'), value: '6' }] },
|
||||
testimonials: {
|
||||
header: header(tx('Co mówią klienci', 'What our clients say')),
|
||||
items: [
|
||||
{ heading: 'Marta K.', quote: tx('Dostaliśmy dom, w którym rano jest słońce w kuchni, a wieczorem w salonie. Dokładnie o to prosiliśmy.', 'We got a house with morning sun in the kitchen and evening sun in the living room. Exactly what we asked for.'), rating: 5, text: tx('Dom pod lasem', 'House by the forest') },
|
||||
{ heading: 'Piotr W.', quote: tx('Nadzór autorski oszczędził nam kilku drogich pomyłek wykonawcy.', 'Site supervision saved us from a few expensive contractor mistakes.'), rating: 5, text: tx('Przebudowa kamienicy', 'Tenement conversion') },
|
||||
{ heading: 'Ewa i Jan', quote: tx('Wnętrze po trzech latach wygląda tak samo dobrze jak w dniu odbioru.', 'Three years on, the interior looks as good as on handover day.'), rating: 5, text: tx('Kawiarnia z czytelnią', 'Café with a reading room') },
|
||||
],
|
||||
},
|
||||
textMedia: {
|
||||
content: rich(
|
||||
['Example Studio to sześcioro architektów z Warszawy. Każdy projekt prowadzi jedna osoba — od pierwszej rozmowy do odbioru kluczy.', 'Rysujemy ręcznie, liczymy dokładnie i odwiedzamy budowę co tydzień.'],
|
||||
['Example Studio is six architects from Warsaw. One person leads each project — from the first conversation to handing over the keys.', 'We sketch by hand, calculate carefully and visit the site every week.'],
|
||||
),
|
||||
header: header(tx('O nas', 'About us')),
|
||||
links: [pageLink(tx('Poznaj zespół', 'Meet the team'), 'o-nas', 'secondary')],
|
||||
media: media.interior,
|
||||
},
|
||||
},
|
||||
}),
|
||||
pageTemplates.about({
|
||||
blocks,
|
||||
overrides: {
|
||||
cta: contactCta,
|
||||
hero: { header: header(tx('O nas', 'About us'), tx('Mała pracownia, duża uważność.', 'A small studio that pays close attention.')), variant: 'page' },
|
||||
stats: { items: [{ heading: tx('założenie pracowni', 'studio founded'), value: '2014' }, { heading: tx('projektów domów', 'house designs'), value: '85' }, { heading: tx('projektów wnętrz', 'interior designs'), value: '55' }], variant: 'cards' },
|
||||
steps: {
|
||||
header: header(tx('Jak pracujemy', 'How we work')),
|
||||
items: [
|
||||
{ heading: tx('Rozmowa', 'Conversation'), text: tx('Poznajemy Ciebie, działkę albo wnętrze i budżet.', 'We get to know you, the site or interior, and the budget.') },
|
||||
{ heading: tx('Koncepcja', 'Concept'), text: tx('Trzy warianty do wyboru, z modelem i wizualizacjami.', 'Three options to choose from, with a model and renderings.') },
|
||||
{ heading: tx('Projekt', 'Design'), text: tx('Dokumentacja budowlana i wykonawcza, kosztorys.', 'Permit and construction drawings, cost estimate.') },
|
||||
{ heading: tx('Budowa', 'Construction'), text: tx('Nadzór autorski i odbiory etapów.', 'Site supervision and stage inspections.') },
|
||||
],
|
||||
},
|
||||
team: {
|
||||
header: header(tx('Zespół', 'The team')),
|
||||
items: [
|
||||
{ heading: 'Anna Przykładowa', media: media['person-anna'], text: tx('architektka, założycielka', 'architect, founder') },
|
||||
{ heading: 'Tomasz Testowy', media: media['person-tomasz'], text: tx('architekt, nadzór', 'architect, supervision') },
|
||||
{ heading: 'Julia Wzorcowa', media: media['person-julia'], text: tx('projektantka wnętrz', 'interior designer') },
|
||||
],
|
||||
},
|
||||
textMedia: {
|
||||
content: rich(
|
||||
['Pracownię założyliśmy w 2014 roku, żeby projektować mniej, ale lepiej.', 'Dziś bierzemy jednocześnie najwyżej osiem projektów, żeby każdy dostał pełną uwagę.'],
|
||||
['We founded the studio in 2014 to design less, but better.', 'Today we take on no more than eight projects at a time, so each gets our full attention.'],
|
||||
),
|
||||
header: header(tx('Nasza historia', 'Our story')),
|
||||
media: media.library,
|
||||
},
|
||||
},
|
||||
}),
|
||||
pageTemplates.services({
|
||||
blocks,
|
||||
overrides: {
|
||||
cta: contactCta,
|
||||
faq: { header: header(tx('Pytania o usługi', 'Questions about our services')), items: [{ answer: tx('Tak, każdą usługę można zamówić osobno.', 'Yes, each service can be ordered on its own.'), question: tx('Czy mogę zamówić tylko wnętrza?', 'Can I order only the interior?') }, { answer: tx('Ceny są orientacyjne; dokładną wycenę przygotowujemy po rozmowie.', 'Prices are indicative; we prepare an exact quote after a conversation.'), question: tx('Czy ceny są ostateczne?', 'Are the prices final?') }] },
|
||||
featureGrid: { header: header(tx('Usługi', 'Services')), items: SERVICES.map((s) => ({ heading: s.title, link: { label: s.title, page: { $page: s.slug.pl }, type: 'internal' }, text: s.intro })) },
|
||||
hero: { header: header(tx('Usługi', 'Services'), tx('Od działki do klucza w drzwiach.', 'From the plot to the key in the door.')), variant: 'page' },
|
||||
pricing: {
|
||||
header: header(tx('Cennik', 'Pricing')),
|
||||
highlightLabel: tx('Najczęściej wybierany', 'Most popular'),
|
||||
items: [
|
||||
{ features: [{ text: tx('Koncepcja', 'Concept') }, { text: tx('Wizualizacje', 'Renderings') }], heading: tx('Koncepcja', 'Concept'), period: tx('za projekt', 'per project'), price: tx('od 9 000 zł', 'from PLN 9,000') },
|
||||
{ features: [{ text: tx('Koncepcja', 'Concept') }, { text: tx('Projekt budowlany', 'Permit design') }, { text: tx('Projekt wykonawczy', 'Construction drawings') }], heading: tx('Pełny projekt', 'Full design'), highlighted: true, period: tx('za projekt', 'per project'), price: tx('od 39 000 zł', 'from PLN 39,000') },
|
||||
{ features: [{ text: tx('Wizyta co tydzień', 'Weekly visit') }, { text: tx('Raport z każdej wizyty', 'A report after each visit') }], heading: tx('Nadzór autorski', 'Site supervision'), period: tx('miesięcznie', 'per month'), price: tx('od 2 500 zł', 'from PLN 2,500') },
|
||||
],
|
||||
note: tx('Ceny netto, orientacyjne. Dokładną wycenę przygotujemy po rozmowie.', 'Net prices, indicative. We prepare an exact quote after a conversation.'),
|
||||
},
|
||||
steps: { header: header(tx('Jak to działa', 'How it works')), items: [{ heading: tx('Rozmowa i wycena', 'Conversation and quote') }, { heading: tx('Umowa i harmonogram', 'Contract and schedule') }, { heading: tx('Projekt i nadzór', 'Design and supervision') }] },
|
||||
},
|
||||
}),
|
||||
...services,
|
||||
pageTemplates.contact({
|
||||
blocks,
|
||||
form: { $form: 'Contact form' },
|
||||
overrides: {
|
||||
contact: { content: rich(['Odpowiadamy w ciągu jednego dnia roboczego. Wolisz porozmawiać? Zadzwoń w godzinach pracy pracowni.'], ['We reply within one working day. Prefer to talk? Call us during studio hours.']), form: { $form: 'Contact form' }, header: header(tx('Napisz do nas', 'Write to us')) },
|
||||
faq: { header: header(tx('Zanim napiszesz', 'Before you write')), items: [{ answer: tx('Adres działki albo mieszkania, przybliżony metraż i termin.', 'The address of the plot or flat, the rough floor area and the timing.'), question: tx('Co warto podać w wiadomości?', 'What should I include in the message?') }, { answer: tx('Tak, w pracowni albo online — jak wolisz.', 'Yes, at the studio or online — whichever you prefer.'), question: tx('Czy można się spotkać?', 'Can we meet?') }] },
|
||||
hero: { header: header(tx('Kontakt', 'Contact'), tx('Odpowiadamy w ciągu jednego dnia roboczego.', 'We reply within one working day.')), variant: 'page' },
|
||||
},
|
||||
}),
|
||||
quote,
|
||||
blogIndex,
|
||||
caseStudiesIndex,
|
||||
{
|
||||
...pageTemplates.legal('privacyPolicy', {
|
||||
blocks,
|
||||
overrides: {
|
||||
richText: {
|
||||
content: rich(
|
||||
['## Kto jest administratorem', 'To przykładowa treść strony referencyjnej, nie prawdziwa polityka. Administratorem danych w prawdziwym projekcie jest klient — treść przygotowuje on lub jego prawnik.', '## Jakie dane zbieramy', 'Dane z formularzy kontaktowych i wyceny, zapis zgody na cookies oraz anonimowe statystyki odwiedzin.', '## Twoje prawa', 'Dostęp do danych, ich poprawienie, usunięcie i sprzeciw wobec przetwarzania.'],
|
||||
['## Who the controller is', 'This is sample text on the reference site, not a real policy. In a real project the client is the controller — the text comes from them or their lawyer.', '## What data we collect', 'Data from the contact and quote forms, the cookie consent record and anonymous visit statistics.', '## Your rights', 'Access to your data, correction, deletion and objection to processing.'],
|
||||
),
|
||||
tableOfContents: { label: tx('Spis treści', 'Contents'), show: true },
|
||||
variant: 'narrow',
|
||||
},
|
||||
},
|
||||
}),
|
||||
noindex: true, // policies: noindex (AGENT.md §0c)
|
||||
},
|
||||
{
|
||||
...pageTemplates.legal('termsOfService', {
|
||||
blocks,
|
||||
overrides: {
|
||||
richText: {
|
||||
content: rich(['## Postanowienia ogólne', 'Przykładowa treść regulaminu strony referencyjnej.', '## Kontakt', 'Pytania o regulamin prosimy kierować przez formularz kontaktowy.'], ['## General terms', 'Sample terms of service on the reference site.', '## Contact', 'Please send questions about these terms through the contact form.']),
|
||||
tableOfContents: { label: tx('Spis treści', 'Contents'), show: true },
|
||||
variant: 'narrow',
|
||||
},
|
||||
},
|
||||
}),
|
||||
noindex: true, // policies: noindex (AGENT.md §0c)
|
||||
},
|
||||
{
|
||||
...pageTemplates.cookiePolicy({
|
||||
blocks,
|
||||
overrides: {
|
||||
richText: {
|
||||
content: rich(['## Czym są cookies', 'Małe pliki zapisywane przez przeglądarkę. Używamy ich tylko za Twoją zgodą, poza niezbędnymi.', '## Jak zmienić zgodę', 'Kliknij przycisk ustawień cookies w rogu strony.'], ['## What cookies are', 'Small files your browser stores. We use them only with your consent, except the necessary ones.', '## How to change your consent', 'Click the cookie settings button in the corner of the page.']),
|
||||
tableOfContents: { show: false },
|
||||
variant: 'narrow',
|
||||
},
|
||||
},
|
||||
}),
|
||||
noindex: true, // policies: noindex (AGENT.md §0c)
|
||||
},
|
||||
pageTemplates.notFound({ blocks }),
|
||||
showcasePage(media),
|
||||
])
|
||||
|
||||
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' } },
|
||||
}),
|
||||
aiSummary: p.excerpt,
|
||||
excerpt: p.excerpt,
|
||||
media: media[p.media],
|
||||
publishedAt: p.publishedAt,
|
||||
slug: p.slug,
|
||||
title: p.title,
|
||||
})))
|
||||
|
||||
await seed.upsertBySlug('caseStudies', CASES.map((c) => ({
|
||||
aiSummary: c.excerpt,
|
||||
excerpt: c.excerpt,
|
||||
layout: [
|
||||
{ blockType: 'hero', header: header(c.title, c.excerpt, tx('Realizacja', 'Case study')), media: media[c.media], variant: 'background' },
|
||||
{ blockType: 'textMedia', content: rich([c.text.pl], [c.text.en]), header: header(tx('Projekt', 'The project')), media: media[c.gallery[1]], variant: 'mediaRight' },
|
||||
{ blockType: 'stats', items: c.stats.map(([value, heading]) => ({ heading, value })), variant: 'cards' },
|
||||
{ blockType: 'gallery', columns: 'three', header: header(tx('Galeria', 'Gallery')), items: c.gallery.map((m) => ({ media: media[m] })), variant: 'grid' },
|
||||
{ blockType: 'cta', ...contactCta },
|
||||
],
|
||||
media: media[c.media],
|
||||
publishedAt: c.publishedAt,
|
||||
slug: c.slug,
|
||||
title: c.title,
|
||||
})))
|
||||
}
|
||||
|
||||
export async function seedDemoNavigation(seed: Seeder) {
|
||||
const link = (label: { en: string; pl: string }, slug: string) => ({ link: { label, page: { $page: slug }, type: 'internal' } })
|
||||
await seed.fillGlobal('site-settings', {
|
||||
...systemPageRefs({ cookiePolicy: 'polityka-cookies', homepage: 'start', notFound: 'nie-znaleziono', privacyPolicy: 'polityka-prywatnosci', termsOfService: 'regulamin' }),
|
||||
caseStudiesArchive: { $page: 'realizacje' },
|
||||
postsArchive: { $page: 'blog' },
|
||||
})
|
||||
await seed.fillGlobal('header', {
|
||||
links: [pageLink(tx('Wycena', 'Get a quote'), 'wycena')],
|
||||
menuLabel: tx('Menu', 'Menu'),
|
||||
navItems: [
|
||||
{ ...link(tx('Usługi', 'Services'), 'uslugi'), subItems: SERVICES.map((s) => link(s.title, s.slug.pl)) },
|
||||
link(tx('Realizacje', 'Case studies'), 'realizacje'),
|
||||
link(tx('O nas', 'About'), 'o-nas'),
|
||||
link(tx('Blog', 'Blog'), 'blog'),
|
||||
link(tx('Kontakt', 'Contact'), 'kontakt'),
|
||||
],
|
||||
})
|
||||
await seed.fillGlobal('footer', {
|
||||
columns: [
|
||||
{ heading: tx('Usługi', 'Services'), items: SERVICES.map((s) => link(s.title, s.slug.pl)) },
|
||||
{ heading: tx('Pracownia', 'Studio'), items: [link(tx('O nas', 'About'), 'o-nas'), link(tx('Realizacje', 'Case studies'), 'realizacje'), link(tx('Blog', 'Blog'), 'blog')] },
|
||||
{ heading: tx('Kontakt', 'Contact'), items: [link(tx('Napisz do nas', 'Write to us'), 'kontakt'), link(tx('Wycena', 'Get a quote'), 'wycena')] },
|
||||
],
|
||||
note: tx('Strona referencyjna ipal-kit — firma i treści są fikcyjne.', 'ipal-kit reference site — the company and content are made up.'),
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
import type { Seeder } from '@intecion/ipal-kit/seed'
|
||||
|
||||
import { richMessage, tx } from './lib'
|
||||
|
||||
type Localized = Record<string, string>
|
||||
const rich = (v: Localized) => Object.fromEntries(Object.entries(v).map(([l, text]) => [l, richMessage(text)]))
|
||||
|
||||
const consent = {
|
||||
blockType: 'checkbox',
|
||||
label: tx('Zgadzam się na przetwarzanie moich danych w celu odpowiedzi na wiadomość.', 'I agree to the processing of my data to answer this message.'),
|
||||
name: 'consent', // the name MUST stay `consent`; never pre-ticked
|
||||
required: true,
|
||||
width: 100,
|
||||
}
|
||||
|
||||
/** The two e-mails every form sends: a notification to the company and a confirmation to the sender (ipal-form). */
|
||||
function emails(notifyTo: string, subject: Localized, confirmationSubject: Localized) {
|
||||
return [
|
||||
{ emailTo: notifyTo, message: rich(tx('Nowe zgłoszenie z formularza:\n\n{{*:table}}', 'New form submission:\n\n{{*:table}}')), replyTo: '{{email}}', subject },
|
||||
{
|
||||
emailTo: '{{email}}',
|
||||
message: rich(
|
||||
tx(
|
||||
'Dzień dobry {{name}},\n\ndziękujemy za wiadomość. Odpowiemy w ciągu jednego dnia roboczego.\n\nTwoje zgłoszenie:\n{{*:table}}',
|
||||
'Hello {{name}},\n\nthank you for your message. We will reply within one working day.\n\nYour submission:\n{{*:table}}',
|
||||
),
|
||||
),
|
||||
replyTo: notifyTo,
|
||||
subject: confirmationSubject,
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
/**
|
||||
* The site's forms, matched by title. `notifyTo` comes from the Company global (or SEED_NOTIFY_EMAIL),
|
||||
* never from this file.
|
||||
*/
|
||||
export async function seedForms(seed: Seeder, notifyTo: string) {
|
||||
await seed.upsertBy('forms', { title: 'Contact form' }, {
|
||||
confirmationMessage: rich(tx('Dziękujemy! Odpowiemy w ciągu jednego dnia roboczego.', 'Thank you! We will reply within one working day.')),
|
||||
confirmationType: 'message',
|
||||
emails: emails(notifyTo, tx('Nowa wiadomość ze strony od {{name}}', 'New website message from {{name}}'), tx('Otrzymaliśmy Twoją wiadomość', 'We received your message')),
|
||||
fields: [
|
||||
{ blockType: 'text', label: tx('Imię i nazwisko', 'Full name'), name: 'name', required: true, width: 50 },
|
||||
{ blockType: 'email', label: tx('E-mail', 'E-mail'), name: 'email', required: true, width: 50 },
|
||||
{ blockType: 'text', label: tx('Telefon', 'Phone'), name: 'phone', width: 50 },
|
||||
{ blockType: 'textarea', label: tx('Wiadomość', 'Message'), name: 'message', required: true, width: 100 },
|
||||
consent,
|
||||
],
|
||||
submitButtonLabel: tx('Wyślij', 'Send'),
|
||||
title: 'Contact form',
|
||||
})
|
||||
|
||||
// Step-by-step quote form: steps, choice lists, a date, a message block.
|
||||
await seed.upsertBy('forms', { title: 'Quote form' }, {
|
||||
confirmationMessage: rich(tx('Dziękujemy! Wycenę prześlemy w ciągu trzech dni roboczych.', 'Thank you! We will send the quote within three working days.')),
|
||||
confirmationType: 'message',
|
||||
emails: emails(notifyTo, tx('Zapytanie o wycenę od {{name}}', 'Quote request from {{name}}'), tx('Otrzymaliśmy Twoje zapytanie', 'We received your request')),
|
||||
fields: [
|
||||
{ blockType: 'step', title: tx('Kontakt', 'Contact') },
|
||||
{ blockType: 'text', label: tx('Imię i nazwisko', 'Full name'), name: 'name', required: true, width: 50 },
|
||||
{ blockType: 'email', label: tx('E-mail', 'E-mail'), name: 'email', required: true, width: 50 },
|
||||
{ blockType: 'step', description: tx('Zaznacz, czego potrzebujesz.', 'Tick what you need.'), title: tx('Projekt', 'Project') },
|
||||
{
|
||||
blockType: 'checkboxGroup',
|
||||
label: tx('Zakres', 'Scope'),
|
||||
name: 'scope',
|
||||
options: [
|
||||
{ label: tx('Projekt budynku', 'Building design'), value: 'building' },
|
||||
{ label: tx('Projekt wnętrza', 'Interior design'), value: 'interior' },
|
||||
{ label: tx('Nadzór autorski', 'Site supervision'), value: 'supervision' },
|
||||
],
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
blockType: 'radio',
|
||||
label: tx('Powierzchnia', 'Floor area'),
|
||||
name: 'area',
|
||||
options: [
|
||||
{ label: tx('do 150 m²', 'up to 150 m²'), value: 's' },
|
||||
{ label: tx('150–500 m²', '150–500 m²'), value: 'm' },
|
||||
{ label: tx('powyżej 500 m²', 'over 500 m²'), value: 'l' },
|
||||
],
|
||||
required: true,
|
||||
},
|
||||
{ blockType: 'date', label: tx('Planowany start', 'Planned start'), name: 'start' },
|
||||
{ blockType: 'message', message: rich(tx('Dane przetwarzamy wyłącznie w celu przygotowania wyceny.', 'We use your data only to prepare the quote.')) },
|
||||
consent,
|
||||
],
|
||||
submitButtonLabel: tx('Wyślij zapytanie', 'Send request'),
|
||||
title: 'Quote form',
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
/**
|
||||
* Seeds of the reference site — rules: node_modules/@intecion/ipal-kit/docs/seeding.md.
|
||||
*
|
||||
* pnpm seed # everything: demo layer first (filled pages win), then the base layer
|
||||
* pnpm seed:base # only what every new site keeps (the project starter runs this one)
|
||||
* pnpm seed:demo # only the made-up company's content (needs the base forms)
|
||||
* SEED_DRY_RUN=1 pnpm seed # print the plan, write nothing
|
||||
*
|
||||
* VERY IMPORTANT — after launch: never the whole seed again. Name the records the run may touch:
|
||||
* SEED_ONLY="pages:kontakt" SEED_DRY_RUN=1 pnpm seed → Backup now (Coolify) → the same without SEED_DRY_RUN
|
||||
* createSeeder refuses a run without SEED_ONLY on production or a non-local database (IPAL_SEED_ALLOW_FULL=1
|
||||
* only with the owner's explicit OK). Pages are create-only; an edited record is skipped.
|
||||
*/
|
||||
import config from '@payload-config'
|
||||
import { createSeeder } from '@intecion/ipal-kit/seed'
|
||||
import { getPayload } from 'payload'
|
||||
|
||||
import { seedBaseGlobals, seedBaseNavigation, seedBasePages, seedBaseTexts } from './base'
|
||||
import { DEMO_NOTIFY_EMAIL, seedDemoGlobals, seedDemoNavigation, seedDemoPages } from './demo'
|
||||
import { seedForms } from './forms'
|
||||
import { seedMedia } from './media'
|
||||
|
||||
const layer = process.env.SEED_LAYER ?? 'all'
|
||||
const withDemo = layer === 'all' || layer === 'demo'
|
||||
const withBase = layer === 'all' || layer === 'base'
|
||||
|
||||
const payload = await getPayload({ config })
|
||||
const seed = createSeeder(payload)
|
||||
|
||||
const media = withDemo ? await seedMedia(payload) : {}
|
||||
if (withDemo) {await seedDemoGlobals(seed, media)}
|
||||
if (withBase) {await seedBaseGlobals(seed)}
|
||||
|
||||
// Forms need the inbox that receives submissions: SEED_NOTIFY_EMAIL, else the Company global — never a guess.
|
||||
const company = (await payload.findGlobal({ slug: 'company' })) as { email?: null | string }
|
||||
const notifyTo = process.env.SEED_NOTIFY_EMAIL?.trim() || (withDemo ? DEMO_NOTIFY_EMAIL : company.email?.trim()) || ''
|
||||
if (/^[^\s@,;]+@[^\s@,;]+\.[^\s@,;]+$/.test(notifyTo)) {
|
||||
await seedForms(seed, notifyTo)
|
||||
} else {
|
||||
console.error('[seed] Forms skipped: fill Company → E-mail in the panel or run with SEED_NOTIFY_EMAIL=… (ask the client which inbox).')
|
||||
}
|
||||
|
||||
if (withDemo) {
|
||||
await seedDemoPages(seed, media)
|
||||
await seedDemoNavigation(seed)
|
||||
}
|
||||
if (withBase) {
|
||||
await seedBasePages(seed)
|
||||
await seedBaseNavigation(seed)
|
||||
await seedBaseTexts(seed)
|
||||
}
|
||||
|
||||
const { errors } = seed.summary()
|
||||
process.exit(errors ? 1 : 0)
|
||||
@@ -0,0 +1,33 @@
|
||||
/** Seed value helpers — every text written once, both languages side by side (docs/seeding.md). */
|
||||
export type L = { en: string; pl: string }
|
||||
|
||||
export const tx = (pl: string, en: string): L => ({ en, pl })
|
||||
|
||||
const textNode = (t: string) => ({ type: 'text', detail: 0, format: 0, mode: 'normal', style: '', text: t, version: 1 })
|
||||
const paragraph = (t: string) => ({ type: 'paragraph', children: [textNode(t)], direction: 'ltr', format: '', indent: 0, textFormat: 0, version: 1 })
|
||||
const heading = (t: string, tag: 'h2' | 'h3') => ({ type: 'heading', children: [textNode(t)], direction: 'ltr', format: '', indent: 0, tag, version: 1 })
|
||||
const root = (children: unknown[]) => ({ root: { type: 'root', children, direction: 'ltr', format: '', indent: 0, version: 1 } })
|
||||
|
||||
/** Rich text from paragraphs; a line starting with "## " is an h2, "### " an h3. One value per locale. */
|
||||
export function rich(pl: string[], en: string[]) {
|
||||
const doc = (lines: string[]) =>
|
||||
root(lines.map((l) => (l.startsWith('### ') ? heading(l.slice(4), 'h3') : l.startsWith('## ') ? heading(l.slice(3), 'h2') : paragraph(l))))
|
||||
return { en: doc(en), pl: doc(pl) }
|
||||
}
|
||||
|
||||
/** Plain text (blank-line paragraphs, single newlines as line breaks) → rich text, as form-builder messages expect. */
|
||||
export function richMessage(text: string) {
|
||||
return root(
|
||||
text.split(/\n{2,}/).map((para) => ({
|
||||
...paragraph(''),
|
||||
children: para.split('\n').flatMap((line, i) => [...(i ? [{ type: 'linebreak', version: 1 }] : []), textNode(line)]),
|
||||
})),
|
||||
)
|
||||
}
|
||||
|
||||
export const header = (heading: L, intro?: L, eyebrow?: L) => ({ ...(eyebrow ? { eyebrow } : {}), heading, ...(intro ? { intro } : {}) })
|
||||
|
||||
/** A button / link to a page by its default-locale (pl) slug. */
|
||||
export const pageLink = (label: L, slug: string, appearance: 'link' | 'primary' | 'secondary' = 'primary') => ({
|
||||
link: { type: 'internal', appearance, label, page: { $page: slug } },
|
||||
})
|
||||
@@ -0,0 +1,67 @@
|
||||
import type { Payload } from 'payload'
|
||||
|
||||
import sharp from 'sharp'
|
||||
|
||||
import type { L } from './lib'
|
||||
|
||||
/**
|
||||
* Placeholder images, generated (no stock photos, no licences, nothing real): soft architectural shapes in the
|
||||
* brand palette. Each is created once, matched by file name, and returned as a name → media id map.
|
||||
*/
|
||||
const IMAGES: { alt: L; hue: number; name: string; shape: 'arches' | 'blocks' | 'stairs' | 'windows' }[] = [
|
||||
{ alt: { en: 'Abstract illustration: arches in sage green', pl: 'Abstrakcyjna ilustracja: łuki w odcieniach szałwii' }, hue: 160, name: 'arches', shape: 'arches' },
|
||||
{ alt: { en: 'Abstract illustration: a stair of terracotta blocks', pl: 'Abstrakcyjna ilustracja: schody z terakotowych brył' }, hue: 50, name: 'stairs', shape: 'stairs' },
|
||||
{ alt: { en: 'Abstract illustration: a façade with windows', pl: 'Abstrakcyjna ilustracja: elewacja z oknami' }, hue: 200, name: 'facade', shape: 'windows' },
|
||||
{ alt: { en: 'Abstract illustration: stacked volumes', pl: 'Abstrakcyjna ilustracja: piętrzące się bryły' }, hue: 120, name: 'volumes', shape: 'blocks' },
|
||||
{ alt: { en: 'Abstract illustration: a quiet interior in warm light', pl: 'Abstrakcyjna ilustracja: spokojne wnętrze w ciepłym świetle' }, hue: 70, name: 'interior', shape: 'arches' },
|
||||
{ alt: { en: 'Abstract illustration: a courtyard seen from above', pl: 'Abstrakcyjna ilustracja: dziedziniec z góry' }, hue: 180, name: 'courtyard', shape: 'blocks' },
|
||||
{ alt: { en: 'Abstract illustration: a timber pavilion', pl: 'Abstrakcyjna ilustracja: drewniany pawilon' }, hue: 40, name: 'pavilion', shape: 'stairs' },
|
||||
{ alt: { en: 'Abstract illustration: a reading room', pl: 'Abstrakcyjna ilustracja: czytelnia' }, hue: 220, name: 'library', shape: 'windows' },
|
||||
{ alt: { en: 'Portrait placeholder: Anna', pl: 'Portret zastępczy: Anna' }, hue: 150, name: 'person-anna', shape: 'arches' },
|
||||
{ alt: { en: 'Portrait placeholder: Tomasz', pl: 'Portret zastępczy: Tomasz' }, hue: 30, name: 'person-tomasz', shape: 'arches' },
|
||||
{ alt: { en: 'Portrait placeholder: Julia', pl: 'Portret zastępczy: Julia' }, hue: 260, name: 'person-julia', shape: 'arches' },
|
||||
{ alt: { en: 'Logo placeholder: North Bank', pl: 'Logo zastępcze: North Bank' }, hue: 210, name: 'logo-north', shape: 'blocks' },
|
||||
{ alt: { en: 'Logo placeholder: Oak & Co', pl: 'Logo zastępcze: Oak & Co' }, hue: 90, name: 'logo-oak', shape: 'blocks' },
|
||||
{ alt: { en: 'Logo placeholder: Vistula Homes', pl: 'Logo zastępcze: Vistula Homes' }, hue: 190, name: 'logo-vistula', shape: 'blocks' },
|
||||
{ alt: { en: 'Logo placeholder: Rynek Hotel', pl: 'Logo zastępcze: Rynek Hotel' }, hue: 20, name: 'logo-rynek', shape: 'blocks' },
|
||||
{ alt: { en: 'Example Studio logo', pl: 'Logo Example Studio' }, hue: 160, name: 'logo-example-studio', shape: 'blocks' },
|
||||
{ alt: { en: 'Example Studio icon', pl: 'Ikona Example Studio' }, hue: 160, name: 'icon-example-studio', shape: 'arches' },
|
||||
]
|
||||
|
||||
function svg(shape: string, hue: number, w: number, h: number) {
|
||||
// hsl, not oklch: sharp's SVG renderer (librsvg) does not read oklch() and paints it black
|
||||
const c = (l: number, ch = 0.06) => `hsl(${hue} ${Math.round(ch * 500)}% ${Math.round(l * 100)}%)`
|
||||
const shapes: Record<string, string> = {
|
||||
arches: [0, 1, 2, 3].map((i) => `<path d="M${120 + i * 260} ${h} V${h * 0.45} a110 110 0 0 1 220 0 V${h}Z" fill="${c(0.55 + i * 0.08)}"/>`).join(''),
|
||||
blocks: [0, 1, 2, 3, 4].map((i) => `<rect x="${80 + i * 210}" y="${h * (0.25 + (i % 3) * 0.12)}" width="180" height="${h}" fill="${c(0.5 + i * 0.07)}"/>`).join(''),
|
||||
stairs: [0, 1, 2, 3, 4, 5].map((i) => `<rect x="${60 + i * 180}" y="${h * (0.75 - i * 0.1)}" width="190" height="${h}" fill="${c(0.48 + i * 0.06, 0.09)}"/>`).join(''),
|
||||
windows: Array.from({ length: 15 }, (_, i) => `<rect x="${140 + (i % 5) * 200}" y="${110 + Math.floor(i / 5) * 230}" width="120" height="170" rx="60" fill="${c(0.92, 0.02)}"/>`).join(''),
|
||||
}
|
||||
return `<svg xmlns="http://www.w3.org/2000/svg" width="${w}" height="${h}" viewBox="0 0 ${w} ${h}"><rect width="100%" height="100%" fill="${c(0.88, 0.03)}"/>${shapes[shape]}</svg>`
|
||||
}
|
||||
|
||||
export async function seedMedia(payload: Payload): Promise<Record<string, string>> {
|
||||
const ids: Record<string, string> = {}
|
||||
for (const image of IMAGES) {
|
||||
const filename = `${image.name}.webp`
|
||||
const found = await payload.find({ collection: 'media', limit: 1, where: { filename: { equals: filename } } })
|
||||
if (found.docs[0]) {
|
||||
ids[image.name] = String(found.docs[0].id)
|
||||
continue
|
||||
}
|
||||
const portrait = image.name.startsWith('person-')
|
||||
const [w, h] = portrait ? [800, 1000] : image.name.startsWith('icon-') ? [512, 512] : image.name.startsWith('logo-') ? [1200, 480] : [1600, 1000]
|
||||
const data = await sharp(Buffer.from(svg(image.shape, image.hue, 1200, 900))).resize(w, h, { fit: 'cover' }).webp({ quality: 78 }).toBuffer()
|
||||
const doc = await payload.create({
|
||||
collection: 'media',
|
||||
context: { disableRevalidate: true },
|
||||
data: { alt: image.alt.pl },
|
||||
file: { data, mimetype: 'image/webp', name: filename, size: data.length },
|
||||
locale: 'pl',
|
||||
})
|
||||
await payload.update({ id: doc.id, collection: 'media', context: { disableRevalidate: true }, data: { alt: image.alt.en }, locale: 'en' })
|
||||
ids[image.name] = String(doc.id)
|
||||
console.log(`[seed] create media ${filename}`)
|
||||
}
|
||||
return ids
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
import { blockLibraryManifest } from '@intecion/ipal-kit/blocks'
|
||||
|
||||
import { header, pageLink, rich, tx } from './lib'
|
||||
|
||||
/**
|
||||
* The Blocks showcase page (`/pl/bloki`, `/en/blocks`, noindex): every library block in every variant from
|
||||
* blockLibraryManifest — so a new block or variant shows up here with no code change — plus each block once on
|
||||
* the inverted background (data-surface="inverse"), which tests the token re-mapping inside inverse sections.
|
||||
* DEMO layer: the starter drops it.
|
||||
*/
|
||||
function sample(slug: string, media: Record<string, string>): Record<string, unknown> {
|
||||
const items = (n: number, make: (i: number) => Record<string, unknown>) => Array.from({ length: n }, (_, i) => make(i + 1))
|
||||
const text = (i: number) => tx(`Krótki opis elementu ${i}, jedno albo dwa zdania.`, `A short description of item ${i}, one or two sentences.`)
|
||||
const pics = ['arches', 'stairs', 'facade', 'volumes', 'interior', 'courtyard']
|
||||
switch (slug) {
|
||||
case 'contact':
|
||||
return { content: rich(['Treść obok formularza: godziny, adres, kto odpowiada.'], ['Text beside the form: hours, address, who replies.']), form: { $form: 'Contact form' } }
|
||||
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' }
|
||||
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':
|
||||
return { columns: 'three', items: items(3, (i) => ({ heading: tx(`Cecha ${i}`, `Feature ${i}`), link: { label: tx('Więcej', 'More'), page: { $page: 'uslugi' }, type: 'internal' }, text: text(i) })) }
|
||||
case 'gallery':
|
||||
return { columns: 'three', items: pics.map((m, i) => ({ caption: tx(`Podpis zdjęcia ${i + 1}`, `Image caption ${i + 1}`), media: media[m] })) }
|
||||
case 'hero':
|
||||
return { links: [pageLink(tx('Główny przycisk', 'Primary button'), 'kontakt'), pageLink(tx('Drugi przycisk', 'Secondary button'), 'o-nas', 'secondary')], media: media.arches }
|
||||
case 'logos':
|
||||
return { items: ['logo-north', 'logo-oak', 'logo-vistula', 'logo-rynek'].map((m, i) => ({ heading: ['North Bank', 'Oak & Co', 'Vistula Homes', 'Rynek Hotel'][i], media: media[m] })) }
|
||||
case 'pricing':
|
||||
return {
|
||||
highlightLabel: tx('Polecany', 'Recommended'),
|
||||
items: items(3, (i) => ({ features: items(3, (f) => ({ text: tx(`Zawiera ${f}`, `Includes ${f}`) })), heading: tx(`Pakiet ${i}`, `Plan ${i}`), highlighted: i === 2, link: { appearance: i === 2 ? 'primary' : 'secondary', label: tx('Wybierz', 'Choose'), page: { $page: 'kontakt' }, type: 'internal' }, period: tx('miesięcznie', 'per month'), price: `${i * 1000} zł`, text: text(i) })),
|
||||
note: tx('Ceny netto.', 'Net prices.'),
|
||||
}
|
||||
case 'richText':
|
||||
return {
|
||||
content: rich(['## Pierwszy nagłówek', 'Akapit tekstu pod nagłówkiem.', '## Drugi nagłówek', 'Kolejny akapit.', '### Podnagłówek', 'Tekst w podsekcji.'], ['## First heading', 'A paragraph under the heading.', '## Second heading', 'Another paragraph.', '### Subheading', 'Text in a subsection.']),
|
||||
tableOfContents: { label: tx('Spis treści', 'Contents'), show: true },
|
||||
}
|
||||
case 'stats':
|
||||
return { items: [{ heading: tx('lat', 'years'), text: tx('na rynku', 'in business'), value: '12' }, { heading: tx('projektów', 'projects'), value: '140' }, { heading: tx('nagród', 'awards'), value: '9' }] }
|
||||
case 'steps':
|
||||
return { items: items(4, (i) => ({ heading: tx(`Krok ${i}`, `Step ${i}`), text: text(i) })) }
|
||||
case 'team':
|
||||
return { items: ['anna', 'tomasz', 'julia'].map((p, i) => ({ heading: ['Anna Przykładowa', 'Tomasz Testowy', 'Julia Wzorcowa'][i], media: media[`person-${p}`], text: tx('stanowisko', 'role') })) }
|
||||
case 'testimonials':
|
||||
return { items: items(3, (i) => ({ heading: `Klient ${i}`, quote: tx(`Przykładowa opinia numer ${i}.`, `Sample testimonial number ${i}.`), rating: 5, text: tx('Projekt', 'Project') })) }
|
||||
case 'textMedia':
|
||||
return { content: rich(['Akapit tekstu obok obrazu. Na małych ekranach tekst jest pierwszy.'], ['A paragraph beside the image. On small screens the text comes first.']), links: [pageLink(tx('Przycisk', 'Button'), 'kontakt', 'secondary')], media: media.interior }
|
||||
default:
|
||||
return {}
|
||||
}
|
||||
}
|
||||
|
||||
export function showcasePage(media: Record<string, string>) {
|
||||
const layout: Record<string, unknown>[] = [
|
||||
{ blockType: 'hero', header: header(tx('Biblioteka bloków', 'Block library'), tx('Każdy blok w każdym wariancie, także na odwróconym tle. Strona nie jest indeksowana.', 'Every block in every variant, also on the inverted background. This page is not indexed.')), variant: 'page' },
|
||||
]
|
||||
for (const block of blockLibraryManifest.blocks.filter((b) => b.phase === 1)) {
|
||||
const variants = block.variants.length ? block.variants : [null]
|
||||
for (const variant of variants) {
|
||||
layout.push({
|
||||
blockType: block.slug,
|
||||
header: header(tx(`${block.slug} — ${variant ?? 'domyślny'}`, `${block.slug} — ${variant ?? 'default'}`), tx('Tło domyślne.', 'Default background.'), tx('Blok', 'Block')),
|
||||
...sample(block.slug, media),
|
||||
...(variant ? { variant } : {}),
|
||||
})
|
||||
}
|
||||
layout.push({
|
||||
blockType: block.slug,
|
||||
header: header(tx(`${block.slug} — ${variants[0] ?? 'domyślny'}, tło odwrócone`, `${block.slug} — ${variants[0] ?? 'default'}, inverted`), tx('Tło odwrócone: tekst, linki, ramki i fokus z tokenów zakresu inverse.', 'Inverted background: text, links, borders and focus from the inverse token scope.'), tx('Blok', 'Block')),
|
||||
...sample(block.slug, media),
|
||||
...(variants[0] ? { variant: variants[0] } : {}),
|
||||
settings: { background: 'inverted' },
|
||||
})
|
||||
if (block.slug === 'featureGrid' || block.slug === 'faq') {
|
||||
layout.push({
|
||||
blockType: block.slug,
|
||||
header: header(tx(`${block.slug} — tło przygaszone`, `${block.slug} — muted`), undefined, tx('Blok', 'Block')),
|
||||
...sample(block.slug, media),
|
||||
...(variants[0] ? { variant: variants[0] } : {}),
|
||||
settings: { background: 'muted' },
|
||||
})
|
||||
}
|
||||
}
|
||||
return { aiSummary: tx('Strona testowa biblioteki bloków.', 'Block library test page.'), layout, noindex: true, slug: { en: 'blocks', pl: 'bloki' }, title: tx('Bloki', 'Blocks') }
|
||||
}
|
||||
Reference in New Issue
Block a user