Landing pages: Work
3 sections between the top bar and the footer of the template.
Install
The blocks of this page, top bar and footer included:
npx ui8kit add nav-bar about-me project-grid photo-gallery sitemap-footerBlocks: nav-bar, about-me, project-grid, photo-gallery, sitemap-footer
Preview
The sections of the page; the top bar and the footer have their own block pages.
Hi, I design calm software
Nine years of product design for teams that ship every week. I like systems, plain words and short feedback loops.
Role
Product designer
Based in
Lisbon
Experience
9 years
Status
Open to projects
Selected work
Products, brands and sites we shipped with our clients.
Product design, 2026
Atlas dashboard
An analytics dashboard for a logistics team: one screen for the whole fleet.
Web app, 2025
Harbor booking
Booking flow for a chain of marinas, from the map to the receipt.
Branding, 2025
Lumen brand
Identity, type and a site for a lighting studio.
Mobile, 2024
Orbit mobile
A habit tracker that fits on the lock screen.
Editorial, 2024
Field notes
A long-read magazine with a reading mode and offline issues.
Commerce, 2023
Cedar store
A small furniture store with a configurator and same-day delivery.
From the road
Places we worked from this year.
Code
The page as generated in the source monorepo (commit 6c20aba1e4be). It imports the blocks from the UI package and its texts and sample data from the app package; after installing the blocks, replace those imports with your own content.
Point the CLI at this runtime once, then add the blocks:
npx ui8kit init --yes --framework svelte --dir src --registry-url https://registry.buildy.tw/svelte --strict-cdnnpx ui8kit add nav-bar about-me project-grid photo-gallery sitemap-footer<!-- Code generated by xgen. DO NOT EDIT. -->
<!-- Source: xgen/specs/screens/theme-marketing-landing.json -->
<!-- The work page of ThemeMarketingLandingScreen. -->
<script lang="ts">
import {
AboutMe,
PhotoGallery,
ProjectGrid,
tpl,
uniqLabel,
type Photo,
type Project,
type Skill,
type Spec,
} from "@ui8kit/svelte-ui";
import { fromCodex } from "@ui8kit/app-shared/runtime/core";
import { ui } from "@ui8kit/app-shared/content";
import { profilefacts as profilefactsEntries } from "@ui8kit/app-shared/data/profilefacts";
import { skills as skillsEntries } from "@ui8kit/app-shared/data/skills";
import { projects as projectsEntries } from "@ui8kit/app-shared/data/projects";
import { photos as photosEntries } from "@ui8kit/app-shared/data/photos";
const PROFILEFACTS_FIELDS = {"id":"id","label":"title.en","value":"metadata.value.value"} as const;
const SKILLS_FIELDS = {"id":"id","label":"title.en","level":"metadata.level.value"} as const;
const PROJECTS_FIELDS = {
"id": "id",
"title": "title.en",
"category": "metadata.category.value",
"year": "metadata.year.value",
"summary": "metadata.summary.value",
"tags": "metadata.tags.value",
"featured": "metadata.featured.value",
"client": "metadata.client.value",
} as const;
const PHOTOS_FIELDS = {"id":"id","title":"title.en","tag":"metadata.tag.value","size":"metadata.size.value"} as const;
const profilefacts = fromCodex<Spec>(profilefactsEntries, PROFILEFACTS_FIELDS);
const skills = fromCodex<Skill>(skillsEntries, SKILLS_FIELDS);
const projects = fromCodex<Project>(projectsEntries, PROJECTS_FIELDS);
const photos = fromCodex<Photo>(photosEntries, PHOTOS_FIELDS);
</script>
<AboutMe
id="work-aboutme"
title={ui.company.aboutMe.title}
lead={ui.company.aboutMe.lead}
badge={ui.company.aboutMe.badge}
facts={profilefacts}
skills={skills}
labels={ui.company.aboutMe}
actions={{
mode: "two",
cta: ui.company.aboutMe.cta,
href: "#/work",
secondary: ui.company.aboutMe.more,
secondaryHref: "#/contact",
}}
layout="facts"
mediaSide="start"
tone="default"
/>
<ProjectGrid
id="work-projects"
title={ui.company.projects.title}
lead={ui.company.projects.lead}
projects={projects}
labels={ui.company.projects}
layout="cards"
tone="default"
density="default"
landmarkLabel={uniqLabel(tpl(ui.blocks.landmark, ui.blocks.names.projects, ui.blocks.variants.projects.cards))}
/>
<PhotoGallery
id="work-photos"
title={ui.company.photos.title}
lead={ui.company.photos.lead}
photos={photos}
labels={ui.company.photos}
layout="masonry"
captions="show"
tone="default"
density="default"
landmarkLabel={uniqLabel(tpl(ui.blocks.landmark, ui.blocks.names.photos, ui.blocks.variants.photos.masonry))}
/>
Point the CLI at this runtime once, then add the blocks:
npx ui8kit init --yes --framework react --dir src --registry-url https://registry.buildy.tw/react --strict-cdnnpx ui8kit add nav-bar about-me project-grid photo-gallery sitemap-footer// Code generated by xgen. DO NOT EDIT.
// Source: xgen/specs/screens/theme-marketing-landing.json
// The work page of ThemeMarketingLandingScreen.
import {
AboutMe,
PhotoGallery,
ProjectGrid,
tpl,
uniqLabel,
type Photo,
type Project,
type Skill,
type Spec,
} from "@ui8kit/react-ui";
import { fromCodex } from "@ui8kit/app-shared/runtime/core";
import { ui } from "@ui8kit/app-shared/content";
import { profilefacts as profilefactsEntries } from "@ui8kit/app-shared/data/profilefacts";
import { skills as skillsEntries } from "@ui8kit/app-shared/data/skills";
import { projects as projectsEntries } from "@ui8kit/app-shared/data/projects";
import { photos as photosEntries } from "@ui8kit/app-shared/data/photos";
const PROFILEFACTS_FIELDS = {"id":"id","label":"title.en","value":"metadata.value.value"} as const;
const SKILLS_FIELDS = {"id":"id","label":"title.en","level":"metadata.level.value"} as const;
const PROJECTS_FIELDS = {
"id": "id",
"title": "title.en",
"category": "metadata.category.value",
"year": "metadata.year.value",
"summary": "metadata.summary.value",
"tags": "metadata.tags.value",
"featured": "metadata.featured.value",
"client": "metadata.client.value",
} as const;
const PHOTOS_FIELDS = {"id":"id","title":"title.en","tag":"metadata.tag.value","size":"metadata.size.value"} as const;
const profilefacts = fromCodex<Spec>(profilefactsEntries, PROFILEFACTS_FIELDS);
const skills = fromCodex<Skill>(skillsEntries, SKILLS_FIELDS);
const projects = fromCodex<Project>(projectsEntries, PROJECTS_FIELDS);
const photos = fromCodex<Photo>(photosEntries, PHOTOS_FIELDS);
export function WorkPage() {
return (
<>
<AboutMe
id="work-aboutme"
title={ui.company.aboutMe.title}
lead={ui.company.aboutMe.lead}
badge={ui.company.aboutMe.badge}
facts={profilefacts}
skills={skills}
labels={ui.company.aboutMe}
actions={{
mode: "two",
cta: ui.company.aboutMe.cta,
href: "#/work",
secondary: ui.company.aboutMe.more,
secondaryHref: "#/contact",
}}
layout="facts"
mediaSide="start"
tone="default"
/>
<ProjectGrid
id="work-projects"
title={ui.company.projects.title}
lead={ui.company.projects.lead}
projects={projects}
labels={ui.company.projects}
layout="cards"
tone="default"
density="default"
landmarkLabel={uniqLabel(tpl(ui.blocks.landmark, ui.blocks.names.projects, ui.blocks.variants.projects.cards))}
/>
<PhotoGallery
id="work-photos"
title={ui.company.photos.title}
lead={ui.company.photos.lead}
photos={photos}
labels={ui.company.photos}
layout="masonry"
captions="show"
tone="default"
density="default"
landmarkLabel={uniqLabel(tpl(ui.blocks.landmark, ui.blocks.names.photos, ui.blocks.variants.photos.masonry))}
/>
</>
);
}
Point the CLI at this runtime once, then add the blocks:
npx ui8kit init --yes --framework vue --dir src --registry-url https://registry.buildy.tw/vue --strict-cdnnpx ui8kit add nav-bar about-me project-grid photo-gallery sitemap-footer<!-- Code generated by xgen. DO NOT EDIT. -->
<!-- Source: xgen/specs/screens/theme-marketing-landing.json -->
<!-- The work page of ThemeMarketingLandingScreen. -->
<script setup lang="ts">
import {
AboutMe,
PhotoGallery,
ProjectGrid,
tpl,
uniqLabel,
type Photo,
type Project,
type Skill,
type Spec,
} from "@ui8kit/vue-ui";
import { fromCodex } from "@ui8kit/app-shared/runtime/core";
import { ui } from "@ui8kit/app-shared/content";
import { profilefacts as profilefactsEntries } from "@ui8kit/app-shared/data/profilefacts";
import { skills as skillsEntries } from "@ui8kit/app-shared/data/skills";
import { projects as projectsEntries } from "@ui8kit/app-shared/data/projects";
import { photos as photosEntries } from "@ui8kit/app-shared/data/photos";
const PROFILEFACTS_FIELDS = {"id":"id","label":"title.en","value":"metadata.value.value"} as const;
const SKILLS_FIELDS = {"id":"id","label":"title.en","level":"metadata.level.value"} as const;
const PROJECTS_FIELDS = {
"id": "id",
"title": "title.en",
"category": "metadata.category.value",
"year": "metadata.year.value",
"summary": "metadata.summary.value",
"tags": "metadata.tags.value",
"featured": "metadata.featured.value",
"client": "metadata.client.value",
} as const;
const PHOTOS_FIELDS = {"id":"id","title":"title.en","tag":"metadata.tag.value","size":"metadata.size.value"} as const;
const profilefacts = fromCodex<Spec>(profilefactsEntries, PROFILEFACTS_FIELDS);
const skills = fromCodex<Skill>(skillsEntries, SKILLS_FIELDS);
const projects = fromCodex<Project>(projectsEntries, PROJECTS_FIELDS);
const photos = fromCodex<Photo>(photosEntries, PHOTOS_FIELDS);
</script>
<template>
<AboutMe
id="work-aboutme"
:title="ui.company.aboutMe.title"
:lead="ui.company.aboutMe.lead"
:badge="ui.company.aboutMe.badge"
:facts="profilefacts"
:skills="skills"
:labels="ui.company.aboutMe"
:actions="{
mode: 'two',
cta: ui.company.aboutMe.cta,
href: '#/work',
secondary: ui.company.aboutMe.more,
secondaryHref: '#/contact',
}"
layout="facts"
mediaSide="start"
tone="default"
/>
<ProjectGrid
id="work-projects"
:title="ui.company.projects.title"
:lead="ui.company.projects.lead"
:projects="projects"
:labels="ui.company.projects"
layout="cards"
tone="default"
density="default"
:landmarkLabel="uniqLabel(tpl(ui.blocks.landmark, ui.blocks.names.projects, ui.blocks.variants.projects.cards))"
/>
<PhotoGallery
id="work-photos"
:title="ui.company.photos.title"
:lead="ui.company.photos.lead"
:photos="photos"
:labels="ui.company.photos"
layout="masonry"
captions="show"
tone="default"
density="default"
:landmarkLabel="uniqLabel(tpl(ui.blocks.landmark, ui.blocks.names.photos, ui.blocks.variants.photos.masonry))"
/>
</template>
Point the CLI at this runtime once, then add the blocks:
npx ui8kit init --yes --framework solid --dir src --registry-url https://registry.buildy.tw/solid --strict-cdnnpx ui8kit add nav-bar about-me project-grid photo-gallery sitemap-footer// Code generated by xgen. DO NOT EDIT.
// Source: xgen/specs/screens/theme-marketing-landing.json
// The work page of ThemeMarketingLandingScreen.
import {
AboutMe,
PhotoGallery,
ProjectGrid,
tpl,
uniqLabel,
type Photo,
type Project,
type Skill,
type Spec,
} from "@ui8kit/solid-ui";
import { fromCodex } from "@ui8kit/app-shared/runtime/core";
import { ui } from "@ui8kit/app-shared/content";
import { profilefacts as profilefactsEntries } from "@ui8kit/app-shared/data/profilefacts";
import { skills as skillsEntries } from "@ui8kit/app-shared/data/skills";
import { projects as projectsEntries } from "@ui8kit/app-shared/data/projects";
import { photos as photosEntries } from "@ui8kit/app-shared/data/photos";
const PROFILEFACTS_FIELDS = {"id":"id","label":"title.en","value":"metadata.value.value"} as const;
const SKILLS_FIELDS = {"id":"id","label":"title.en","level":"metadata.level.value"} as const;
const PROJECTS_FIELDS = {
"id": "id",
"title": "title.en",
"category": "metadata.category.value",
"year": "metadata.year.value",
"summary": "metadata.summary.value",
"tags": "metadata.tags.value",
"featured": "metadata.featured.value",
"client": "metadata.client.value",
} as const;
const PHOTOS_FIELDS = {"id":"id","title":"title.en","tag":"metadata.tag.value","size":"metadata.size.value"} as const;
const profilefacts = fromCodex<Spec>(profilefactsEntries, PROFILEFACTS_FIELDS);
const skills = fromCodex<Skill>(skillsEntries, SKILLS_FIELDS);
const projects = fromCodex<Project>(projectsEntries, PROJECTS_FIELDS);
const photos = fromCodex<Photo>(photosEntries, PHOTOS_FIELDS);
export function WorkPage() {
return (
<>
<AboutMe
id="work-aboutme"
title={ui.company.aboutMe.title}
lead={ui.company.aboutMe.lead}
badge={ui.company.aboutMe.badge}
facts={profilefacts}
skills={skills}
labels={ui.company.aboutMe}
actions={{
mode: "two",
cta: ui.company.aboutMe.cta,
href: "#/work",
secondary: ui.company.aboutMe.more,
secondaryHref: "#/contact",
}}
layout="facts"
mediaSide="start"
tone="default"
/>
<ProjectGrid
id="work-projects"
title={ui.company.projects.title}
lead={ui.company.projects.lead}
projects={projects}
labels={ui.company.projects}
layout="cards"
tone="default"
density="default"
landmarkLabel={uniqLabel(tpl(ui.blocks.landmark, ui.blocks.names.projects, ui.blocks.variants.projects.cards))}
/>
<PhotoGallery
id="work-photos"
title={ui.company.photos.title}
lead={ui.company.photos.lead}
photos={photos}
labels={ui.company.photos}
layout="masonry"
captions="show"
tone="default"
density="default"
landmarkLabel={uniqLabel(tpl(ui.blocks.landmark, ui.blocks.names.photos, ui.blocks.variants.photos.masonry))}
/>
</>
);
}
Go templ is not installed by the CLI. Copy the files below into your Go module, together with these helper files from packages/templ/ui of the source (package utils):
- utils/cn_merge.go
- utils/dyn.go
- utils/expr.go
- utils/heading.go
- utils/tags.go
- utils/utils.go
- utils/variants_json.go
// Code generated by xgen. DO NOT EDIT.
// Source: xgen/specs/organisms/nav-bar.json
package blocks
import (
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/block"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/box"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/container"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/grid"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/group"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/link"
linkplain "github.com/codegen-x/ui8kit/packages/templ/ui/ui/link-plain"
uiutils "github.com/codegen-x/ui8kit/packages/templ/ui/utils"
)
// NavBarProps are the props of NavBar; the values are the JSON shapes of the TypeScript props.
type NavBarProps struct {
Label any `json:"label"`
Brand any `json:"brand"`
Links any `json:"links"`
Current any `json:"current"`
Actions any `json:"actions"`
Search any `json:"search"`
Tone any `json:"tone"`
Layout any `json:"layout"`
Over any `json:"over"`
Skip any `json:"skip"`
LandmarkLabel any `json:"landmarkLabel"`
}
// A top bar in four shapes. Axes: layout (inline: brand left, links, button right; split: the brand in the middle with the links on both sides; search: a search field with its shortcut in the middle), over (none, media: the bar sits over a picture, transparent), actions mode (none, cta), tone (default, inverse: on a dark hero band). Turning solid on scroll is a port contract.
templ NavBar(p NavBarProps) {
{{ vLabel := p.Label }}
{{ vBrand := p.Brand }}
{{ vLinks := p.Links }}
{{ vCurrent := uiutils.Def(p.Current, "") }}
{{ vActions := p.Actions }}
{{ vSearch := p.Search }}
{{ vTone := uiutils.Def(p.Tone, "default") }}
{{ vLayout := uiutils.Def(p.Layout, "inline") }}
{{ vOver := uiutils.Def(p.Over, "none") }}
{{ vSkip := p.Skip }}
{{ vLandmarkLabel := p.LandmarkLabel }}
@block.Block(block.BlockProps{Tag: "header", Class: uiutils.S(uiutils.Cnv("relative", uiutils.Cond(uiutils.T(uiutils.Eq(vTone, "inverse")), "border-b border-transparent bg-foreground text-background [&_a]:text-background [&_button]:text-background", "border-b border-border bg-background"), uiutils.Cond(uiutils.T(uiutils.Eq(vOver, "media")), "isolate overflow-hidden border-0 bg-transparent", ""))), Attrs: uiutils.Attrs("data-testid", "nav-bar", "data-layout", vLayout, "data-tone", vTone, "aria-label", vLandmarkLabel)}) {
@OverMedia(OverMediaProps{On: uiutils.Eq(vOver, "media"), Alt: vBrand})
if uiutils.T(vSkip) {
@linkplain.LinkPlain(linkplain.LinkPlainProps{Href: "#main-content", Class: "sr-only focus:not-sr-only focus:fixed focus:left-2 focus:top-2 focus:z-50 focus:rounded focus:bg-background focus:px-4 focus:py-2 focus:text-sm focus:inset-ring focus:inset-ring-border", Attrs: uiutils.Attrs("data-testid", "skip-link")}) {
{ uiutils.Text(vSkip) }
}
}
@container.Container(container.ContainerProps{Class: "mx-auto w-full max-w-6xl px-4", Attrs: uiutils.Attrs("data-slot", "container")}) {
@box.Box(box.BoxProps{Class: uiutils.S(uiutils.Cnv("flex flex-wrap items-center justify-between gap-4", "py-4"))}) {
if uiutils.Eq(vLayout, "split") {
@NavBlock(NavBlockProps{Label: uiutils.Cond(uiutils.T(vLandmarkLabel), uiutils.Uniq(uiutils.Tpl("{0}, {1}", vLabel, vLandmarkLabel)), vLabel), Class: uiutils.Cnv("w-full"), Testid: "site-nav"}) {
@grid.Grid(grid.GridProps{Cols: "1-3", Class: "w-full items-center gap-4"}) {
@box.Box(box.BoxProps{Class: "md:justify-self-start"}) {
@NavLinks(NavLinksProps{Links: vLinks, Current: vCurrent, Side: "left"})
}
@box.Box(box.BoxProps{Class: "text-center"}) {
@link.Link(link.LinkProps{Href: "#/", Variant: "default", Class: "text-lg font-medium", Attrs: uiutils.Attrs("data-testid", "brand")}) {
{ uiutils.Text(vBrand) }
}
}
@group.Group(group.GroupProps{Gap: "4", Align: "center", Justify: "end", Class: "flex-wrap md:justify-self-end"}) {
@box.Box(box.BoxProps{}) {
@NavLinks(NavLinksProps{Links: vLinks, Current: vCurrent, Side: "right"})
}
@NavActions(NavActionsProps{Login: uiutils.Get(vActions, "login"), LoginHref: uiutils.Get(vActions, "loginHref"), Cta: uiutils.Get(vActions, "cta"), CtaHref: uiutils.Get(vActions, "href"), Actions: uiutils.Get(vActions, "mode"), Tone: vTone, ThemeLabel: uiutils.Get(vActions, "themeLabel")})
}
}
}
} else {
@link.Link(link.LinkProps{Href: "#/", Variant: "default", Class: "text-lg font-medium", Attrs: uiutils.Attrs("data-testid", "brand")}) {
{ uiutils.Text(vBrand) }
}
if uiutils.Eq(vLayout, "search") {
@SearchPalette(SearchPaletteProps{Label: uiutils.Get(vSearch, "label"), Shortcut: uiutils.Get(vSearch, "shortcut")})
}
@NavBlock(NavBlockProps{Label: uiutils.Cond(uiutils.T(vLandmarkLabel), uiutils.Uniq(uiutils.Tpl("{0}, {1}", vLabel, vLandmarkLabel)), vLabel), Class: uiutils.Cnv("order-last w-full overflow-x-auto md:order-none md:w-auto [&>div]:flex-nowrap md:[&>div]:flex-wrap [&_a]:shrink-0"), Testid: "site-nav"}) {
@NavLinks(NavLinksProps{Links: vLinks, Current: vCurrent})
}
@NavActions(NavActionsProps{Login: uiutils.Get(vActions, "login"), LoginHref: uiutils.Get(vActions, "loginHref"), Cta: uiutils.Get(vActions, "cta"), CtaHref: uiutils.Get(vActions, "href"), Actions: uiutils.Get(vActions, "mode"), Tone: vTone, ThemeLabel: uiutils.Get(vActions, "themeLabel")})
}
}
}
}
}
// Code generated by xgen. DO NOT EDIT.
// Source: xgen/specs/organisms/about-me.json
package blocks
import (
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/form"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/group"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/list"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/stack"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/text"
uiutils "github.com/codegen-x/ui8kit/packages/templ/ui/utils"
)
// AboutMeProps are the props of AboutMe; the values are the JSON shapes of the TypeScript props.
type AboutMeProps struct {
Id any `json:"id"`
Title any `json:"title"`
Lead any `json:"lead"`
Badge any `json:"badge"`
Level any `json:"level"`
Facts any `json:"facts"`
Skills any `json:"skills"`
Labels any `json:"labels"`
Actions any `json:"actions"`
Layout any `json:"layout"`
MediaSide any `json:"mediaSide"`
Tone any `json:"tone"`
LandmarkLabel any `json:"landmarkLabel"`
}
// A personal about section beside a portrait: a badge, the heading, a lead, then key facts and a list of specialities, or skill chips and expertise bars, and one or two links. Axes: layout (facts, skills), mediaSide, tone.
templ AboutMe(p AboutMeProps) {
{{ vId := p.Id }}
{{ vTitle := p.Title }}
{{ vLead := uiutils.Def(p.Lead, "") }}
{{ vBadge := uiutils.Def(p.Badge, "") }}
{{ vLevel := uiutils.Def(p.Level, float64(1)) }}
{{ vFacts := p.Facts }}
{{ vSkills := p.Skills }}
{{ vLabels := p.Labels }}
{{ vActions := p.Actions }}
{{ vLayout := uiutils.Def(p.Layout, "facts") }}
{{ vMediaSide := uiutils.Def(p.MediaSide, "start") }}
{{ vTone := uiutils.Def(p.Tone, "default") }}
{{ vLandmarkLabel := p.LandmarkLabel }}
@SectionFrame(SectionFrameProps{Id: vId, Title: vTitle, Lead: vLead, Heading: map[string]any{"badge": vBadge, "level": vLevel}, Layout: "split", Media: map[string]any{"show": true, "side": vMediaSide}, Tone: vTone, LandmarkLabel: vLandmarkLabel, Aside: aboutMeFill1(p, vTitle)}) {
if uiutils.Eq(vLayout, "facts") {
@list.List(list.ListProps{Tag: "ul", Class: "grid grid-cols-1 gap-4 sm:grid-cols-2", Attrs: uiutils.Attrs("data-testid", "facts")}) {
for _, vF := range uiutils.L(vFacts) {
@list.ListItem(list.ListItemProps{Class: "rounded bg-card inset-ring inset-ring-border flex flex-col gap-0 p-4", Attrs: uiutils.Attrs("data-testid", "fact")}) {
@text.Text(text.TextProps{Size: "xs", Class: "text-muted-foreground"}) {
{ uiutils.Text(uiutils.Get(vF, "label")) }
}
@text.Text(text.TextProps{Size: "sm", Weight: "semibold"}) {
{ uiutils.Text(uiutils.Get(vF, "value")) }
}
}
}
}
} else {
@stack.Stack(stack.StackProps{Gap: "4", Align: "stretch", Attrs: uiutils.Attrs("data-testid", "skills")}) {
for _, vS := range uiutils.L(vSkills) {
@stack.Stack(stack.StackProps{Gap: "2", Align: "stretch", Attrs: uiutils.Attrs("data-testid", "skill")}) {
@group.Group(group.GroupProps{Gap: "4", Justify: "between"}) {
@text.Text(text.TextProps{Size: "sm", Weight: "semibold"}) {
{ uiutils.Text(uiutils.Get(vS, "label")) }
}
@text.Text(text.TextProps{Size: "xs", Class: "text-muted-foreground"}) {
{ uiutils.Text(uiutils.Tpl(uiutils.Get(vLabels, "level"), uiutils.Get(vS, "level"))) }
}
}
@form.Progress(form.ProgressProps{Value: uiutils.S(uiutils.Str(uiutils.Get(vS, "level"))), Max: "100", Attrs: uiutils.Attrs("aria-label", uiutils.Get(vS, "label"))})
}
}
}
}
@ActionGroup(ActionGroupProps{Primary: uiutils.Get(vActions, "cta"), PrimaryHref: uiutils.Get(vActions, "href"), Secondary: uiutils.Cond(uiutils.T(uiutils.Eq(uiutils.Get(vActions, "mode"), "two")), uiutils.Get(vActions, "secondary"), nil), SecondaryHref: uiutils.Get(vActions, "secondaryHref")})
}
}
templ aboutMeFill1(p AboutMeProps, vTitle any) {
@MediaFrame(MediaFrameProps{Alt: vTitle, Ratio: "3/4"})
}
// Code generated by xgen. DO NOT EDIT.
// Source: xgen/specs/organisms/project-grid.json
package blocks
import (
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/box"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/group"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/stack"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/text"
uiutils "github.com/codegen-x/ui8kit/packages/templ/ui/utils"
)
// ProjectGridProps are the props of ProjectGrid; the values are the JSON shapes of the TypeScript props.
type ProjectGridProps struct {
Id any `json:"id"`
Title any `json:"title"`
Lead any `json:"lead"`
Projects any `json:"projects"`
Labels any `json:"labels"`
Layout any `json:"layout"`
Tone any `json:"tone"`
Density any `json:"density"`
LandmarkLabel any `json:"landmarkLabel"`
}
// Projects of a studio or a person: cards with tags and links, a compact grid, tiles with the caption over the picture, a bento with one big project, or a list beside a collage. Axes: layout (cards, compact, overlay, bento, list), tone, density.
templ ProjectGrid(p ProjectGridProps) {
{{ vId := p.Id }}
{{ vTitle := p.Title }}
{{ vLead := uiutils.Def(p.Lead, "") }}
{{ vProjects := p.Projects }}
{{ vLabels := p.Labels }}
{{ vLayout := uiutils.Def(p.Layout, "cards") }}
{{ vTone := uiutils.Def(p.Tone, "default") }}
{{ vDensity := uiutils.Def(p.Density, "default") }}
{{ vLandmarkLabel := p.LandmarkLabel }}
@SectionFrame(SectionFrameProps{Id: vId, Title: vTitle, Lead: vLead, Tone: vTone, Density: vDensity, Layout: uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, "list")), "split", "stack"), Media: map[string]any{"show": uiutils.Eq(vLayout, "list"), "align": "start"}, LandmarkLabel: vLandmarkLabel, Aside: projectGridFill1(p, vTitle)}) {
if uiutils.Eq(vLayout, "list") {
@stack.Stack(stack.StackProps{Gap: "4", Align: "stretch", Attrs: uiutils.Attrs("data-testid", "items")}) {
for _, vP := range uiutils.L(vProjects) {
@group.Group(group.GroupProps{Gap: "4", Align: "start", Class: "border-b border-border pb-4", Attrs: uiutils.Attrs("data-testid", "item")}) {
@MediaFrame(MediaFrameProps{Alt: uiutils.Get(vP, "title"), Ratio: "1/1", Class: uiutils.Cnv("size-16 shrink-0")})
@stack.Stack(stack.StackProps{Gap: "2", Align: "stretch", Class: "flex-1"}) {
@group.Group(group.GroupProps{Gap: "4", Justify: "between"}) {
@text.Text(text.TextProps{Size: "sm", Weight: "semibold"}) {
{ uiutils.Text(uiutils.Get(vP, "title")) }
}
@text.Text(text.TextProps{Size: "xs", Class: "text-muted-foreground"}) {
{ uiutils.Text(uiutils.Get(vP, "year")) }
}
}
@text.Text(text.TextProps{Size: "sm", Class: "text-muted-foreground"}) {
{ uiutils.Text(uiutils.Get(vP, "summary")) }
}
}
}
}
}
} else {
@ProjectTiles(ProjectTilesProps{Projects: vProjects, Labels: vLabels, Layout: vLayout})
}
}
}
templ projectGridFill1(p ProjectGridProps, vTitle any) {
@box.Box(box.BoxProps{Class: "grid grid-cols-2 gap-4", Attrs: uiutils.Attrs("data-testid", "collage")}) {
@MediaFrame(MediaFrameProps{Alt: vTitle, Ratio: "3/4"})
@MediaFrame(MediaFrameProps{Alt: vTitle, Ratio: "3/4", Class: uiutils.Cnv("mt-8")})
}
}
// Code generated by xgen. DO NOT EDIT.
// Source: xgen/specs/organisms/photo-gallery.json
package blocks
import (
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/badge"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/box"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/button"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/group"
lucideicon "github.com/codegen-x/ui8kit/packages/templ/ui/ui/lucide-icon"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/stack"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/text"
uiutils "github.com/codegen-x/ui8kit/packages/templ/ui/utils"
)
// PhotoGalleryProps are the props of PhotoGallery; the values are the JSON shapes of the TypeScript props.
type PhotoGalleryProps struct {
Id any `json:"id"`
Title any `json:"title"`
Lead any `json:"lead"`
Photos any `json:"photos"`
Labels any `json:"labels"`
Layout any `json:"layout"`
Captions any `json:"captions"`
Tone any `json:"tone"`
Density any `json:"density"`
LandmarkLabel any `json:"landmarkLabel"`
}
// Photos in a grid, a masonry of mixed heights, a mosaic with one big tile, a featured picture over a strip of thumbnails, or cards with a title and a tag. Static markup: the featured layout's arrows are the page's. Axes: layout (grid, masonry, mosaic, featured, cards), captions (show, hide), tone, density.
templ PhotoGallery(p PhotoGalleryProps) {
{{ vId := p.Id }}
{{ vTitle := p.Title }}
{{ vLead := uiutils.Def(p.Lead, "") }}
{{ vPhotos := p.Photos }}
{{ vLabels := p.Labels }}
{{ vLayout := uiutils.Def(p.Layout, "grid") }}
{{ vCaptions := uiutils.Def(p.Captions, "show") }}
{{ vTone := uiutils.Def(p.Tone, "default") }}
{{ vDensity := uiutils.Def(p.Density, "default") }}
{{ vLandmarkLabel := p.LandmarkLabel }}
@SectionFrame(SectionFrameProps{Id: vId, Title: vTitle, Lead: vLead, Tone: vTone, Density: vDensity, LandmarkLabel: vLandmarkLabel}) {
if uiutils.Eq(vLayout, "featured") {
@stack.Stack(stack.StackProps{Gap: "4", Align: "stretch", Attrs: uiutils.Attrs("data-testid", "featured")}) {
@MediaFrame(MediaFrameProps{Alt: vTitle})
@group.Group(group.GroupProps{Gap: "4", Align: "center", Justify: "between"}) {
@stack.Stack(stack.StackProps{Gap: "0"}) {
@text.Text(text.TextProps{Size: "base", Weight: "semibold"}) {
{ uiutils.Text(uiutils.FirstOf(vPhotos, "title")) }
}
@text.Text(text.TextProps{Size: "xs", Class: "text-muted-foreground"}) {
{ uiutils.Text(uiutils.Tpl(uiutils.Get(vLabels, "counter"), float64(1), uiutils.Len(vPhotos))) }
}
}
@group.Group(group.GroupProps{Gap: "2"}) {
@button.Button(button.ButtonProps{Variant: "outline", Size: "sm", Layout: "icon", AriaLabel: uiutils.S(uiutils.Get(vLabels, "previous"))}) {
@lucideicon.LucideIcon(lucideicon.LucideIconProps{Name: "chevron-left", Size: 16})
}
@button.Button(button.ButtonProps{Variant: "outline", Size: "sm", Layout: "icon", AriaLabel: uiutils.S(uiutils.Get(vLabels, "next"))}) {
@lucideicon.LucideIcon(lucideicon.LucideIconProps{Name: "chevron-right", Size: 16})
}
}
}
@box.Box(box.BoxProps{Class: "grid grid-cols-3 gap-2 sm:grid-cols-9", Attrs: uiutils.Attrs("data-testid", "thumbs")}) {
for vI, vP := range uiutils.L(vPhotos) {
@MediaFrame(MediaFrameProps{Alt: uiutils.Get(vP, "title"), Ratio: "1/1", Class: uiutils.Cnv(uiutils.Cond(uiutils.T(uiutils.Eq(float64(vI), float64(0))), "ring-2 ring-foreground", ""))})
}
}
}
} else {
@box.Box(box.BoxProps{Class: uiutils.S(uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, "masonry")), "columns-1 gap-4 sm:columns-2 lg:columns-3", uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, "mosaic")), "grid grid-cols-2 gap-4 md:grid-cols-4", "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3"))), Attrs: uiutils.Attrs("data-testid", "items")}) {
for vI, vP := range uiutils.L(vPhotos) {
@FigureBlock(FigureBlockProps{Class: uiutils.Cnv(uiutils.Cnv("flex flex-col gap-2", uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, "masonry")), "mb-4 break-inside-avoid", ""), uiutils.Cond(uiutils.T(uiutils.And(uiutils.Eq(vLayout, "mosaic"), uiutils.Eq(float64(vI), float64(0)))), "col-span-2 row-span-2", ""), uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, "cards")), "rounded bg-card inset-ring inset-ring-border p-4", ""))), Testid: "item"}) {
@MediaFrame(MediaFrameProps{Alt: uiutils.Get(vP, "title"), Ratio: uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, "masonry")), uiutils.Cond(uiutils.T(uiutils.Eq(uiutils.Get(vP, "size"), "tall")), "3/4", uiutils.Cond(uiutils.T(uiutils.Eq(uiutils.Get(vP, "size"), "wide")), "16/9", uiutils.Cond(uiutils.T(uiutils.Eq(uiutils.Get(vP, "size"), "large")), "4/3", "1/1"))), uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, "grid")), "4/3", "1/1")), Class: uiutils.Cnv(uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, "mosaic")), "h-full", ""))})
if uiutils.T(uiutils.And(uiutils.Eq(vCaptions, "show"), uiutils.Eq(vLayout, "cards"))) {
@group.Group(group.GroupProps{Gap: "4", Align: "center", Justify: "between"}) {
@text.Text(text.TextProps{Size: "sm", Weight: "semibold"}) {
{ uiutils.Text(uiutils.Get(vP, "title")) }
}
@badge.Badge(badge.BadgeProps{Variant: "secondary", Size: "sm"}) {
{ uiutils.Text(uiutils.Get(vP, "tag")) }
}
}
}
if uiutils.T(uiutils.And(uiutils.Eq(vCaptions, "show"), uiutils.Or(uiutils.Eq(vLayout, "grid"), uiutils.Eq(vLayout, "masonry")))) {
@box.Box(box.BoxProps{Class: "text-sm text-muted-foreground", Attrs: uiutils.Attrs("data-testid", "caption")}) {
{ uiutils.Text(uiutils.Get(vP, "title")) }
}
}
}
}
}
}
}
}
// Code generated by xgen. DO NOT EDIT.
// Source: xgen/specs/organisms/sitemap-footer.json
package blocks
import (
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/block"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/box"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/button"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/container"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/form"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/group"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/input"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/label"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/link"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/stack"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/text"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/title"
uiutils "github.com/codegen-x/ui8kit/packages/templ/ui/utils"
)
// SitemapFooterProps are the props of SitemapFooter; the values are the JSON shapes of the TypeScript props.
type SitemapFooterProps struct {
Label any `json:"label"`
Brand any `json:"brand"`
Tagline any `json:"tagline"`
Copyright any `json:"copyright"`
Groups any `json:"groups"`
Signup any `json:"signup"`
Status any `json:"status"`
Id any `json:"id"`
Layout any `json:"layout"`
Density any `json:"density"`
LandmarkLabel any `json:"landmarkLabel"`
}
// A footer with the brand, a tagline, groups of links and the copyright. Axes: layout (columns: brand above, equal columns per group, row: the brand, the group names and the copyright in one row), signup mode (none, first: a sign-up above the links), status mode (none, show: a live status pill), density. The live status itself is a port contract.
templ SitemapFooter(p SitemapFooterProps) {
{{ vLabel := p.Label }}
{{ vBrand := p.Brand }}
{{ vTagline := p.Tagline }}
{{ vCopyright := p.Copyright }}
{{ vGroups := p.Groups }}
{{ vSignup := p.Signup }}
{{ vStatus := p.Status }}
{{ vId := uiutils.Def(p.Id, "footer") }}
{{ vLayout := uiutils.Def(p.Layout, "columns") }}
{{ vDensity := uiutils.Def(p.Density, "default") }}
{{ vLandmarkLabel := p.LandmarkLabel }}
if uiutils.Eq(vLayout, "card") {
@FooterCard(FooterCardProps{Label: vLabel, Brand: vBrand, Groups: vGroups, LandmarkLabel: vLandmarkLabel})
} else {
@block.Block(block.BlockProps{Tag: "footer", Class: "mt-12 border-t border-border", Attrs: uiutils.Attrs("data-testid", "site-footer", "data-layout", vLayout, "aria-label", vLandmarkLabel)}) {
@container.Container(container.ContainerProps{Class: uiutils.S(uiutils.Cnv("mx-auto w-full max-w-6xl px-4", "flex flex-col gap-8", uiutils.Cond(uiutils.T(uiutils.Eq(vDensity, "compact")), "py-6", "py-12"))), Attrs: uiutils.Attrs("data-slot", "container")}) {
if uiutils.Eq(uiutils.Get(vSignup, "mode"), "first") {
@stack.Stack(stack.StackProps{Gap: "4", Class: "max-w-md", Attrs: uiutils.Attrs("data-testid", "signup")}) {
@title.Title(title.TitleProps{As: uiutils.HeadingLevel(uiutils.I(float64(3))), Size: "xl", Weight: "bold"}) {
{ uiutils.Text(uiutils.Get(vSignup, "title")) }
}
@form.Form(form.FormProps{Method: "dialog", Class: uiutils.S(uiutils.Cnv("w-full max-w-md", uiutils.Cond(uiutils.T(false), "mx-auto", ""))), Attrs: uiutils.Attrs("data-testid", "email-form")}) {
@label.Label(label.LabelProps{HTMLFor: uiutils.S(uiutils.Tpl("{0}-email", vId)), Class: "sr-only"}) {
{ uiutils.Text(uiutils.Get(vSignup, "label")) }
}
@group.Group(group.GroupProps{Gap: "2", Align: "start", Class: "w-full flex-wrap"}) {
@input.Input(input.InputProps{Type: "email", Name: "email", Class: "min-w-0 flex-1", Attrs: uiutils.Attrs("id", uiutils.Tpl("{0}-email", vId), "data-testid", "field")})
@button.Button(button.ButtonProps{Variant: "default", Size: "default", Type: "submit", Attrs: uiutils.Attrs("data-testid", "submit")}) {
{ uiutils.Text(uiutils.Get(vSignup, "submit")) }
}
}
}
}
}
if uiutils.Eq(vLayout, "columns") {
@box.Box(box.BoxProps{Class: "flex flex-col gap-8 md:flex-row md:items-start md:gap-12", Attrs: uiutils.Attrs("data-slot", "footer-top")}) {
@stack.Stack(stack.StackProps{Gap: "2", Class: "md:w-64 md:shrink-0"}) {
@text.Text(text.TextProps{Size: "xl", Weight: "bold"}) {
{ uiutils.Text(vBrand) }
}
@text.Text(text.TextProps{Size: "sm", Class: "text-muted-foreground"}) {
{ uiutils.Text(vTagline) }
}
}
@box.Box(box.BoxProps{Class: "min-w-0 flex-1"}) {
@FooterColumns(FooterColumnsProps{Label: vLabel, Groups: vGroups, LandmarkLabel: vLandmarkLabel})
}
}
} else {
@group.Group(group.GroupProps{Gap: "6", Align: "center", Justify: "between", Class: "flex-wrap"}) {
@text.Text(text.TextProps{Size: "base", Weight: "bold"}) {
{ uiutils.Text(vBrand) }
}
@NavBlock(NavBlockProps{Label: uiutils.Cond(uiutils.T(vLandmarkLabel), uiutils.Uniq(uiutils.Tpl("{0}, {1}", vLabel, vLandmarkLabel)), vLabel)}) {
@group.Group(group.GroupProps{Gap: "4", Class: "flex-wrap"}) {
for _, vG := range uiutils.L(vGroups) {
@link.Link(link.LinkProps{Href: "#/", Variant: "default", Class: "text-sm", Attrs: uiutils.Attrs("data-testid", "group")}) {
{ uiutils.Text(uiutils.Get(vG, "title")) }
}
}
}
}
}
}
@group.Group(group.GroupProps{Gap: "4", Align: "center", Justify: "between", Class: "flex-wrap border-t border-border pt-6"}) {
@text.Text(text.TextProps{Size: "sm", Class: "text-muted-foreground"}) {
{ uiutils.Text(vCopyright) }
}
if uiutils.Eq(uiutils.Get(vStatus, "mode"), "show") {
@Pill(PillProps{Tone: "green", Icon: "circle-check"}) {
{ uiutils.Text(uiutils.Get(vStatus, "label")) }
}
}
}
}
}
}
}
Twig is not installed by the CLI. Copy the template files below into your Twig templates, together with these helper files from packages/twig/ui of the source (the Runtime, CnMerge and the Twig extension):
- php/CnMerge.php
- php/Extension.php
- php/Runtime.php
{#- Code generated by xgen. DO NOT EDIT.
Source: xgen/specs/organisms/nav-bar.json
A top bar in four shapes. Axes: layout (inline: brand left, links, button right; split: the brand in the middle with the links on both sides; search: a search field with its shortcut in the middle), over (none, media: the bar sits over a picture, transparent), actions mode (none, cta), tone (default, inverse: on a dark hero band). Turning solid on scroll is a port contract.
Props (p): label, brand, links, current, actions, search, tone, layout, over, skip, landmarkLabel. -#}
{%- set v_label = (p.label ?? null) -%}
{%- set v_brand = (p.brand ?? null) -%}
{%- set v_links = (p.links ?? null) -%}
{%- set v_current = (p.current ?? '') -%}
{%- set v_actions = (p.actions ?? null) -%}
{%- set v_search = (p.search ?? null) -%}
{%- set v_tone = (p.tone ?? 'default') -%}
{%- set v_layout = (p.layout ?? 'inline') -%}
{%- set v_over = (p.over ?? 'none') -%}
{%- set v_skip = (p.skip ?? null) -%}
{%- set v_landmarkLabel = (p.landmarkLabel ?? null) -%}
{%- set c_13 -%}
{{ include('blocks/over-media.html.twig', {'p': {'on': ui_eq(v_over, 'media'), 'alt': v_brand}}, with_context = false) }}
{%- if ui_t(v_skip) %}
{%- set c_1 -%}
{{ ui_text(v_skip) }}
{%- endset -%}
{{ include('ui/link-plain/link-plain.html.twig', {'p': {'Href': '#main-content', 'Class': 'sr-only focus:not-sr-only focus:fixed focus:left-2 focus:top-2 focus:z-50 focus:rounded focus:bg-background focus:px-4 focus:py-2 focus:text-sm focus:inset-ring focus:inset-ring-border', 'Attrs': ui_attrs(['data-testid', 'skip-link'])}, 'children': c_1}, with_context = false) }}
{%- endif %}
{%- set c_12 -%}
{%- set c_11 -%}
{%- if ui_t(ui_eq(v_layout, 'split')) %}
{%- set c_8 -%}
{%- set c_7 -%}
{%- set c_2 -%}
{{ include('blocks/nav-links.html.twig', {'p': {'links': v_links, 'current': v_current, 'side': 'left'}}, with_context = false) }}
{%- endset -%}
{{ include('ui/box/box.html.twig', {'p': {'Class': 'md:justify-self-start'}, 'children': c_2}, with_context = false) }}
{%- set c_4 -%}
{%- set c_3 -%}
{{ ui_text(v_brand) }}
{%- endset -%}
{{ include('ui/link/link.html.twig', {'p': {'Href': '#/', 'Variant': 'default', 'Class': 'text-lg font-medium', 'Attrs': ui_attrs(['data-testid', 'brand'])}, 'children': c_3}, with_context = false) }}
{%- endset -%}
{{ include('ui/box/box.html.twig', {'p': {'Class': 'text-center'}, 'children': c_4}, with_context = false) }}
{%- set c_6 -%}
{%- set c_5 -%}
{{ include('blocks/nav-links.html.twig', {'p': {'links': v_links, 'current': v_current, 'side': 'right'}}, with_context = false) }}
{%- endset -%}
{{ include('ui/box/box.html.twig', {'p': {}, 'children': c_5}, with_context = false) }}
{{ include('blocks/nav-actions.html.twig', {'p': {'login': ui_get(v_actions, ['login']), 'loginHref': ui_get(v_actions, ['loginHref']), 'cta': ui_get(v_actions, ['cta']), 'ctaHref': ui_get(v_actions, ['href']), 'actions': ui_get(v_actions, ['mode']), 'tone': v_tone, 'themeLabel': ui_get(v_actions, ['themeLabel'])}}, with_context = false) }}
{%- endset -%}
{{ include('ui/group/group.html.twig', {'p': {'Gap': '4', 'Align': 'center', 'Justify': 'end', 'Class': 'flex-wrap md:justify-self-end'}, 'children': c_6}, with_context = false) }}
{%- endset -%}
{{ include('ui/grid/grid.html.twig', {'p': {'Cols': '1-3', 'Class': 'w-full items-center gap-4'}, 'children': c_7}, with_context = false) }}
{%- endset -%}
{{ include('blocks/nav-block.html.twig', {'p': {'label': (ui_t(v_landmarkLabel) ? ui_uniq(ui_tpl('{0}, {1}', [v_label, v_landmarkLabel])) : v_label), 'className': ui_cnv(['w-full']), 'testid': 'site-nav'}, 'children': c_8}, with_context = false) }}
{%- else %}
{%- set c_9 -%}
{{ ui_text(v_brand) }}
{%- endset -%}
{{ include('ui/link/link.html.twig', {'p': {'Href': '#/', 'Variant': 'default', 'Class': 'text-lg font-medium', 'Attrs': ui_attrs(['data-testid', 'brand'])}, 'children': c_9}, with_context = false) }}
{%- if ui_t(ui_eq(v_layout, 'search')) %}
{{ include('blocks/search-palette.html.twig', {'p': {'label': ui_get(v_search, ['label']), 'shortcut': ui_get(v_search, ['shortcut'])}}, with_context = false) }}
{%- endif %}
{%- set c_10 -%}
{{ include('blocks/nav-links.html.twig', {'p': {'links': v_links, 'current': v_current}}, with_context = false) }}
{%- endset -%}
{{ include('blocks/nav-block.html.twig', {'p': {'label': (ui_t(v_landmarkLabel) ? ui_uniq(ui_tpl('{0}, {1}', [v_label, v_landmarkLabel])) : v_label), 'className': ui_cnv(['order-last w-full overflow-x-auto md:order-none md:w-auto [&>div]:flex-nowrap md:[&>div]:flex-wrap [&_a]:shrink-0']), 'testid': 'site-nav'}, 'children': c_10}, with_context = false) }}
{{ include('blocks/nav-actions.html.twig', {'p': {'login': ui_get(v_actions, ['login']), 'loginHref': ui_get(v_actions, ['loginHref']), 'cta': ui_get(v_actions, ['cta']), 'ctaHref': ui_get(v_actions, ['href']), 'actions': ui_get(v_actions, ['mode']), 'tone': v_tone, 'themeLabel': ui_get(v_actions, ['themeLabel'])}}, with_context = false) }}
{%- endif %}
{%- endset -%}
{{ include('ui/box/box.html.twig', {'p': {'Class': ui_s(ui_cnv(['flex flex-wrap items-center justify-between gap-4', 'py-4']))}, 'children': c_11}, with_context = false) }}
{%- endset -%}
{{ include('ui/container/container.html.twig', {'p': {'Class': 'mx-auto w-full max-w-6xl px-4', 'Attrs': ui_attrs(['data-slot', 'container'])}, 'children': c_12}, with_context = false) }}
{%- endset -%}
{{ include('ui/block/block.html.twig', {'p': {'Tag': 'header', 'Class': ui_s(ui_cnv(['relative', (ui_t(ui_eq(v_tone, 'inverse')) ? 'border-b border-transparent bg-foreground text-background [&_a]:text-background [&_button]:text-background' : 'border-b border-border bg-background'), (ui_t(ui_eq(v_over, 'media')) ? 'isolate overflow-hidden border-0 bg-transparent' : '')])), 'Attrs': ui_attrs(['data-testid', 'nav-bar', 'data-layout', v_layout, 'data-tone', v_tone, 'aria-label', v_landmarkLabel])}, 'children': c_13}, with_context = false) }}
{#- Code generated by xgen. DO NOT EDIT.
Source: xgen/specs/organisms/about-me.json
A personal about section beside a portrait: a badge, the heading, a lead, then key facts and a list of specialities, or skill chips and expertise bars, and one or two links. Axes: layout (facts, skills), mediaSide, tone.
Props (p): id, title, lead, badge, level, facts, skills, labels, actions, layout, mediaSide, tone, landmarkLabel. -#}
{%- set v_id = (p.id ?? null) -%}
{%- set v_title = (p.title ?? null) -%}
{%- set v_lead = (p.lead ?? '') -%}
{%- set v_badge = (p.badge ?? '') -%}
{%- set v_level = (p.level ?? 1) -%}
{%- set v_facts = (p.facts ?? null) -%}
{%- set v_skills = (p.skills ?? null) -%}
{%- set v_labels = (p.labels ?? null) -%}
{%- set v_actions = (p.actions ?? null) -%}
{%- set v_layout = (p.layout ?? 'facts') -%}
{%- set v_mediaSide = (p.mediaSide ?? 'start') -%}
{%- set v_tone = (p.tone ?? 'default') -%}
{%- set v_landmarkLabel = (p.landmarkLabel ?? null) -%}
{%- set f_10 -%}
{{ include('blocks/media-frame.html.twig', {'p': {'alt': v_title, 'ratio': '3/4'}}, with_context = false) }}
{%- endset -%}
{%- set c_11 -%}
{%- if ui_t(ui_eq(v_layout, 'facts')) %}
{%- set c_4 -%}
{%- for v_f in ui_l(v_facts) %}
{%- set c_3 -%}
{%- set c_1 -%}
{{ ui_text(ui_get(v_f, ['label'])) }}
{%- endset -%}
{{ include('ui/text/text.html.twig', {'p': {'Size': 'xs', 'Class': 'text-muted-foreground'}, 'children': c_1}, with_context = false) }}
{%- set c_2 -%}
{{ ui_text(ui_get(v_f, ['value'])) }}
{%- endset -%}
{{ include('ui/text/text.html.twig', {'p': {'Size': 'sm', 'Weight': 'semibold'}, 'children': c_2}, with_context = false) }}
{%- endset -%}
{{ include('ui/list/list-item.html.twig', {'p': {'Class': 'rounded bg-card inset-ring inset-ring-border flex flex-col gap-0 p-4', 'Attrs': ui_attrs(['data-testid', 'fact'])}, 'children': c_3}, with_context = false) }}
{%- endfor %}
{%- endset -%}
{{ include('ui/list/list.html.twig', {'p': {'Tag': 'ul', 'Class': 'grid grid-cols-1 gap-4 sm:grid-cols-2', 'Attrs': ui_attrs(['data-testid', 'facts'])}, 'children': c_4}, with_context = false) }}
{%- else %}
{%- set c_9 -%}
{%- for v_s in ui_l(v_skills) %}
{%- set c_8 -%}
{%- set c_7 -%}
{%- set c_5 -%}
{{ ui_text(ui_get(v_s, ['label'])) }}
{%- endset -%}
{{ include('ui/text/text.html.twig', {'p': {'Size': 'sm', 'Weight': 'semibold'}, 'children': c_5}, with_context = false) }}
{%- set c_6 -%}
{{ ui_text(ui_tpl(ui_get(v_labels, ['level']), [ui_get(v_s, ['level'])])) }}
{%- endset -%}
{{ include('ui/text/text.html.twig', {'p': {'Size': 'xs', 'Class': 'text-muted-foreground'}, 'children': c_6}, with_context = false) }}
{%- endset -%}
{{ include('ui/group/group.html.twig', {'p': {'Gap': '4', 'Justify': 'between'}, 'children': c_7}, with_context = false) }}
{{ include('ui/form/progress.html.twig', {'p': {'Value': ui_s(ui_str(ui_get(v_s, ['level']))), 'Max': '100', 'Attrs': ui_attrs(['aria-label', ui_get(v_s, ['label'])])}}, with_context = false) }}
{%- endset -%}
{{ include('ui/stack/stack.html.twig', {'p': {'Gap': '2', 'Align': 'stretch', 'Attrs': ui_attrs(['data-testid', 'skill'])}, 'children': c_8}, with_context = false) }}
{%- endfor %}
{%- endset -%}
{{ include('ui/stack/stack.html.twig', {'p': {'Gap': '4', 'Align': 'stretch', 'Attrs': ui_attrs(['data-testid', 'skills'])}, 'children': c_9}, with_context = false) }}
{%- endif %}
{{ include('blocks/action-group.html.twig', {'p': {'primary': ui_get(v_actions, ['cta']), 'primaryHref': ui_get(v_actions, ['href']), 'secondary': (ui_t(ui_eq(ui_get(v_actions, ['mode']), 'two')) ? ui_get(v_actions, ['secondary']) : null), 'secondaryHref': ui_get(v_actions, ['secondaryHref'])}}, with_context = false) }}
{%- endset -%}
{{ include('blocks/section-frame.html.twig', {'p': {'id': v_id, 'title': v_title, 'lead': v_lead, 'heading': {'badge': v_badge, 'level': v_level}, 'layout': 'split', 'media': {'show': true, 'side': v_mediaSide}, 'tone': v_tone, 'landmarkLabel': v_landmarkLabel, 'aside': f_10}, 'children': c_11}, with_context = false) }}
{#- Code generated by xgen. DO NOT EDIT.
Source: xgen/specs/organisms/project-grid.json
Projects of a studio or a person: cards with tags and links, a compact grid, tiles with the caption over the picture, a bento with one big project, or a list beside a collage. Axes: layout (cards, compact, overlay, bento, list), tone, density.
Props (p): id, title, lead, projects, labels, layout, tone, density, landmarkLabel. -#}
{%- set v_id = (p.id ?? null) -%}
{%- set v_title = (p.title ?? null) -%}
{%- set v_lead = (p.lead ?? '') -%}
{%- set v_projects = (p.projects ?? null) -%}
{%- set v_labels = (p.labels ?? null) -%}
{%- set v_layout = (p.layout ?? 'cards') -%}
{%- set v_tone = (p.tone ?? 'default') -%}
{%- set v_density = (p.density ?? 'default') -%}
{%- set v_landmarkLabel = (p.landmarkLabel ?? null) -%}
{%- set f_8 -%}
{%- set c_9 -%}
{{ include('blocks/media-frame.html.twig', {'p': {'alt': v_title, 'ratio': '3/4'}}, with_context = false) }}
{{ include('blocks/media-frame.html.twig', {'p': {'alt': v_title, 'ratio': '3/4', 'className': ui_cnv(['mt-8'])}}, with_context = false) }}
{%- endset -%}
{{ include('ui/box/box.html.twig', {'p': {'Class': 'grid grid-cols-2 gap-4', 'Attrs': ui_attrs(['data-testid', 'collage'])}, 'children': c_9}, with_context = false) }}
{%- endset -%}
{%- set c_10 -%}
{%- if ui_t(ui_eq(v_layout, 'list')) %}
{%- set c_7 -%}
{%- for v_p in ui_l(v_projects) %}
{%- set c_6 -%}
{{ include('blocks/media-frame.html.twig', {'p': {'alt': ui_get(v_p, ['title']), 'ratio': '1/1', 'className': ui_cnv(['size-16 shrink-0'])}}, with_context = false) }}
{%- set c_5 -%}
{%- set c_3 -%}
{%- set c_1 -%}
{{ ui_text(ui_get(v_p, ['title'])) }}
{%- endset -%}
{{ include('ui/text/text.html.twig', {'p': {'Size': 'sm', 'Weight': 'semibold'}, 'children': c_1}, with_context = false) }}
{%- set c_2 -%}
{{ ui_text(ui_get(v_p, ['year'])) }}
{%- endset -%}
{{ include('ui/text/text.html.twig', {'p': {'Size': 'xs', 'Class': 'text-muted-foreground'}, 'children': c_2}, with_context = false) }}
{%- endset -%}
{{ include('ui/group/group.html.twig', {'p': {'Gap': '4', 'Justify': 'between'}, 'children': c_3}, with_context = false) }}
{%- set c_4 -%}
{{ ui_text(ui_get(v_p, ['summary'])) }}
{%- endset -%}
{{ include('ui/text/text.html.twig', {'p': {'Size': 'sm', 'Class': 'text-muted-foreground'}, 'children': c_4}, with_context = false) }}
{%- endset -%}
{{ include('ui/stack/stack.html.twig', {'p': {'Gap': '2', 'Align': 'stretch', 'Class': 'flex-1'}, 'children': c_5}, with_context = false) }}
{%- endset -%}
{{ include('ui/group/group.html.twig', {'p': {'Gap': '4', 'Align': 'start', 'Class': 'border-b border-border pb-4', 'Attrs': ui_attrs(['data-testid', 'item'])}, 'children': c_6}, with_context = false) }}
{%- endfor %}
{%- endset -%}
{{ include('ui/stack/stack.html.twig', {'p': {'Gap': '4', 'Align': 'stretch', 'Attrs': ui_attrs(['data-testid', 'items'])}, 'children': c_7}, with_context = false) }}
{%- else %}
{{ include('blocks/project-tiles.html.twig', {'p': {'projects': v_projects, 'labels': v_labels, 'layout': v_layout}}, with_context = false) }}
{%- endif %}
{%- endset -%}
{{ include('blocks/section-frame.html.twig', {'p': {'id': v_id, 'title': v_title, 'lead': v_lead, 'tone': v_tone, 'density': v_density, 'layout': (ui_t(ui_eq(v_layout, 'list')) ? 'split' : 'stack'), 'media': {'show': ui_eq(v_layout, 'list'), 'align': 'start'}, 'landmarkLabel': v_landmarkLabel, 'aside': f_8}, 'children': c_10}, with_context = false) }}
{#- Code generated by xgen. DO NOT EDIT.
Source: xgen/specs/organisms/photo-gallery.json
Photos in a grid, a masonry of mixed heights, a mosaic with one big tile, a featured picture over a strip of thumbnails, or cards with a title and a tag. Static markup: the featured layout's arrows are the page's. Axes: layout (grid, masonry, mosaic, featured, cards), captions (show, hide), tone, density.
Props (p): id, title, lead, photos, labels, layout, captions, tone, density, landmarkLabel. -#}
{%- set v_id = (p.id ?? null) -%}
{%- set v_title = (p.title ?? null) -%}
{%- set v_lead = (p.lead ?? '') -%}
{%- set v_photos = (p.photos ?? null) -%}
{%- set v_labels = (p.labels ?? null) -%}
{%- set v_layout = (p.layout ?? 'grid') -%}
{%- set v_captions = (p.captions ?? 'show') -%}
{%- set v_tone = (p.tone ?? 'default') -%}
{%- set v_density = (p.density ?? 'default') -%}
{%- set v_landmarkLabel = (p.landmarkLabel ?? null) -%}
{%- set c_16 -%}
{%- if ui_t(ui_eq(v_layout, 'featured')) %}
{%- set c_9 -%}
{{ include('blocks/media-frame.html.twig', {'p': {'alt': v_title}}, with_context = false) }}
{%- set c_7 -%}
{%- set c_3 -%}
{%- set c_1 -%}
{{ ui_text(ui_first_of(v_photos, 'title')) }}
{%- endset -%}
{{ include('ui/text/text.html.twig', {'p': {'Size': 'base', 'Weight': 'semibold'}, 'children': c_1}, with_context = false) }}
{%- set c_2 -%}
{{ ui_text(ui_tpl(ui_get(v_labels, ['counter']), [1, ui_len(v_photos)])) }}
{%- endset -%}
{{ include('ui/text/text.html.twig', {'p': {'Size': 'xs', 'Class': 'text-muted-foreground'}, 'children': c_2}, with_context = false) }}
{%- endset -%}
{{ include('ui/stack/stack.html.twig', {'p': {'Gap': '0'}, 'children': c_3}, with_context = false) }}
{%- set c_6 -%}
{%- set c_4 -%}
{{ include('ui/lucide-icon/lucide-icon.html.twig', {'p': {'Name': 'chevron-left', 'Size': 16}}, with_context = false) }}
{%- endset -%}
{{ include('ui/button/button.html.twig', {'p': {'Variant': 'outline', 'Size': 'sm', 'Layout': 'icon', 'AriaLabel': ui_s(ui_get(v_labels, ['previous']))}, 'children': c_4}, with_context = false) }}
{%- set c_5 -%}
{{ include('ui/lucide-icon/lucide-icon.html.twig', {'p': {'Name': 'chevron-right', 'Size': 16}}, with_context = false) }}
{%- endset -%}
{{ include('ui/button/button.html.twig', {'p': {'Variant': 'outline', 'Size': 'sm', 'Layout': 'icon', 'AriaLabel': ui_s(ui_get(v_labels, ['next']))}, 'children': c_5}, with_context = false) }}
{%- endset -%}
{{ include('ui/group/group.html.twig', {'p': {'Gap': '2'}, 'children': c_6}, with_context = false) }}
{%- endset -%}
{{ include('ui/group/group.html.twig', {'p': {'Gap': '4', 'Align': 'center', 'Justify': 'between'}, 'children': c_7}, with_context = false) }}
{%- set c_8 -%}
{%- for v_p in ui_l(v_photos) %}
{%- set v_i = loop.index0 -%}
{{ include('blocks/media-frame.html.twig', {'p': {'alt': ui_get(v_p, ['title']), 'ratio': '1/1', 'className': ui_cnv([(ui_t(ui_eq(v_i, 0)) ? 'ring-2 ring-foreground' : '')])}}, with_context = false) }}
{%- endfor %}
{%- endset -%}
{{ include('ui/box/box.html.twig', {'p': {'Class': 'grid grid-cols-3 gap-2 sm:grid-cols-9', 'Attrs': ui_attrs(['data-testid', 'thumbs'])}, 'children': c_8}, with_context = false) }}
{%- endset -%}
{{ include('ui/stack/stack.html.twig', {'p': {'Gap': '4', 'Align': 'stretch', 'Attrs': ui_attrs(['data-testid', 'featured'])}, 'children': c_9}, with_context = false) }}
{%- else %}
{%- set c_15 -%}
{%- for v_p in ui_l(v_photos) %}
{%- set v_i = loop.index0 -%}
{%- set c_14 -%}
{{ include('blocks/media-frame.html.twig', {'p': {'alt': ui_get(v_p, ['title']), 'ratio': (ui_t(ui_eq(v_layout, 'masonry')) ? (ui_t(ui_eq(ui_get(v_p, ['size']), 'tall')) ? '3/4' : (ui_t(ui_eq(ui_get(v_p, ['size']), 'wide')) ? '16/9' : (ui_t(ui_eq(ui_get(v_p, ['size']), 'large')) ? '4/3' : '1/1'))) : (ui_t(ui_eq(v_layout, 'grid')) ? '4/3' : '1/1')), 'className': ui_cnv([(ui_t(ui_eq(v_layout, 'mosaic')) ? 'h-full' : '')])}}, with_context = false) }}
{%- if ui_t(ui_and([ui_eq(v_captions, 'show'), ui_eq(v_layout, 'cards')])) %}
{%- set c_12 -%}
{%- set c_10 -%}
{{ ui_text(ui_get(v_p, ['title'])) }}
{%- endset -%}
{{ include('ui/text/text.html.twig', {'p': {'Size': 'sm', 'Weight': 'semibold'}, 'children': c_10}, with_context = false) }}
{%- set c_11 -%}
{{ ui_text(ui_get(v_p, ['tag'])) }}
{%- endset -%}
{{ include('ui/badge/badge.html.twig', {'p': {'Variant': 'secondary', 'Size': 'sm'}, 'children': c_11}, with_context = false) }}
{%- endset -%}
{{ include('ui/group/group.html.twig', {'p': {'Gap': '4', 'Align': 'center', 'Justify': 'between'}, 'children': c_12}, with_context = false) }}
{%- endif %}
{%- if ui_t(ui_and([ui_eq(v_captions, 'show'), ui_or([ui_eq(v_layout, 'grid'), ui_eq(v_layout, 'masonry')])])) %}
{%- set c_13 -%}
{{ ui_text(ui_get(v_p, ['title'])) }}
{%- endset -%}
{{ include('ui/box/box.html.twig', {'p': {'Class': 'text-sm text-muted-foreground', 'Attrs': ui_attrs(['data-testid', 'caption'])}, 'children': c_13}, with_context = false) }}
{%- endif %}
{%- endset -%}
{{ include('blocks/figure-block.html.twig', {'p': {'className': ui_cnv([ui_cnv(['flex flex-col gap-2', (ui_t(ui_eq(v_layout, 'masonry')) ? 'mb-4 break-inside-avoid' : ''), (ui_t(ui_and([ui_eq(v_layout, 'mosaic'), ui_eq(v_i, 0)])) ? 'col-span-2 row-span-2' : ''), (ui_t(ui_eq(v_layout, 'cards')) ? 'rounded bg-card inset-ring inset-ring-border p-4' : '')])]), 'testid': 'item'}, 'children': c_14}, with_context = false) }}
{%- endfor %}
{%- endset -%}
{{ include('ui/box/box.html.twig', {'p': {'Class': ui_s((ui_t(ui_eq(v_layout, 'masonry')) ? 'columns-1 gap-4 sm:columns-2 lg:columns-3' : (ui_t(ui_eq(v_layout, 'mosaic')) ? 'grid grid-cols-2 gap-4 md:grid-cols-4' : 'grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3'))), 'Attrs': ui_attrs(['data-testid', 'items'])}, 'children': c_15}, with_context = false) }}
{%- endif %}
{%- endset -%}
{{ include('blocks/section-frame.html.twig', {'p': {'id': v_id, 'title': v_title, 'lead': v_lead, 'tone': v_tone, 'density': v_density, 'landmarkLabel': v_landmarkLabel}, 'children': c_16}, with_context = false) }}
{#- Code generated by xgen. DO NOT EDIT.
Source: xgen/specs/organisms/sitemap-footer.json
A footer with the brand, a tagline, groups of links and the copyright. Axes: layout (columns: brand above, equal columns per group, row: the brand, the group names and the copyright in one row), signup mode (none, first: a sign-up above the links), status mode (none, show: a live status pill), density. The live status itself is a port contract.
Props (p): label, brand, tagline, copyright, groups, signup, status, id, layout, density, landmarkLabel. -#}
{%- set v_label = (p.label ?? null) -%}
{%- set v_brand = (p.brand ?? null) -%}
{%- set v_tagline = (p.tagline ?? null) -%}
{%- set v_copyright = (p.copyright ?? null) -%}
{%- set v_groups = (p.groups ?? null) -%}
{%- set v_signup = (p.signup ?? null) -%}
{%- set v_status = (p.status ?? null) -%}
{%- set v_id = (p.id ?? 'footer') -%}
{%- set v_layout = (p.layout ?? 'columns') -%}
{%- set v_density = (p.density ?? 'default') -%}
{%- set v_landmarkLabel = (p.landmarkLabel ?? null) -%}
{%- if ui_t(ui_eq(v_layout, 'card')) %}
{{ include('blocks/footer-card.html.twig', {'p': {'label': v_label, 'brand': v_brand, 'groups': v_groups, 'landmarkLabel': v_landmarkLabel}}, with_context = false) }}
{%- else %}
{%- set c_21 -%}
{%- set c_20 -%}
{%- if ui_t(ui_eq(ui_get(v_signup, ['mode']), 'first')) %}
{%- set c_6 -%}
{%- set c_1 -%}
{{ ui_text(ui_get(v_signup, ['title'])) }}
{%- endset -%}
{{ include('ui/title/title.html.twig', {'p': {'As': ui_i(3), 'Size': 'xl', 'Weight': 'bold'}, 'children': c_1}, with_context = false) }}
{%- set c_5 -%}
{%- set c_2 -%}
{{ ui_text(ui_get(v_signup, ['label'])) }}
{%- endset -%}
{{ include('ui/label/label.html.twig', {'p': {'HTMLFor': ui_s(ui_tpl('{0}-email', [v_id])), 'Class': 'sr-only'}, 'children': c_2}, with_context = false) }}
{%- set c_4 -%}
{{ include('ui/input/input.html.twig', {'p': {'Type': 'email', 'Name': 'email', 'Class': 'min-w-0 flex-1', 'Attrs': ui_attrs(['id', ui_tpl('{0}-email', [v_id]), 'data-testid', 'field'])}}, with_context = false) }}
{%- set c_3 -%}
{{ ui_text(ui_get(v_signup, ['submit'])) }}
{%- endset -%}
{{ include('ui/button/button.html.twig', {'p': {'Variant': 'default', 'Size': 'default', 'Type': 'submit', 'Attrs': ui_attrs(['data-testid', 'submit'])}, 'children': c_3}, with_context = false) }}
{%- endset -%}
{{ include('ui/group/group.html.twig', {'p': {'Gap': '2', 'Align': 'start', 'Class': 'w-full flex-wrap'}, 'children': c_4}, with_context = false) }}
{%- endset -%}
{{ include('ui/form/form.html.twig', {'p': {'Method': 'dialog', 'Class': ui_s(ui_cnv(['w-full max-w-md', (ui_t(false) ? 'mx-auto' : '')])), 'Attrs': ui_attrs(['data-testid', 'email-form'])}, 'children': c_5}, with_context = false) }}
{%- endset -%}
{{ include('ui/stack/stack.html.twig', {'p': {'Gap': '4', 'Class': 'max-w-md', 'Attrs': ui_attrs(['data-testid', 'signup'])}, 'children': c_6}, with_context = false) }}
{%- endif %}
{%- if ui_t(ui_eq(v_layout, 'columns')) %}
{%- set c_11 -%}
{%- set c_9 -%}
{%- set c_7 -%}
{{ ui_text(v_brand) }}
{%- endset -%}
{{ include('ui/text/text.html.twig', {'p': {'Size': 'xl', 'Weight': 'bold'}, 'children': c_7}, with_context = false) }}
{%- set c_8 -%}
{{ ui_text(v_tagline) }}
{%- endset -%}
{{ include('ui/text/text.html.twig', {'p': {'Size': 'sm', 'Class': 'text-muted-foreground'}, 'children': c_8}, with_context = false) }}
{%- endset -%}
{{ include('ui/stack/stack.html.twig', {'p': {'Gap': '2', 'Class': 'md:w-64 md:shrink-0'}, 'children': c_9}, with_context = false) }}
{%- set c_10 -%}
{{ include('blocks/footer-columns.html.twig', {'p': {'label': v_label, 'groups': v_groups, 'landmarkLabel': v_landmarkLabel}}, with_context = false) }}
{%- endset -%}
{{ include('ui/box/box.html.twig', {'p': {'Class': 'min-w-0 flex-1'}, 'children': c_10}, with_context = false) }}
{%- endset -%}
{{ include('ui/box/box.html.twig', {'p': {'Class': 'flex flex-col gap-8 md:flex-row md:items-start md:gap-12', 'Attrs': ui_attrs(['data-slot', 'footer-top'])}, 'children': c_11}, with_context = false) }}
{%- else %}
{%- set c_16 -%}
{%- set c_12 -%}
{{ ui_text(v_brand) }}
{%- endset -%}
{{ include('ui/text/text.html.twig', {'p': {'Size': 'base', 'Weight': 'bold'}, 'children': c_12}, with_context = false) }}
{%- set c_15 -%}
{%- set c_14 -%}
{%- for v_g in ui_l(v_groups) %}
{%- set c_13 -%}
{{ ui_text(ui_get(v_g, ['title'])) }}
{%- endset -%}
{{ include('ui/link/link.html.twig', {'p': {'Href': '#/', 'Variant': 'default', 'Class': 'text-sm', 'Attrs': ui_attrs(['data-testid', 'group'])}, 'children': c_13}, with_context = false) }}
{%- endfor %}
{%- endset -%}
{{ include('ui/group/group.html.twig', {'p': {'Gap': '4', 'Class': 'flex-wrap'}, 'children': c_14}, with_context = false) }}
{%- endset -%}
{{ include('blocks/nav-block.html.twig', {'p': {'label': (ui_t(v_landmarkLabel) ? ui_uniq(ui_tpl('{0}, {1}', [v_label, v_landmarkLabel])) : v_label)}, 'children': c_15}, with_context = false) }}
{%- endset -%}
{{ include('ui/group/group.html.twig', {'p': {'Gap': '6', 'Align': 'center', 'Justify': 'between', 'Class': 'flex-wrap'}, 'children': c_16}, with_context = false) }}
{%- endif %}
{%- set c_19 -%}
{%- set c_17 -%}
{{ ui_text(v_copyright) }}
{%- endset -%}
{{ include('ui/text/text.html.twig', {'p': {'Size': 'sm', 'Class': 'text-muted-foreground'}, 'children': c_17}, with_context = false) }}
{%- if ui_t(ui_eq(ui_get(v_status, ['mode']), 'show')) %}
{%- set c_18 -%}
{{ ui_text(ui_get(v_status, ['label'])) }}
{%- endset -%}
{{ include('blocks/pill.html.twig', {'p': {'tone': 'green', 'icon': 'circle-check'}, 'children': c_18}, with_context = false) }}
{%- endif %}
{%- endset -%}
{{ include('ui/group/group.html.twig', {'p': {'Gap': '4', 'Align': 'center', 'Justify': 'between', 'Class': 'flex-wrap border-t border-border pt-6'}, 'children': c_19}, with_context = false) }}
{%- endset -%}
{{ include('ui/container/container.html.twig', {'p': {'Class': ui_s(ui_cnv(['mx-auto w-full max-w-6xl px-4', 'flex flex-col gap-8', (ui_t(ui_eq(v_density, 'compact')) ? 'py-6' : 'py-12')])), 'Attrs': ui_attrs(['data-slot', 'container'])}, 'children': c_20}, with_context = false) }}
{%- endset -%}
{{ include('ui/block/block.html.twig', {'p': {'Tag': 'footer', 'Class': 'mt-12 border-t border-border', 'Attrs': ui_attrs(['data-testid', 'site-footer', 'data-layout', v_layout, 'aria-label', v_landmarkLabel])}, 'children': c_21}, with_context = false) }}
{%- endif %}
Jinja2 is not installed by the CLI. Copy the template files below into your Jinja2 templates, together with the ui8kit_jinja Python package from packages/jinja2/ui of the source:
- py/ui8kit_jinja/__init__.py
- py/ui8kit_jinja/cn_merge.py
- py/ui8kit_jinja/runtime.py
{#- Code generated by xgen. DO NOT EDIT.
Source: xgen/specs/organisms/nav-bar.json
A top bar in four shapes. Axes: layout (inline: brand left, links, button right; split: the brand in the middle with the links on both sides; search: a search field with its shortcut in the middle), over (none, media: the bar sits over a picture, transparent), actions mode (none, cta), tone (default, inverse: on a dark hero band). Turning solid on scroll is a port contract.
Props (p): label, brand, links, current, actions, search, tone, layout, over, skip, landmarkLabel. -#}
{%- set v_label = ui_def(p['label'], none) -%}
{%- set v_brand = ui_def(p['brand'], none) -%}
{%- set v_links = ui_def(p['links'], none) -%}
{%- set v_current = ui_def(p['current'], '') -%}
{%- set v_actions = ui_def(p['actions'], none) -%}
{%- set v_search = ui_def(p['search'], none) -%}
{%- set v_tone = ui_def(p['tone'], 'default') -%}
{%- set v_layout = ui_def(p['layout'], 'inline') -%}
{%- set v_over = ui_def(p['over'], 'none') -%}
{%- set v_skip = ui_def(p['skip'], none) -%}
{%- set v_landmarkLabel = ui_def(p['landmarkLabel'], none) -%}
{%- set c_13 -%}
{{ ui_include('blocks/over-media.html.j2', {'p': {'on': ui_eq(v_over, 'media'), 'alt': v_brand}}) }}
{%- if ui_t(v_skip) %}
{%- set c_1 -%}
{{ ui_text(v_skip) }}
{%- endset -%}
{{ ui_include('ui/link-plain/link-plain.html.j2', {'p': {'Href': '#main-content', 'Class': 'sr-only focus:not-sr-only focus:fixed focus:left-2 focus:top-2 focus:z-50 focus:rounded focus:bg-background focus:px-4 focus:py-2 focus:text-sm focus:inset-ring focus:inset-ring-border', 'Attrs': ui_attrs(['data-testid', 'skip-link'])}, 'children': c_1}) }}
{%- endif %}
{%- set c_12 -%}
{%- set c_11 -%}
{%- if ui_t(ui_eq(v_layout, 'split')) %}
{%- set c_8 -%}
{%- set c_7 -%}
{%- set c_2 -%}
{{ ui_include('blocks/nav-links.html.j2', {'p': {'links': v_links, 'current': v_current, 'side': 'left'}}) }}
{%- endset -%}
{{ ui_include('ui/box/box.html.j2', {'p': {'Class': 'md:justify-self-start'}, 'children': c_2}) }}
{%- set c_4 -%}
{%- set c_3 -%}
{{ ui_text(v_brand) }}
{%- endset -%}
{{ ui_include('ui/link/link.html.j2', {'p': {'Href': '#/', 'Variant': 'default', 'Class': 'text-lg font-medium', 'Attrs': ui_attrs(['data-testid', 'brand'])}, 'children': c_3}) }}
{%- endset -%}
{{ ui_include('ui/box/box.html.j2', {'p': {'Class': 'text-center'}, 'children': c_4}) }}
{%- set c_6 -%}
{%- set c_5 -%}
{{ ui_include('blocks/nav-links.html.j2', {'p': {'links': v_links, 'current': v_current, 'side': 'right'}}) }}
{%- endset -%}
{{ ui_include('ui/box/box.html.j2', {'p': {}, 'children': c_5}) }}
{{ ui_include('blocks/nav-actions.html.j2', {'p': {'login': ui_get(v_actions, ['login']), 'loginHref': ui_get(v_actions, ['loginHref']), 'cta': ui_get(v_actions, ['cta']), 'ctaHref': ui_get(v_actions, ['href']), 'actions': ui_get(v_actions, ['mode']), 'tone': v_tone, 'themeLabel': ui_get(v_actions, ['themeLabel'])}}) }}
{%- endset -%}
{{ ui_include('ui/group/group.html.j2', {'p': {'Gap': '4', 'Align': 'center', 'Justify': 'end', 'Class': 'flex-wrap md:justify-self-end'}, 'children': c_6}) }}
{%- endset -%}
{{ ui_include('ui/grid/grid.html.j2', {'p': {'Cols': '1-3', 'Class': 'w-full items-center gap-4'}, 'children': c_7}) }}
{%- endset -%}
{{ ui_include('blocks/nav-block.html.j2', {'p': {'label': (ui_uniq(ui_tpl('{0}, {1}', [v_label, v_landmarkLabel])) if ui_t(v_landmarkLabel) else v_label), 'className': ui_cnv(['w-full']), 'testid': 'site-nav'}, 'children': c_8}) }}
{%- else %}
{%- set c_9 -%}
{{ ui_text(v_brand) }}
{%- endset -%}
{{ ui_include('ui/link/link.html.j2', {'p': {'Href': '#/', 'Variant': 'default', 'Class': 'text-lg font-medium', 'Attrs': ui_attrs(['data-testid', 'brand'])}, 'children': c_9}) }}
{%- if ui_t(ui_eq(v_layout, 'search')) %}
{{ ui_include('blocks/search-palette.html.j2', {'p': {'label': ui_get(v_search, ['label']), 'shortcut': ui_get(v_search, ['shortcut'])}}) }}
{%- endif %}
{%- set c_10 -%}
{{ ui_include('blocks/nav-links.html.j2', {'p': {'links': v_links, 'current': v_current}}) }}
{%- endset -%}
{{ ui_include('blocks/nav-block.html.j2', {'p': {'label': (ui_uniq(ui_tpl('{0}, {1}', [v_label, v_landmarkLabel])) if ui_t(v_landmarkLabel) else v_label), 'className': ui_cnv(['order-last w-full overflow-x-auto md:order-none md:w-auto [&>div]:flex-nowrap md:[&>div]:flex-wrap [&_a]:shrink-0']), 'testid': 'site-nav'}, 'children': c_10}) }}
{{ ui_include('blocks/nav-actions.html.j2', {'p': {'login': ui_get(v_actions, ['login']), 'loginHref': ui_get(v_actions, ['loginHref']), 'cta': ui_get(v_actions, ['cta']), 'ctaHref': ui_get(v_actions, ['href']), 'actions': ui_get(v_actions, ['mode']), 'tone': v_tone, 'themeLabel': ui_get(v_actions, ['themeLabel'])}}) }}
{%- endif %}
{%- endset -%}
{{ ui_include('ui/box/box.html.j2', {'p': {'Class': ui_s(ui_cnv(['flex flex-wrap items-center justify-between gap-4', 'py-4']))}, 'children': c_11}) }}
{%- endset -%}
{{ ui_include('ui/container/container.html.j2', {'p': {'Class': 'mx-auto w-full max-w-6xl px-4', 'Attrs': ui_attrs(['data-slot', 'container'])}, 'children': c_12}) }}
{%- endset -%}
{{ ui_include('ui/block/block.html.j2', {'p': {'Tag': 'header', 'Class': ui_s(ui_cnv(['relative', ('border-b border-transparent bg-foreground text-background [&_a]:text-background [&_button]:text-background' if ui_t(ui_eq(v_tone, 'inverse')) else 'border-b border-border bg-background'), ('isolate overflow-hidden border-0 bg-transparent' if ui_t(ui_eq(v_over, 'media')) else '')])), 'Attrs': ui_attrs(['data-testid', 'nav-bar', 'data-layout', v_layout, 'data-tone', v_tone, 'aria-label', v_landmarkLabel])}, 'children': c_13}) }}
{#- Code generated by xgen. DO NOT EDIT.
Source: xgen/specs/organisms/about-me.json
A personal about section beside a portrait: a badge, the heading, a lead, then key facts and a list of specialities, or skill chips and expertise bars, and one or two links. Axes: layout (facts, skills), mediaSide, tone.
Props (p): id, title, lead, badge, level, facts, skills, labels, actions, layout, mediaSide, tone, landmarkLabel. -#}
{%- set v_id = ui_def(p['id'], none) -%}
{%- set v_title = ui_def(p['title'], none) -%}
{%- set v_lead = ui_def(p['lead'], '') -%}
{%- set v_badge = ui_def(p['badge'], '') -%}
{%- set v_level = ui_def(p['level'], 1) -%}
{%- set v_facts = ui_def(p['facts'], none) -%}
{%- set v_skills = ui_def(p['skills'], none) -%}
{%- set v_labels = ui_def(p['labels'], none) -%}
{%- set v_actions = ui_def(p['actions'], none) -%}
{%- set v_layout = ui_def(p['layout'], 'facts') -%}
{%- set v_mediaSide = ui_def(p['mediaSide'], 'start') -%}
{%- set v_tone = ui_def(p['tone'], 'default') -%}
{%- set v_landmarkLabel = ui_def(p['landmarkLabel'], none) -%}
{%- set f_10 -%}
{{ ui_include('blocks/media-frame.html.j2', {'p': {'alt': v_title, 'ratio': '3/4'}}) }}
{%- endset -%}
{%- set c_11 -%}
{%- if ui_t(ui_eq(v_layout, 'facts')) %}
{%- set c_4 -%}
{%- for v_f in ui_l(v_facts) %}
{%- set c_3 -%}
{%- set c_1 -%}
{{ ui_text(ui_get(v_f, ['label'])) }}
{%- endset -%}
{{ ui_include('ui/text/text.html.j2', {'p': {'Size': 'xs', 'Class': 'text-muted-foreground'}, 'children': c_1}) }}
{%- set c_2 -%}
{{ ui_text(ui_get(v_f, ['value'])) }}
{%- endset -%}
{{ ui_include('ui/text/text.html.j2', {'p': {'Size': 'sm', 'Weight': 'semibold'}, 'children': c_2}) }}
{%- endset -%}
{{ ui_include('ui/list/list-item.html.j2', {'p': {'Class': 'rounded bg-card inset-ring inset-ring-border flex flex-col gap-0 p-4', 'Attrs': ui_attrs(['data-testid', 'fact'])}, 'children': c_3}) }}
{%- endfor %}
{%- endset -%}
{{ ui_include('ui/list/list.html.j2', {'p': {'Tag': 'ul', 'Class': 'grid grid-cols-1 gap-4 sm:grid-cols-2', 'Attrs': ui_attrs(['data-testid', 'facts'])}, 'children': c_4}) }}
{%- else %}
{%- set c_9 -%}
{%- for v_s in ui_l(v_skills) %}
{%- set c_8 -%}
{%- set c_7 -%}
{%- set c_5 -%}
{{ ui_text(ui_get(v_s, ['label'])) }}
{%- endset -%}
{{ ui_include('ui/text/text.html.j2', {'p': {'Size': 'sm', 'Weight': 'semibold'}, 'children': c_5}) }}
{%- set c_6 -%}
{{ ui_text(ui_tpl(ui_get(v_labels, ['level']), [ui_get(v_s, ['level'])])) }}
{%- endset -%}
{{ ui_include('ui/text/text.html.j2', {'p': {'Size': 'xs', 'Class': 'text-muted-foreground'}, 'children': c_6}) }}
{%- endset -%}
{{ ui_include('ui/group/group.html.j2', {'p': {'Gap': '4', 'Justify': 'between'}, 'children': c_7}) }}
{{ ui_include('ui/form/progress.html.j2', {'p': {'Value': ui_s(ui_str(ui_get(v_s, ['level']))), 'Max': '100', 'Attrs': ui_attrs(['aria-label', ui_get(v_s, ['label'])])}}) }}
{%- endset -%}
{{ ui_include('ui/stack/stack.html.j2', {'p': {'Gap': '2', 'Align': 'stretch', 'Attrs': ui_attrs(['data-testid', 'skill'])}, 'children': c_8}) }}
{%- endfor %}
{%- endset -%}
{{ ui_include('ui/stack/stack.html.j2', {'p': {'Gap': '4', 'Align': 'stretch', 'Attrs': ui_attrs(['data-testid', 'skills'])}, 'children': c_9}) }}
{%- endif %}
{{ ui_include('blocks/action-group.html.j2', {'p': {'primary': ui_get(v_actions, ['cta']), 'primaryHref': ui_get(v_actions, ['href']), 'secondary': (ui_get(v_actions, ['secondary']) if ui_t(ui_eq(ui_get(v_actions, ['mode']), 'two')) else none), 'secondaryHref': ui_get(v_actions, ['secondaryHref'])}}) }}
{%- endset -%}
{{ ui_include('blocks/section-frame.html.j2', {'p': {'id': v_id, 'title': v_title, 'lead': v_lead, 'heading': {'badge': v_badge, 'level': v_level}, 'layout': 'split', 'media': {'show': true, 'side': v_mediaSide}, 'tone': v_tone, 'landmarkLabel': v_landmarkLabel, 'aside': f_10}, 'children': c_11}) }}
{#- Code generated by xgen. DO NOT EDIT.
Source: xgen/specs/organisms/project-grid.json
Projects of a studio or a person: cards with tags and links, a compact grid, tiles with the caption over the picture, a bento with one big project, or a list beside a collage. Axes: layout (cards, compact, overlay, bento, list), tone, density.
Props (p): id, title, lead, projects, labels, layout, tone, density, landmarkLabel. -#}
{%- set v_id = ui_def(p['id'], none) -%}
{%- set v_title = ui_def(p['title'], none) -%}
{%- set v_lead = ui_def(p['lead'], '') -%}
{%- set v_projects = ui_def(p['projects'], none) -%}
{%- set v_labels = ui_def(p['labels'], none) -%}
{%- set v_layout = ui_def(p['layout'], 'cards') -%}
{%- set v_tone = ui_def(p['tone'], 'default') -%}
{%- set v_density = ui_def(p['density'], 'default') -%}
{%- set v_landmarkLabel = ui_def(p['landmarkLabel'], none) -%}
{%- set f_8 -%}
{%- set c_9 -%}
{{ ui_include('blocks/media-frame.html.j2', {'p': {'alt': v_title, 'ratio': '3/4'}}) }}
{{ ui_include('blocks/media-frame.html.j2', {'p': {'alt': v_title, 'ratio': '3/4', 'className': ui_cnv(['mt-8'])}}) }}
{%- endset -%}
{{ ui_include('ui/box/box.html.j2', {'p': {'Class': 'grid grid-cols-2 gap-4', 'Attrs': ui_attrs(['data-testid', 'collage'])}, 'children': c_9}) }}
{%- endset -%}
{%- set c_10 -%}
{%- if ui_t(ui_eq(v_layout, 'list')) %}
{%- set c_7 -%}
{%- for v_p in ui_l(v_projects) %}
{%- set c_6 -%}
{{ ui_include('blocks/media-frame.html.j2', {'p': {'alt': ui_get(v_p, ['title']), 'ratio': '1/1', 'className': ui_cnv(['size-16 shrink-0'])}}) }}
{%- set c_5 -%}
{%- set c_3 -%}
{%- set c_1 -%}
{{ ui_text(ui_get(v_p, ['title'])) }}
{%- endset -%}
{{ ui_include('ui/text/text.html.j2', {'p': {'Size': 'sm', 'Weight': 'semibold'}, 'children': c_1}) }}
{%- set c_2 -%}
{{ ui_text(ui_get(v_p, ['year'])) }}
{%- endset -%}
{{ ui_include('ui/text/text.html.j2', {'p': {'Size': 'xs', 'Class': 'text-muted-foreground'}, 'children': c_2}) }}
{%- endset -%}
{{ ui_include('ui/group/group.html.j2', {'p': {'Gap': '4', 'Justify': 'between'}, 'children': c_3}) }}
{%- set c_4 -%}
{{ ui_text(ui_get(v_p, ['summary'])) }}
{%- endset -%}
{{ ui_include('ui/text/text.html.j2', {'p': {'Size': 'sm', 'Class': 'text-muted-foreground'}, 'children': c_4}) }}
{%- endset -%}
{{ ui_include('ui/stack/stack.html.j2', {'p': {'Gap': '2', 'Align': 'stretch', 'Class': 'flex-1'}, 'children': c_5}) }}
{%- endset -%}
{{ ui_include('ui/group/group.html.j2', {'p': {'Gap': '4', 'Align': 'start', 'Class': 'border-b border-border pb-4', 'Attrs': ui_attrs(['data-testid', 'item'])}, 'children': c_6}) }}
{%- endfor %}
{%- endset -%}
{{ ui_include('ui/stack/stack.html.j2', {'p': {'Gap': '4', 'Align': 'stretch', 'Attrs': ui_attrs(['data-testid', 'items'])}, 'children': c_7}) }}
{%- else %}
{{ ui_include('blocks/project-tiles.html.j2', {'p': {'projects': v_projects, 'labels': v_labels, 'layout': v_layout}}) }}
{%- endif %}
{%- endset -%}
{{ ui_include('blocks/section-frame.html.j2', {'p': {'id': v_id, 'title': v_title, 'lead': v_lead, 'tone': v_tone, 'density': v_density, 'layout': ('split' if ui_t(ui_eq(v_layout, 'list')) else 'stack'), 'media': {'show': ui_eq(v_layout, 'list'), 'align': 'start'}, 'landmarkLabel': v_landmarkLabel, 'aside': f_8}, 'children': c_10}) }}
{#- Code generated by xgen. DO NOT EDIT.
Source: xgen/specs/organisms/photo-gallery.json
Photos in a grid, a masonry of mixed heights, a mosaic with one big tile, a featured picture over a strip of thumbnails, or cards with a title and a tag. Static markup: the featured layout's arrows are the page's. Axes: layout (grid, masonry, mosaic, featured, cards), captions (show, hide), tone, density.
Props (p): id, title, lead, photos, labels, layout, captions, tone, density, landmarkLabel. -#}
{%- set v_id = ui_def(p['id'], none) -%}
{%- set v_title = ui_def(p['title'], none) -%}
{%- set v_lead = ui_def(p['lead'], '') -%}
{%- set v_photos = ui_def(p['photos'], none) -%}
{%- set v_labels = ui_def(p['labels'], none) -%}
{%- set v_layout = ui_def(p['layout'], 'grid') -%}
{%- set v_captions = ui_def(p['captions'], 'show') -%}
{%- set v_tone = ui_def(p['tone'], 'default') -%}
{%- set v_density = ui_def(p['density'], 'default') -%}
{%- set v_landmarkLabel = ui_def(p['landmarkLabel'], none) -%}
{%- set c_16 -%}
{%- if ui_t(ui_eq(v_layout, 'featured')) %}
{%- set c_9 -%}
{{ ui_include('blocks/media-frame.html.j2', {'p': {'alt': v_title}}) }}
{%- set c_7 -%}
{%- set c_3 -%}
{%- set c_1 -%}
{{ ui_text(ui_first_of(v_photos, 'title')) }}
{%- endset -%}
{{ ui_include('ui/text/text.html.j2', {'p': {'Size': 'base', 'Weight': 'semibold'}, 'children': c_1}) }}
{%- set c_2 -%}
{{ ui_text(ui_tpl(ui_get(v_labels, ['counter']), [1, ui_len(v_photos)])) }}
{%- endset -%}
{{ ui_include('ui/text/text.html.j2', {'p': {'Size': 'xs', 'Class': 'text-muted-foreground'}, 'children': c_2}) }}
{%- endset -%}
{{ ui_include('ui/stack/stack.html.j2', {'p': {'Gap': '0'}, 'children': c_3}) }}
{%- set c_6 -%}
{%- set c_4 -%}
{{ ui_include('ui/lucide-icon/lucide-icon.html.j2', {'p': {'Name': 'chevron-left', 'Size': 16}}) }}
{%- endset -%}
{{ ui_include('ui/button/button.html.j2', {'p': {'Variant': 'outline', 'Size': 'sm', 'Layout': 'icon', 'AriaLabel': ui_s(ui_get(v_labels, ['previous']))}, 'children': c_4}) }}
{%- set c_5 -%}
{{ ui_include('ui/lucide-icon/lucide-icon.html.j2', {'p': {'Name': 'chevron-right', 'Size': 16}}) }}
{%- endset -%}
{{ ui_include('ui/button/button.html.j2', {'p': {'Variant': 'outline', 'Size': 'sm', 'Layout': 'icon', 'AriaLabel': ui_s(ui_get(v_labels, ['next']))}, 'children': c_5}) }}
{%- endset -%}
{{ ui_include('ui/group/group.html.j2', {'p': {'Gap': '2'}, 'children': c_6}) }}
{%- endset -%}
{{ ui_include('ui/group/group.html.j2', {'p': {'Gap': '4', 'Align': 'center', 'Justify': 'between'}, 'children': c_7}) }}
{%- set c_8 -%}
{%- for v_p in ui_l(v_photos) %}
{%- set v_i = loop.index0 -%}
{{ ui_include('blocks/media-frame.html.j2', {'p': {'alt': ui_get(v_p, ['title']), 'ratio': '1/1', 'className': ui_cnv([('ring-2 ring-foreground' if ui_t(ui_eq(v_i, 0)) else '')])}}) }}
{%- endfor %}
{%- endset -%}
{{ ui_include('ui/box/box.html.j2', {'p': {'Class': 'grid grid-cols-3 gap-2 sm:grid-cols-9', 'Attrs': ui_attrs(['data-testid', 'thumbs'])}, 'children': c_8}) }}
{%- endset -%}
{{ ui_include('ui/stack/stack.html.j2', {'p': {'Gap': '4', 'Align': 'stretch', 'Attrs': ui_attrs(['data-testid', 'featured'])}, 'children': c_9}) }}
{%- else %}
{%- set c_15 -%}
{%- for v_p in ui_l(v_photos) %}
{%- set v_i = loop.index0 -%}
{%- set c_14 -%}
{{ ui_include('blocks/media-frame.html.j2', {'p': {'alt': ui_get(v_p, ['title']), 'ratio': (('3/4' if ui_t(ui_eq(ui_get(v_p, ['size']), 'tall')) else ('16/9' if ui_t(ui_eq(ui_get(v_p, ['size']), 'wide')) else ('4/3' if ui_t(ui_eq(ui_get(v_p, ['size']), 'large')) else '1/1'))) if ui_t(ui_eq(v_layout, 'masonry')) else ('4/3' if ui_t(ui_eq(v_layout, 'grid')) else '1/1')), 'className': ui_cnv([('h-full' if ui_t(ui_eq(v_layout, 'mosaic')) else '')])}}) }}
{%- if ui_t(ui_and([ui_eq(v_captions, 'show'), ui_eq(v_layout, 'cards')])) %}
{%- set c_12 -%}
{%- set c_10 -%}
{{ ui_text(ui_get(v_p, ['title'])) }}
{%- endset -%}
{{ ui_include('ui/text/text.html.j2', {'p': {'Size': 'sm', 'Weight': 'semibold'}, 'children': c_10}) }}
{%- set c_11 -%}
{{ ui_text(ui_get(v_p, ['tag'])) }}
{%- endset -%}
{{ ui_include('ui/badge/badge.html.j2', {'p': {'Variant': 'secondary', 'Size': 'sm'}, 'children': c_11}) }}
{%- endset -%}
{{ ui_include('ui/group/group.html.j2', {'p': {'Gap': '4', 'Align': 'center', 'Justify': 'between'}, 'children': c_12}) }}
{%- endif %}
{%- if ui_t(ui_and([ui_eq(v_captions, 'show'), ui_or([ui_eq(v_layout, 'grid'), ui_eq(v_layout, 'masonry')])])) %}
{%- set c_13 -%}
{{ ui_text(ui_get(v_p, ['title'])) }}
{%- endset -%}
{{ ui_include('ui/box/box.html.j2', {'p': {'Class': 'text-sm text-muted-foreground', 'Attrs': ui_attrs(['data-testid', 'caption'])}, 'children': c_13}) }}
{%- endif %}
{%- endset -%}
{{ ui_include('blocks/figure-block.html.j2', {'p': {'className': ui_cnv([ui_cnv(['flex flex-col gap-2', ('mb-4 break-inside-avoid' if ui_t(ui_eq(v_layout, 'masonry')) else ''), ('col-span-2 row-span-2' if ui_t(ui_and([ui_eq(v_layout, 'mosaic'), ui_eq(v_i, 0)])) else ''), ('rounded bg-card inset-ring inset-ring-border p-4' if ui_t(ui_eq(v_layout, 'cards')) else '')])]), 'testid': 'item'}, 'children': c_14}) }}
{%- endfor %}
{%- endset -%}
{{ ui_include('ui/box/box.html.j2', {'p': {'Class': ui_s(('columns-1 gap-4 sm:columns-2 lg:columns-3' if ui_t(ui_eq(v_layout, 'masonry')) else ('grid grid-cols-2 gap-4 md:grid-cols-4' if ui_t(ui_eq(v_layout, 'mosaic')) else 'grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3'))), 'Attrs': ui_attrs(['data-testid', 'items'])}, 'children': c_15}) }}
{%- endif %}
{%- endset -%}
{{ ui_include('blocks/section-frame.html.j2', {'p': {'id': v_id, 'title': v_title, 'lead': v_lead, 'tone': v_tone, 'density': v_density, 'landmarkLabel': v_landmarkLabel}, 'children': c_16}) }}
{#- Code generated by xgen. DO NOT EDIT.
Source: xgen/specs/organisms/sitemap-footer.json
A footer with the brand, a tagline, groups of links and the copyright. Axes: layout (columns: brand above, equal columns per group, row: the brand, the group names and the copyright in one row), signup mode (none, first: a sign-up above the links), status mode (none, show: a live status pill), density. The live status itself is a port contract.
Props (p): label, brand, tagline, copyright, groups, signup, status, id, layout, density, landmarkLabel. -#}
{%- set v_label = ui_def(p['label'], none) -%}
{%- set v_brand = ui_def(p['brand'], none) -%}
{%- set v_tagline = ui_def(p['tagline'], none) -%}
{%- set v_copyright = ui_def(p['copyright'], none) -%}
{%- set v_groups = ui_def(p['groups'], none) -%}
{%- set v_signup = ui_def(p['signup'], none) -%}
{%- set v_status = ui_def(p['status'], none) -%}
{%- set v_id = ui_def(p['id'], 'footer') -%}
{%- set v_layout = ui_def(p['layout'], 'columns') -%}
{%- set v_density = ui_def(p['density'], 'default') -%}
{%- set v_landmarkLabel = ui_def(p['landmarkLabel'], none) -%}
{%- if ui_t(ui_eq(v_layout, 'card')) %}
{{ ui_include('blocks/footer-card.html.j2', {'p': {'label': v_label, 'brand': v_brand, 'groups': v_groups, 'landmarkLabel': v_landmarkLabel}}) }}
{%- else %}
{%- set c_21 -%}
{%- set c_20 -%}
{%- if ui_t(ui_eq(ui_get(v_signup, ['mode']), 'first')) %}
{%- set c_6 -%}
{%- set c_1 -%}
{{ ui_text(ui_get(v_signup, ['title'])) }}
{%- endset -%}
{{ ui_include('ui/title/title.html.j2', {'p': {'As': ui_i(3), 'Size': 'xl', 'Weight': 'bold'}, 'children': c_1}) }}
{%- set c_5 -%}
{%- set c_2 -%}
{{ ui_text(ui_get(v_signup, ['label'])) }}
{%- endset -%}
{{ ui_include('ui/label/label.html.j2', {'p': {'HTMLFor': ui_s(ui_tpl('{0}-email', [v_id])), 'Class': 'sr-only'}, 'children': c_2}) }}
{%- set c_4 -%}
{{ ui_include('ui/input/input.html.j2', {'p': {'Type': 'email', 'Name': 'email', 'Class': 'min-w-0 flex-1', 'Attrs': ui_attrs(['id', ui_tpl('{0}-email', [v_id]), 'data-testid', 'field'])}}) }}
{%- set c_3 -%}
{{ ui_text(ui_get(v_signup, ['submit'])) }}
{%- endset -%}
{{ ui_include('ui/button/button.html.j2', {'p': {'Variant': 'default', 'Size': 'default', 'Type': 'submit', 'Attrs': ui_attrs(['data-testid', 'submit'])}, 'children': c_3}) }}
{%- endset -%}
{{ ui_include('ui/group/group.html.j2', {'p': {'Gap': '2', 'Align': 'start', 'Class': 'w-full flex-wrap'}, 'children': c_4}) }}
{%- endset -%}
{{ ui_include('ui/form/form.html.j2', {'p': {'Method': 'dialog', 'Class': ui_s(ui_cnv(['w-full max-w-md', ('mx-auto' if ui_t(false) else '')])), 'Attrs': ui_attrs(['data-testid', 'email-form'])}, 'children': c_5}) }}
{%- endset -%}
{{ ui_include('ui/stack/stack.html.j2', {'p': {'Gap': '4', 'Class': 'max-w-md', 'Attrs': ui_attrs(['data-testid', 'signup'])}, 'children': c_6}) }}
{%- endif %}
{%- if ui_t(ui_eq(v_layout, 'columns')) %}
{%- set c_11 -%}
{%- set c_9 -%}
{%- set c_7 -%}
{{ ui_text(v_brand) }}
{%- endset -%}
{{ ui_include('ui/text/text.html.j2', {'p': {'Size': 'xl', 'Weight': 'bold'}, 'children': c_7}) }}
{%- set c_8 -%}
{{ ui_text(v_tagline) }}
{%- endset -%}
{{ ui_include('ui/text/text.html.j2', {'p': {'Size': 'sm', 'Class': 'text-muted-foreground'}, 'children': c_8}) }}
{%- endset -%}
{{ ui_include('ui/stack/stack.html.j2', {'p': {'Gap': '2', 'Class': 'md:w-64 md:shrink-0'}, 'children': c_9}) }}
{%- set c_10 -%}
{{ ui_include('blocks/footer-columns.html.j2', {'p': {'label': v_label, 'groups': v_groups, 'landmarkLabel': v_landmarkLabel}}) }}
{%- endset -%}
{{ ui_include('ui/box/box.html.j2', {'p': {'Class': 'min-w-0 flex-1'}, 'children': c_10}) }}
{%- endset -%}
{{ ui_include('ui/box/box.html.j2', {'p': {'Class': 'flex flex-col gap-8 md:flex-row md:items-start md:gap-12', 'Attrs': ui_attrs(['data-slot', 'footer-top'])}, 'children': c_11}) }}
{%- else %}
{%- set c_16 -%}
{%- set c_12 -%}
{{ ui_text(v_brand) }}
{%- endset -%}
{{ ui_include('ui/text/text.html.j2', {'p': {'Size': 'base', 'Weight': 'bold'}, 'children': c_12}) }}
{%- set c_15 -%}
{%- set c_14 -%}
{%- for v_g in ui_l(v_groups) %}
{%- set c_13 -%}
{{ ui_text(ui_get(v_g, ['title'])) }}
{%- endset -%}
{{ ui_include('ui/link/link.html.j2', {'p': {'Href': '#/', 'Variant': 'default', 'Class': 'text-sm', 'Attrs': ui_attrs(['data-testid', 'group'])}, 'children': c_13}) }}
{%- endfor %}
{%- endset -%}
{{ ui_include('ui/group/group.html.j2', {'p': {'Gap': '4', 'Class': 'flex-wrap'}, 'children': c_14}) }}
{%- endset -%}
{{ ui_include('blocks/nav-block.html.j2', {'p': {'label': (ui_uniq(ui_tpl('{0}, {1}', [v_label, v_landmarkLabel])) if ui_t(v_landmarkLabel) else v_label)}, 'children': c_15}) }}
{%- endset -%}
{{ ui_include('ui/group/group.html.j2', {'p': {'Gap': '6', 'Align': 'center', 'Justify': 'between', 'Class': 'flex-wrap'}, 'children': c_16}) }}
{%- endif %}
{%- set c_19 -%}
{%- set c_17 -%}
{{ ui_text(v_copyright) }}
{%- endset -%}
{{ ui_include('ui/text/text.html.j2', {'p': {'Size': 'sm', 'Class': 'text-muted-foreground'}, 'children': c_17}) }}
{%- if ui_t(ui_eq(ui_get(v_status, ['mode']), 'show')) %}
{%- set c_18 -%}
{{ ui_text(ui_get(v_status, ['label'])) }}
{%- endset -%}
{{ ui_include('blocks/pill.html.j2', {'p': {'tone': 'green', 'icon': 'circle-check'}, 'children': c_18}) }}
{%- endif %}
{%- endset -%}
{{ ui_include('ui/group/group.html.j2', {'p': {'Gap': '4', 'Align': 'center', 'Justify': 'between', 'Class': 'flex-wrap border-t border-border pt-6'}, 'children': c_19}) }}
{%- endset -%}
{{ ui_include('ui/container/container.html.j2', {'p': {'Class': ui_s(ui_cnv(['mx-auto w-full max-w-6xl px-4', 'flex flex-col gap-8', ('py-6' if ui_t(ui_eq(v_density, 'compact')) else 'py-12')])), 'Attrs': ui_attrs(['data-slot', 'container'])}, 'children': c_20}) }}
{%- endset -%}
{{ ui_include('ui/block/block.html.j2', {'p': {'Tag': 'footer', 'Class': 'mt-12 border-t border-border', 'Attrs': ui_attrs(['data-testid', 'site-footer', 'data-layout', v_layout, 'aria-label', v_landmarkLabel])}, 'children': c_21}) }}
{%- endif %}
Latte is not installed by the CLI. Copy the template files below into your Latte templates, together with these helper files from packages/latte/ui of the source (the Runtime, CnMerge and the Latte extension):
- php/CnMerge.php
- php/Extension.php
- php/Runtime.php
{* Code generated by xgen. DO NOT EDIT.
Source: xgen/specs/organisms/nav-bar.json
A top bar in four shapes. Axes: layout (inline: brand left, links, button right; split: the brand in the middle with the links on both sides; search: a search field with its shortcut in the middle), over (none, media: the bar sits over a picture, transparent), actions mode (none, cta), tone (default, inverse: on a dark hero band). Turning solid on scroll is a port contract.
Props (p): label, brand, links, current, actions, search, tone, layout, over, skip, landmarkLabel. *}
{var $v_label = ($p['label'] ?? null)}
{var $v_brand = ($p['brand'] ?? null)}
{var $v_links = ($p['links'] ?? null)}
{var $v_current = ($p['current'] ?? '')}
{var $v_actions = ($p['actions'] ?? null)}
{var $v_search = ($p['search'] ?? null)}
{var $v_tone = ($p['tone'] ?? 'default')}
{var $v_layout = ($p['layout'] ?? 'inline')}
{var $v_over = ($p['over'] ?? 'none')}
{var $v_skip = ($p['skip'] ?? null)}
{var $v_landmarkLabel = ($p['landmarkLabel'] ?? null)}
{capture $c_13}
{=ui_include('blocks/over-media.latte', ['p' => ['on' => ui_eq($v_over, 'media'), 'alt' => $v_brand]])|noescape}
{if ui_t($v_skip)}
{capture $c_1}
{=ui_text($v_skip)}
{/capture}
{=ui_include('ui/link-plain/link-plain.latte', ['p' => ['Href' => '#main-content', 'Class' => 'sr-only focus:not-sr-only focus:fixed focus:left-2 focus:top-2 focus:z-50 focus:rounded focus:bg-background focus:px-4 focus:py-2 focus:text-sm focus:inset-ring focus:inset-ring-border', 'Attrs' => ui_attrs(['data-testid', 'skip-link'])], 'children' => $c_1])|noescape}
{/if}
{capture $c_12}
{capture $c_11}
{if ui_t(ui_eq($v_layout, 'split'))}
{capture $c_8}
{capture $c_7}
{capture $c_2}
{=ui_include('blocks/nav-links.latte', ['p' => ['links' => $v_links, 'current' => $v_current, 'side' => 'left']])|noescape}
{/capture}
{=ui_include('ui/box/box.latte', ['p' => ['Class' => 'md:justify-self-start'], 'children' => $c_2])|noescape}
{capture $c_4}
{capture $c_3}
{=ui_text($v_brand)}
{/capture}
{=ui_include('ui/link/link.latte', ['p' => ['Href' => '#/', 'Variant' => 'default', 'Class' => 'text-lg font-medium', 'Attrs' => ui_attrs(['data-testid', 'brand'])], 'children' => $c_3])|noescape}
{/capture}
{=ui_include('ui/box/box.latte', ['p' => ['Class' => 'text-center'], 'children' => $c_4])|noescape}
{capture $c_6}
{capture $c_5}
{=ui_include('blocks/nav-links.latte', ['p' => ['links' => $v_links, 'current' => $v_current, 'side' => 'right']])|noescape}
{/capture}
{=ui_include('ui/box/box.latte', ['p' => [], 'children' => $c_5])|noescape}
{=ui_include('blocks/nav-actions.latte', ['p' => ['login' => ui_get($v_actions, ['login']), 'loginHref' => ui_get($v_actions, ['loginHref']), 'cta' => ui_get($v_actions, ['cta']), 'ctaHref' => ui_get($v_actions, ['href']), 'actions' => ui_get($v_actions, ['mode']), 'tone' => $v_tone, 'themeLabel' => ui_get($v_actions, ['themeLabel'])]])|noescape}
{/capture}
{=ui_include('ui/group/group.latte', ['p' => ['Gap' => '4', 'Align' => 'center', 'Justify' => 'end', 'Class' => 'flex-wrap md:justify-self-end'], 'children' => $c_6])|noescape}
{/capture}
{=ui_include('ui/grid/grid.latte', ['p' => ['Cols' => '1-3', 'Class' => 'w-full items-center gap-4'], 'children' => $c_7])|noescape}
{/capture}
{=ui_include('blocks/nav-block.latte', ['p' => ['label' => (ui_t($v_landmarkLabel) ? ui_uniq(ui_tpl('{0}, {1}', [$v_label, $v_landmarkLabel])) : $v_label), 'className' => ui_cnv(['w-full']), 'testid' => 'site-nav'], 'children' => $c_8])|noescape}
{else}
{capture $c_9}
{=ui_text($v_brand)}
{/capture}
{=ui_include('ui/link/link.latte', ['p' => ['Href' => '#/', 'Variant' => 'default', 'Class' => 'text-lg font-medium', 'Attrs' => ui_attrs(['data-testid', 'brand'])], 'children' => $c_9])|noescape}
{if ui_t(ui_eq($v_layout, 'search'))}
{=ui_include('blocks/search-palette.latte', ['p' => ['label' => ui_get($v_search, ['label']), 'shortcut' => ui_get($v_search, ['shortcut'])]])|noescape}
{/if}
{capture $c_10}
{=ui_include('blocks/nav-links.latte', ['p' => ['links' => $v_links, 'current' => $v_current]])|noescape}
{/capture}
{=ui_include('blocks/nav-block.latte', ['p' => ['label' => (ui_t($v_landmarkLabel) ? ui_uniq(ui_tpl('{0}, {1}', [$v_label, $v_landmarkLabel])) : $v_label), 'className' => ui_cnv(['order-last w-full overflow-x-auto md:order-none md:w-auto [&>div]:flex-nowrap md:[&>div]:flex-wrap [&_a]:shrink-0']), 'testid' => 'site-nav'], 'children' => $c_10])|noescape}
{=ui_include('blocks/nav-actions.latte', ['p' => ['login' => ui_get($v_actions, ['login']), 'loginHref' => ui_get($v_actions, ['loginHref']), 'cta' => ui_get($v_actions, ['cta']), 'ctaHref' => ui_get($v_actions, ['href']), 'actions' => ui_get($v_actions, ['mode']), 'tone' => $v_tone, 'themeLabel' => ui_get($v_actions, ['themeLabel'])]])|noescape}
{/if}
{/capture}
{=ui_include('ui/box/box.latte', ['p' => ['Class' => ui_s(ui_cnv(['flex flex-wrap items-center justify-between gap-4', 'py-4']))], 'children' => $c_11])|noescape}
{/capture}
{=ui_include('ui/container/container.latte', ['p' => ['Class' => 'mx-auto w-full max-w-6xl px-4', 'Attrs' => ui_attrs(['data-slot', 'container'])], 'children' => $c_12])|noescape}
{/capture}
{=ui_include('ui/block/block.latte', ['p' => ['Tag' => 'header', 'Class' => ui_s(ui_cnv(['relative', (ui_t(ui_eq($v_tone, 'inverse')) ? 'border-b border-transparent bg-foreground text-background [&_a]:text-background [&_button]:text-background' : 'border-b border-border bg-background'), (ui_t(ui_eq($v_over, 'media')) ? 'isolate overflow-hidden border-0 bg-transparent' : '')])), 'Attrs' => ui_attrs(['data-testid', 'nav-bar', 'data-layout', $v_layout, 'data-tone', $v_tone, 'aria-label', $v_landmarkLabel])], 'children' => $c_13])|noescape}
{* Code generated by xgen. DO NOT EDIT.
Source: xgen/specs/organisms/about-me.json
A personal about section beside a portrait: a badge, the heading, a lead, then key facts and a list of specialities, or skill chips and expertise bars, and one or two links. Axes: layout (facts, skills), mediaSide, tone.
Props (p): id, title, lead, badge, level, facts, skills, labels, actions, layout, mediaSide, tone, landmarkLabel. *}
{var $v_id = ($p['id'] ?? null)}
{var $v_title = ($p['title'] ?? null)}
{var $v_lead = ($p['lead'] ?? '')}
{var $v_badge = ($p['badge'] ?? '')}
{var $v_level = ($p['level'] ?? 1)}
{var $v_facts = ($p['facts'] ?? null)}
{var $v_skills = ($p['skills'] ?? null)}
{var $v_labels = ($p['labels'] ?? null)}
{var $v_actions = ($p['actions'] ?? null)}
{var $v_layout = ($p['layout'] ?? 'facts')}
{var $v_mediaSide = ($p['mediaSide'] ?? 'start')}
{var $v_tone = ($p['tone'] ?? 'default')}
{var $v_landmarkLabel = ($p['landmarkLabel'] ?? null)}
{capture $f_10}
{=ui_include('blocks/media-frame.latte', ['p' => ['alt' => $v_title, 'ratio' => '3/4']])|noescape}
{/capture}
{capture $c_11}
{if ui_t(ui_eq($v_layout, 'facts'))}
{capture $c_4}
{foreach ui_l($v_facts) as $v_f}
{capture $c_3}
{capture $c_1}
{=ui_text(ui_get($v_f, ['label']))}
{/capture}
{=ui_include('ui/text/text.latte', ['p' => ['Size' => 'xs', 'Class' => 'text-muted-foreground'], 'children' => $c_1])|noescape}
{capture $c_2}
{=ui_text(ui_get($v_f, ['value']))}
{/capture}
{=ui_include('ui/text/text.latte', ['p' => ['Size' => 'sm', 'Weight' => 'semibold'], 'children' => $c_2])|noescape}
{/capture}
{=ui_include('ui/list/list-item.latte', ['p' => ['Class' => 'rounded bg-card inset-ring inset-ring-border flex flex-col gap-0 p-4', 'Attrs' => ui_attrs(['data-testid', 'fact'])], 'children' => $c_3])|noescape}
{/foreach}
{/capture}
{=ui_include('ui/list/list.latte', ['p' => ['Tag' => 'ul', 'Class' => 'grid grid-cols-1 gap-4 sm:grid-cols-2', 'Attrs' => ui_attrs(['data-testid', 'facts'])], 'children' => $c_4])|noescape}
{else}
{capture $c_9}
{foreach ui_l($v_skills) as $v_s}
{capture $c_8}
{capture $c_7}
{capture $c_5}
{=ui_text(ui_get($v_s, ['label']))}
{/capture}
{=ui_include('ui/text/text.latte', ['p' => ['Size' => 'sm', 'Weight' => 'semibold'], 'children' => $c_5])|noescape}
{capture $c_6}
{=ui_text(ui_tpl(ui_get($v_labels, ['level']), [ui_get($v_s, ['level'])]))}
{/capture}
{=ui_include('ui/text/text.latte', ['p' => ['Size' => 'xs', 'Class' => 'text-muted-foreground'], 'children' => $c_6])|noescape}
{/capture}
{=ui_include('ui/group/group.latte', ['p' => ['Gap' => '4', 'Justify' => 'between'], 'children' => $c_7])|noescape}
{=ui_include('ui/form/progress.latte', ['p' => ['Value' => ui_s(ui_str(ui_get($v_s, ['level']))), 'Max' => '100', 'Attrs' => ui_attrs(['aria-label', ui_get($v_s, ['label'])])]])|noescape}
{/capture}
{=ui_include('ui/stack/stack.latte', ['p' => ['Gap' => '2', 'Align' => 'stretch', 'Attrs' => ui_attrs(['data-testid', 'skill'])], 'children' => $c_8])|noescape}
{/foreach}
{/capture}
{=ui_include('ui/stack/stack.latte', ['p' => ['Gap' => '4', 'Align' => 'stretch', 'Attrs' => ui_attrs(['data-testid', 'skills'])], 'children' => $c_9])|noescape}
{/if}
{=ui_include('blocks/action-group.latte', ['p' => ['primary' => ui_get($v_actions, ['cta']), 'primaryHref' => ui_get($v_actions, ['href']), 'secondary' => (ui_t(ui_eq(ui_get($v_actions, ['mode']), 'two')) ? ui_get($v_actions, ['secondary']) : null), 'secondaryHref' => ui_get($v_actions, ['secondaryHref'])]])|noescape}
{/capture}
{=ui_include('blocks/section-frame.latte', ['p' => ['id' => $v_id, 'title' => $v_title, 'lead' => $v_lead, 'heading' => ['badge' => $v_badge, 'level' => $v_level], 'layout' => 'split', 'media' => ['show' => true, 'side' => $v_mediaSide], 'tone' => $v_tone, 'landmarkLabel' => $v_landmarkLabel, 'aside' => $f_10], 'children' => $c_11])|noescape}
{* Code generated by xgen. DO NOT EDIT.
Source: xgen/specs/organisms/project-grid.json
Projects of a studio or a person: cards with tags and links, a compact grid, tiles with the caption over the picture, a bento with one big project, or a list beside a collage. Axes: layout (cards, compact, overlay, bento, list), tone, density.
Props (p): id, title, lead, projects, labels, layout, tone, density, landmarkLabel. *}
{var $v_id = ($p['id'] ?? null)}
{var $v_title = ($p['title'] ?? null)}
{var $v_lead = ($p['lead'] ?? '')}
{var $v_projects = ($p['projects'] ?? null)}
{var $v_labels = ($p['labels'] ?? null)}
{var $v_layout = ($p['layout'] ?? 'cards')}
{var $v_tone = ($p['tone'] ?? 'default')}
{var $v_density = ($p['density'] ?? 'default')}
{var $v_landmarkLabel = ($p['landmarkLabel'] ?? null)}
{capture $f_8}
{capture $c_9}
{=ui_include('blocks/media-frame.latte', ['p' => ['alt' => $v_title, 'ratio' => '3/4']])|noescape}
{=ui_include('blocks/media-frame.latte', ['p' => ['alt' => $v_title, 'ratio' => '3/4', 'className' => ui_cnv(['mt-8'])]])|noescape}
{/capture}
{=ui_include('ui/box/box.latte', ['p' => ['Class' => 'grid grid-cols-2 gap-4', 'Attrs' => ui_attrs(['data-testid', 'collage'])], 'children' => $c_9])|noescape}
{/capture}
{capture $c_10}
{if ui_t(ui_eq($v_layout, 'list'))}
{capture $c_7}
{foreach ui_l($v_projects) as $v_p}
{capture $c_6}
{=ui_include('blocks/media-frame.latte', ['p' => ['alt' => ui_get($v_p, ['title']), 'ratio' => '1/1', 'className' => ui_cnv(['size-16 shrink-0'])]])|noescape}
{capture $c_5}
{capture $c_3}
{capture $c_1}
{=ui_text(ui_get($v_p, ['title']))}
{/capture}
{=ui_include('ui/text/text.latte', ['p' => ['Size' => 'sm', 'Weight' => 'semibold'], 'children' => $c_1])|noescape}
{capture $c_2}
{=ui_text(ui_get($v_p, ['year']))}
{/capture}
{=ui_include('ui/text/text.latte', ['p' => ['Size' => 'xs', 'Class' => 'text-muted-foreground'], 'children' => $c_2])|noescape}
{/capture}
{=ui_include('ui/group/group.latte', ['p' => ['Gap' => '4', 'Justify' => 'between'], 'children' => $c_3])|noescape}
{capture $c_4}
{=ui_text(ui_get($v_p, ['summary']))}
{/capture}
{=ui_include('ui/text/text.latte', ['p' => ['Size' => 'sm', 'Class' => 'text-muted-foreground'], 'children' => $c_4])|noescape}
{/capture}
{=ui_include('ui/stack/stack.latte', ['p' => ['Gap' => '2', 'Align' => 'stretch', 'Class' => 'flex-1'], 'children' => $c_5])|noescape}
{/capture}
{=ui_include('ui/group/group.latte', ['p' => ['Gap' => '4', 'Align' => 'start', 'Class' => 'border-b border-border pb-4', 'Attrs' => ui_attrs(['data-testid', 'item'])], 'children' => $c_6])|noescape}
{/foreach}
{/capture}
{=ui_include('ui/stack/stack.latte', ['p' => ['Gap' => '4', 'Align' => 'stretch', 'Attrs' => ui_attrs(['data-testid', 'items'])], 'children' => $c_7])|noescape}
{else}
{=ui_include('blocks/project-tiles.latte', ['p' => ['projects' => $v_projects, 'labels' => $v_labels, 'layout' => $v_layout]])|noescape}
{/if}
{/capture}
{=ui_include('blocks/section-frame.latte', ['p' => ['id' => $v_id, 'title' => $v_title, 'lead' => $v_lead, 'tone' => $v_tone, 'density' => $v_density, 'layout' => (ui_t(ui_eq($v_layout, 'list')) ? 'split' : 'stack'), 'media' => ['show' => ui_eq($v_layout, 'list'), 'align' => 'start'], 'landmarkLabel' => $v_landmarkLabel, 'aside' => $f_8], 'children' => $c_10])|noescape}
{* Code generated by xgen. DO NOT EDIT.
Source: xgen/specs/organisms/photo-gallery.json
Photos in a grid, a masonry of mixed heights, a mosaic with one big tile, a featured picture over a strip of thumbnails, or cards with a title and a tag. Static markup: the featured layout's arrows are the page's. Axes: layout (grid, masonry, mosaic, featured, cards), captions (show, hide), tone, density.
Props (p): id, title, lead, photos, labels, layout, captions, tone, density, landmarkLabel. *}
{var $v_id = ($p['id'] ?? null)}
{var $v_title = ($p['title'] ?? null)}
{var $v_lead = ($p['lead'] ?? '')}
{var $v_photos = ($p['photos'] ?? null)}
{var $v_labels = ($p['labels'] ?? null)}
{var $v_layout = ($p['layout'] ?? 'grid')}
{var $v_captions = ($p['captions'] ?? 'show')}
{var $v_tone = ($p['tone'] ?? 'default')}
{var $v_density = ($p['density'] ?? 'default')}
{var $v_landmarkLabel = ($p['landmarkLabel'] ?? null)}
{capture $c_16}
{if ui_t(ui_eq($v_layout, 'featured'))}
{capture $c_9}
{=ui_include('blocks/media-frame.latte', ['p' => ['alt' => $v_title]])|noescape}
{capture $c_7}
{capture $c_3}
{capture $c_1}
{=ui_text(ui_first_of($v_photos, 'title'))}
{/capture}
{=ui_include('ui/text/text.latte', ['p' => ['Size' => 'base', 'Weight' => 'semibold'], 'children' => $c_1])|noescape}
{capture $c_2}
{=ui_text(ui_tpl(ui_get($v_labels, ['counter']), [1, ui_len($v_photos)]))}
{/capture}
{=ui_include('ui/text/text.latte', ['p' => ['Size' => 'xs', 'Class' => 'text-muted-foreground'], 'children' => $c_2])|noescape}
{/capture}
{=ui_include('ui/stack/stack.latte', ['p' => ['Gap' => '0'], 'children' => $c_3])|noescape}
{capture $c_6}
{capture $c_4}
{=ui_include('ui/lucide-icon/lucide-icon.latte', ['p' => ['Name' => 'chevron-left', 'Size' => 16]])|noescape}
{/capture}
{=ui_include('ui/button/button.latte', ['p' => ['Variant' => 'outline', 'Size' => 'sm', 'Layout' => 'icon', 'AriaLabel' => ui_s(ui_get($v_labels, ['previous']))], 'children' => $c_4])|noescape}
{capture $c_5}
{=ui_include('ui/lucide-icon/lucide-icon.latte', ['p' => ['Name' => 'chevron-right', 'Size' => 16]])|noescape}
{/capture}
{=ui_include('ui/button/button.latte', ['p' => ['Variant' => 'outline', 'Size' => 'sm', 'Layout' => 'icon', 'AriaLabel' => ui_s(ui_get($v_labels, ['next']))], 'children' => $c_5])|noescape}
{/capture}
{=ui_include('ui/group/group.latte', ['p' => ['Gap' => '2'], 'children' => $c_6])|noescape}
{/capture}
{=ui_include('ui/group/group.latte', ['p' => ['Gap' => '4', 'Align' => 'center', 'Justify' => 'between'], 'children' => $c_7])|noescape}
{capture $c_8}
{foreach ui_l($v_photos) as $v_p}
{var $v_i = $iterator->counter0}
{=ui_include('blocks/media-frame.latte', ['p' => ['alt' => ui_get($v_p, ['title']), 'ratio' => '1/1', 'className' => ui_cnv([(ui_t(ui_eq($v_i, 0)) ? 'ring-2 ring-foreground' : '')])]])|noescape}
{/foreach}
{/capture}
{=ui_include('ui/box/box.latte', ['p' => ['Class' => 'grid grid-cols-3 gap-2 sm:grid-cols-9', 'Attrs' => ui_attrs(['data-testid', 'thumbs'])], 'children' => $c_8])|noescape}
{/capture}
{=ui_include('ui/stack/stack.latte', ['p' => ['Gap' => '4', 'Align' => 'stretch', 'Attrs' => ui_attrs(['data-testid', 'featured'])], 'children' => $c_9])|noescape}
{else}
{capture $c_15}
{foreach ui_l($v_photos) as $v_p}
{var $v_i = $iterator->counter0}
{capture $c_14}
{=ui_include('blocks/media-frame.latte', ['p' => ['alt' => ui_get($v_p, ['title']), 'ratio' => (ui_t(ui_eq($v_layout, 'masonry')) ? (ui_t(ui_eq(ui_get($v_p, ['size']), 'tall')) ? '3/4' : (ui_t(ui_eq(ui_get($v_p, ['size']), 'wide')) ? '16/9' : (ui_t(ui_eq(ui_get($v_p, ['size']), 'large')) ? '4/3' : '1/1'))) : (ui_t(ui_eq($v_layout, 'grid')) ? '4/3' : '1/1')), 'className' => ui_cnv([(ui_t(ui_eq($v_layout, 'mosaic')) ? 'h-full' : '')])]])|noescape}
{if ui_t(ui_and([ui_eq($v_captions, 'show'), ui_eq($v_layout, 'cards')]))}
{capture $c_12}
{capture $c_10}
{=ui_text(ui_get($v_p, ['title']))}
{/capture}
{=ui_include('ui/text/text.latte', ['p' => ['Size' => 'sm', 'Weight' => 'semibold'], 'children' => $c_10])|noescape}
{capture $c_11}
{=ui_text(ui_get($v_p, ['tag']))}
{/capture}
{=ui_include('ui/badge/badge.latte', ['p' => ['Variant' => 'secondary', 'Size' => 'sm'], 'children' => $c_11])|noescape}
{/capture}
{=ui_include('ui/group/group.latte', ['p' => ['Gap' => '4', 'Align' => 'center', 'Justify' => 'between'], 'children' => $c_12])|noescape}
{/if}
{if ui_t(ui_and([ui_eq($v_captions, 'show'), ui_or([ui_eq($v_layout, 'grid'), ui_eq($v_layout, 'masonry')])]))}
{capture $c_13}
{=ui_text(ui_get($v_p, ['title']))}
{/capture}
{=ui_include('ui/box/box.latte', ['p' => ['Class' => 'text-sm text-muted-foreground', 'Attrs' => ui_attrs(['data-testid', 'caption'])], 'children' => $c_13])|noescape}
{/if}
{/capture}
{=ui_include('blocks/figure-block.latte', ['p' => ['className' => ui_cnv([ui_cnv(['flex flex-col gap-2', (ui_t(ui_eq($v_layout, 'masonry')) ? 'mb-4 break-inside-avoid' : ''), (ui_t(ui_and([ui_eq($v_layout, 'mosaic'), ui_eq($v_i, 0)])) ? 'col-span-2 row-span-2' : ''), (ui_t(ui_eq($v_layout, 'cards')) ? 'rounded bg-card inset-ring inset-ring-border p-4' : '')])]), 'testid' => 'item'], 'children' => $c_14])|noescape}
{/foreach}
{/capture}
{=ui_include('ui/box/box.latte', ['p' => ['Class' => ui_s((ui_t(ui_eq($v_layout, 'masonry')) ? 'columns-1 gap-4 sm:columns-2 lg:columns-3' : (ui_t(ui_eq($v_layout, 'mosaic')) ? 'grid grid-cols-2 gap-4 md:grid-cols-4' : 'grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3'))), 'Attrs' => ui_attrs(['data-testid', 'items'])], 'children' => $c_15])|noescape}
{/if}
{/capture}
{=ui_include('blocks/section-frame.latte', ['p' => ['id' => $v_id, 'title' => $v_title, 'lead' => $v_lead, 'tone' => $v_tone, 'density' => $v_density, 'landmarkLabel' => $v_landmarkLabel], 'children' => $c_16])|noescape}
{* Code generated by xgen. DO NOT EDIT.
Source: xgen/specs/organisms/sitemap-footer.json
A footer with the brand, a tagline, groups of links and the copyright. Axes: layout (columns: brand above, equal columns per group, row: the brand, the group names and the copyright in one row), signup mode (none, first: a sign-up above the links), status mode (none, show: a live status pill), density. The live status itself is a port contract.
Props (p): label, brand, tagline, copyright, groups, signup, status, id, layout, density, landmarkLabel. *}
{var $v_label = ($p['label'] ?? null)}
{var $v_brand = ($p['brand'] ?? null)}
{var $v_tagline = ($p['tagline'] ?? null)}
{var $v_copyright = ($p['copyright'] ?? null)}
{var $v_groups = ($p['groups'] ?? null)}
{var $v_signup = ($p['signup'] ?? null)}
{var $v_status = ($p['status'] ?? null)}
{var $v_id = ($p['id'] ?? 'footer')}
{var $v_layout = ($p['layout'] ?? 'columns')}
{var $v_density = ($p['density'] ?? 'default')}
{var $v_landmarkLabel = ($p['landmarkLabel'] ?? null)}
{if ui_t(ui_eq($v_layout, 'card'))}
{=ui_include('blocks/footer-card.latte', ['p' => ['label' => $v_label, 'brand' => $v_brand, 'groups' => $v_groups, 'landmarkLabel' => $v_landmarkLabel]])|noescape}
{else}
{capture $c_21}
{capture $c_20}
{if ui_t(ui_eq(ui_get($v_signup, ['mode']), 'first'))}
{capture $c_6}
{capture $c_1}
{=ui_text(ui_get($v_signup, ['title']))}
{/capture}
{=ui_include('ui/title/title.latte', ['p' => ['As' => ui_i(3), 'Size' => 'xl', 'Weight' => 'bold'], 'children' => $c_1])|noescape}
{capture $c_5}
{capture $c_2}
{=ui_text(ui_get($v_signup, ['label']))}
{/capture}
{=ui_include('ui/label/label.latte', ['p' => ['HTMLFor' => ui_s(ui_tpl('{0}-email', [$v_id])), 'Class' => 'sr-only'], 'children' => $c_2])|noescape}
{capture $c_4}
{=ui_include('ui/input/input.latte', ['p' => ['Type' => 'email', 'Name' => 'email', 'Class' => 'min-w-0 flex-1', 'Attrs' => ui_attrs(['id', ui_tpl('{0}-email', [$v_id]), 'data-testid', 'field'])]])|noescape}
{capture $c_3}
{=ui_text(ui_get($v_signup, ['submit']))}
{/capture}
{=ui_include('ui/button/button.latte', ['p' => ['Variant' => 'default', 'Size' => 'default', 'Type' => 'submit', 'Attrs' => ui_attrs(['data-testid', 'submit'])], 'children' => $c_3])|noescape}
{/capture}
{=ui_include('ui/group/group.latte', ['p' => ['Gap' => '2', 'Align' => 'start', 'Class' => 'w-full flex-wrap'], 'children' => $c_4])|noescape}
{/capture}
{=ui_include('ui/form/form.latte', ['p' => ['Method' => 'dialog', 'Class' => ui_s(ui_cnv(['w-full max-w-md', (ui_t(false) ? 'mx-auto' : '')])), 'Attrs' => ui_attrs(['data-testid', 'email-form'])], 'children' => $c_5])|noescape}
{/capture}
{=ui_include('ui/stack/stack.latte', ['p' => ['Gap' => '4', 'Class' => 'max-w-md', 'Attrs' => ui_attrs(['data-testid', 'signup'])], 'children' => $c_6])|noescape}
{/if}
{if ui_t(ui_eq($v_layout, 'columns'))}
{capture $c_11}
{capture $c_9}
{capture $c_7}
{=ui_text($v_brand)}
{/capture}
{=ui_include('ui/text/text.latte', ['p' => ['Size' => 'xl', 'Weight' => 'bold'], 'children' => $c_7])|noescape}
{capture $c_8}
{=ui_text($v_tagline)}
{/capture}
{=ui_include('ui/text/text.latte', ['p' => ['Size' => 'sm', 'Class' => 'text-muted-foreground'], 'children' => $c_8])|noescape}
{/capture}
{=ui_include('ui/stack/stack.latte', ['p' => ['Gap' => '2', 'Class' => 'md:w-64 md:shrink-0'], 'children' => $c_9])|noescape}
{capture $c_10}
{=ui_include('blocks/footer-columns.latte', ['p' => ['label' => $v_label, 'groups' => $v_groups, 'landmarkLabel' => $v_landmarkLabel]])|noescape}
{/capture}
{=ui_include('ui/box/box.latte', ['p' => ['Class' => 'min-w-0 flex-1'], 'children' => $c_10])|noescape}
{/capture}
{=ui_include('ui/box/box.latte', ['p' => ['Class' => 'flex flex-col gap-8 md:flex-row md:items-start md:gap-12', 'Attrs' => ui_attrs(['data-slot', 'footer-top'])], 'children' => $c_11])|noescape}
{else}
{capture $c_16}
{capture $c_12}
{=ui_text($v_brand)}
{/capture}
{=ui_include('ui/text/text.latte', ['p' => ['Size' => 'base', 'Weight' => 'bold'], 'children' => $c_12])|noescape}
{capture $c_15}
{capture $c_14}
{foreach ui_l($v_groups) as $v_g}
{capture $c_13}
{=ui_text(ui_get($v_g, ['title']))}
{/capture}
{=ui_include('ui/link/link.latte', ['p' => ['Href' => '#/', 'Variant' => 'default', 'Class' => 'text-sm', 'Attrs' => ui_attrs(['data-testid', 'group'])], 'children' => $c_13])|noescape}
{/foreach}
{/capture}
{=ui_include('ui/group/group.latte', ['p' => ['Gap' => '4', 'Class' => 'flex-wrap'], 'children' => $c_14])|noescape}
{/capture}
{=ui_include('blocks/nav-block.latte', ['p' => ['label' => (ui_t($v_landmarkLabel) ? ui_uniq(ui_tpl('{0}, {1}', [$v_label, $v_landmarkLabel])) : $v_label)], 'children' => $c_15])|noescape}
{/capture}
{=ui_include('ui/group/group.latte', ['p' => ['Gap' => '6', 'Align' => 'center', 'Justify' => 'between', 'Class' => 'flex-wrap'], 'children' => $c_16])|noescape}
{/if}
{capture $c_19}
{capture $c_17}
{=ui_text($v_copyright)}
{/capture}
{=ui_include('ui/text/text.latte', ['p' => ['Size' => 'sm', 'Class' => 'text-muted-foreground'], 'children' => $c_17])|noescape}
{if ui_t(ui_eq(ui_get($v_status, ['mode']), 'show'))}
{capture $c_18}
{=ui_text(ui_get($v_status, ['label']))}
{/capture}
{=ui_include('blocks/pill.latte', ['p' => ['tone' => 'green', 'icon' => 'circle-check'], 'children' => $c_18])|noescape}
{/if}
{/capture}
{=ui_include('ui/group/group.latte', ['p' => ['Gap' => '4', 'Align' => 'center', 'Justify' => 'between', 'Class' => 'flex-wrap border-t border-border pt-6'], 'children' => $c_19])|noescape}
{/capture}
{=ui_include('ui/container/container.latte', ['p' => ['Class' => ui_s(ui_cnv(['mx-auto w-full max-w-6xl px-4', 'flex flex-col gap-8', (ui_t(ui_eq($v_density, 'compact')) ? 'py-6' : 'py-12')])), 'Attrs' => ui_attrs(['data-slot', 'container'])], 'children' => $c_20])|noescape}
{/capture}
{=ui_include('ui/block/block.latte', ['p' => ['Tag' => 'footer', 'Class' => 'mt-12 border-t border-border', 'Attrs' => ui_attrs(['data-testid', 'site-footer', 'data-layout', $v_layout, 'aria-label', $v_landmarkLabel])], 'children' => $c_21])|noescape}
{/if}