Footer Split
The brand with figures and a sitemap link over link-group cards; or a split beside a picture with points, link columns, a newsletter card, the contacts or the community channels.
Install
npx ui8kit add footer-splitPulls in: action-group, block, box, compose, container, feature-grid, footer-brand, footer-channels, footer-contacts, footer-figures, footer-group-cards, footer-link-columns, footer-points, footer-signup-card, footer-sitemap, group, kit-box, kit-text, media-frame, mega-menu, stack, stats-band, text, utils
Preview
Code
Point the CLI at this runtime once, then add the item:
npx ui8kit init --yes --framework svelte --dir src --registry-url https://registry.buildy.tw/svelte --strict-cdnnpx ui8kit add footer-split<!-- Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT. -->
<!--
A footer with more than links. Axes: layout (stats: the brand with three figures and a sitemap link over the
link groups as cards; points, links, newsletter, contacts, channels: a split beside a picture with the brand
and four points, the brand and small link columns, a newsletter card and link columns, the contacts and two
actions, or the community channels and figures), mediaSide, tone.
-->
<script lang="ts" module>
import type { Snippet } from "svelte";
import type { FooterExtras, FooterSplitLabels } from "./footer-split.types";
import type { MegaGroup } from "./mega-menu.types";
import type { Stat } from "./stats-band.types";
import type { Feature } from "./feature-grid.types";
export type FooterSplitProps = {
id?: string;
label: string;
brand: string;
tagline: string;
copyright: string;
groups: MegaGroup[];
extras: FooterExtras;
labels: FooterSplitLabels;
layout?: "stats" | "points" | "links" | "newsletter" | "contacts" | "channels";
mediaSide?: "end" | "start";
tone?: "default" | "muted";
image?: string;
imageAlt?: string;
landmarkLabel?: string;
};
</script>
<script lang="ts">
import Block from "../compose/Block.svelte";
import Box from "../compose/Box.svelte";
import Container from "../compose/Container.svelte";
import Group from "../compose/Group.svelte";
import Stack from "../compose/Stack.svelte";
import Text from "../compose/Text.svelte";
import ActionGroup from "../components/action-group.svelte";
import FooterBrand from "../components/footer-brand.svelte";
import FooterChannels from "../components/footer-channels.svelte";
import FooterContacts from "../components/footer-contacts.svelte";
import FooterFigures from "../components/footer-figures.svelte";
import FooterGroupCards from "../components/footer-group-cards.svelte";
import FooterLinkColumns from "../components/footer-link-columns.svelte";
import FooterPoints from "../components/footer-points.svelte";
import FooterSignupCard from "../components/footer-signup-card.svelte";
import FooterSitemap from "../components/footer-sitemap.svelte";
import MediaFrame from "../components/media-frame.svelte";
import { cn } from "../utils";
let {
id = "footer",
label,
brand,
tagline,
copyright,
groups,
extras,
labels,
layout = "stats",
mediaSide = "end",
tone = "default",
image,
imageAlt,
landmarkLabel,
}: FooterSplitProps = $props();
</script>
<Block
tag="footer"
class={cn("border-t border-border", (((tone as string) === "muted") ? "bg-muted" : ""))}
data-layout={layout}
aria-label={landmarkLabel}
data-slot="footer-split"
>
<Container class={cn("mx-auto w-full max-w-6xl px-4", "py-12")} data-slot="container">
{#if ((layout as string) === "stats")}
<Stack gap="8" align="stretch">
<Group gap="6" align="start" justify="between" class="flex-wrap">
<Stack gap="6" align="start">
<FooterBrand brand={brand} tagline={tagline} />
<FooterFigures extras={extras} />
</Stack>
<FooterSitemap href={extras.sitemapHref} label={labels.sitemap} />
</Group>
<FooterGroupCards label={label} groups={groups} landmarkLabel={landmarkLabel} />
<Box class="border-t border-border pt-6">
<Text size="sm" class="text-muted-foreground">
{copyright}
</Text>
</Box>
</Stack>
{:else}
<Box class="grid grid-cols-1 items-center gap-8 lg:grid-cols-2">
{#if ((mediaSide as string) === "start")}
<MediaFrame alt={(imageAlt ? imageAlt : brand)} src={image} ratio="4/3" />
{/if}
<Stack gap="8" align="stretch">
{#if (((layout as string) === "points") || ((layout as string) === "links"))}
<FooterBrand brand={brand} tagline={tagline} />
{:else}
<Stack gap="2" align="start">
<Text size="xl" weight="bold">
{(((layout as string) === "newsletter") ? labels.loopTitle : (((layout as string) === "channels") ? labels.joinTitle : labels.title))}
</Text>
<Text size="sm" class="text-muted-foreground">
{(((layout as string) === "newsletter") ? labels.loopText : (((layout as string) === "channels") ? labels.joinText : labels.text))}
</Text>
</Stack>
{/if}
{#if ((layout as string) === "points")}
<FooterPoints extras={extras} title={labels.points} />
{/if}
{#if ((layout as string) === "newsletter")}
<FooterSignupCard id={id} labels={labels} />
{/if}
{#if (((layout as string) === "links") || ((layout as string) === "newsletter"))}
<FooterLinkColumns label={label} groups={groups} landmarkLabel={landmarkLabel} />
{/if}
{#if ((layout as string) === "contacts")}
<FooterContacts extras={extras} />
<ActionGroup
primary={labels.cta}
primaryHref={extras.ctaHref}
secondary={labels.secondary}
secondaryHref={extras.secondaryHref}
/>
{/if}
{#if ((layout as string) === "channels")}
<FooterChannels extras={extras} />
<FooterFigures extras={extras} />
{/if}
<Box class="border-t border-border pt-6">
<Text size="sm" class="text-muted-foreground">
{copyright}
</Text>
</Box>
</Stack>
{#if ((mediaSide as string) !== "start")}
<MediaFrame alt={(imageAlt ? imageAlt : brand)} src={image} ratio="4/3" />
{/if}
</Box>
{/if}
</Container>
</Block>
// Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.
import type { Stat } from "./stats-band.types";
import type { Feature } from "./feature-grid.types";
export type FooterExtras = {
stats: Stat[];
points: Feature[];
contacts: Feature[];
channels: Feature[];
sitemapHref?: string;
ctaHref?: string;
secondaryHref?: string;
};
export type FooterSplitLabels = {
title: string;
text: string;
loopTitle: string;
loopText: string;
joinTitle: string;
joinText: string;
sitemap: string;
points: string;
signup: string;
email: string;
subscribe: string;
note: string;
cta: string;
secondary: string;
};
Point the CLI at this runtime once, then add the item:
npx ui8kit init --yes --framework react --dir src --registry-url https://registry.buildy.tw/react --strict-cdnnpx ui8kit add footer-split// Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.
/**
* A footer with more than links. Axes: layout (stats: the brand with three figures and a sitemap link over the
* link groups as cards; points, links, newsletter, contacts, channels: a split beside a picture with the brand
* and four points, the brand and small link columns, a newsletter card and link columns, the contacts and two
* actions, or the community channels and figures), mediaSide, tone.
*/
import { type ReactNode } from "react";
import { Block, Box, Container, Group, Stack, Text } from "../compose";
import { ActionGroup } from "../components/action-group";
import { FooterBrand } from "../components/footer-brand";
import { FooterChannels } from "../components/footer-channels";
import { FooterContacts } from "../components/footer-contacts";
import { FooterFigures } from "../components/footer-figures";
import { FooterGroupCards } from "../components/footer-group-cards";
import { FooterLinkColumns } from "../components/footer-link-columns";
import { FooterPoints } from "../components/footer-points";
import { FooterSignupCard } from "../components/footer-signup-card";
import { FooterSitemap } from "../components/footer-sitemap";
import { MediaFrame } from "../components/media-frame";
import { cn } from "../utils";
import type { FooterExtras, FooterSplitLabels } from "./footer-split.types";
import type { MegaGroup } from "./mega-menu.types";
import type { Stat } from "./stats-band.types";
import type { Feature } from "./feature-grid.types";
export type FooterSplitProps = {
id?: string;
label: string;
brand: string;
tagline: string;
copyright: string;
groups: MegaGroup[];
extras: FooterExtras;
labels: FooterSplitLabels;
layout?: "stats" | "points" | "links" | "newsletter" | "contacts" | "channels";
mediaSide?: "end" | "start";
tone?: "default" | "muted";
image?: string;
imageAlt?: string;
landmarkLabel?: string;
};
export function FooterSplit({
id = "footer",
label,
brand,
tagline,
copyright,
groups,
extras,
labels,
layout = "stats",
mediaSide = "end",
tone = "default",
image,
imageAlt,
landmarkLabel,
}: FooterSplitProps) {
return (
<Block
tag="footer"
className={cn("border-t border-border", (((tone as string) === "muted") ? "bg-muted" : ""))}
data-layout={layout}
aria-label={landmarkLabel}
data-slot="footer-split"
>
<Container className={cn("mx-auto w-full max-w-6xl px-4", "py-12")} data-slot="container">
{((layout as string) === "stats") ? (
<Stack gap="8" align="stretch">
<Group gap="6" align="start" justify="between" className="flex-wrap">
<Stack gap="6" align="start">
<FooterBrand brand={brand} tagline={tagline} />
<FooterFigures extras={extras} />
</Stack>
<FooterSitemap href={extras.sitemapHref} label={labels.sitemap} />
</Group>
<FooterGroupCards label={label} groups={groups} landmarkLabel={landmarkLabel} />
<Box className="border-t border-border pt-6">
<Text size="sm" className="text-muted-foreground">
{copyright}
</Text>
</Box>
</Stack>
) : (
<Box className="grid grid-cols-1 items-center gap-8 lg:grid-cols-2">
{((mediaSide as string) === "start") ? (
<MediaFrame alt={(imageAlt ? imageAlt : brand)} src={image} ratio="4/3" />
) : null}
<Stack gap="8" align="stretch">
{(((layout as string) === "points") || ((layout as string) === "links")) ? (
<FooterBrand brand={brand} tagline={tagline} />
) : (
<Stack gap="2" align="start">
<Text size="xl" weight="bold">
{(((layout as string) === "newsletter") ? labels.loopTitle : (((layout as string) === "channels") ? labels.joinTitle : labels.title))}
</Text>
<Text size="sm" className="text-muted-foreground">
{(((layout as string) === "newsletter") ? labels.loopText : (((layout as string) === "channels") ? labels.joinText : labels.text))}
</Text>
</Stack>
)}
{((layout as string) === "points") ? (
<FooterPoints extras={extras} title={labels.points} />
) : null}
{((layout as string) === "newsletter") ? (
<FooterSignupCard id={id} labels={labels} />
) : null}
{(((layout as string) === "links") || ((layout as string) === "newsletter")) ? (
<FooterLinkColumns label={label} groups={groups} landmarkLabel={landmarkLabel} />
) : null}
{((layout as string) === "contacts") ? (
<>
<FooterContacts extras={extras} />
<ActionGroup
primary={labels.cta}
primaryHref={extras.ctaHref}
secondary={labels.secondary}
secondaryHref={extras.secondaryHref}
/>
</>
) : null}
{((layout as string) === "channels") ? (
<>
<FooterChannels extras={extras} />
<FooterFigures extras={extras} />
</>
) : null}
<Box className="border-t border-border pt-6">
<Text size="sm" className="text-muted-foreground">
{copyright}
</Text>
</Box>
</Stack>
{((mediaSide as string) !== "start") ? (
<MediaFrame alt={(imageAlt ? imageAlt : brand)} src={image} ratio="4/3" />
) : null}
</Box>
)}
</Container>
</Block>
);
}
// Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.
import type { Stat } from "./stats-band.types";
import type { Feature } from "./feature-grid.types";
export type FooterExtras = {
stats: Stat[];
points: Feature[];
contacts: Feature[];
channels: Feature[];
sitemapHref?: string;
ctaHref?: string;
secondaryHref?: string;
};
export type FooterSplitLabels = {
title: string;
text: string;
loopTitle: string;
loopText: string;
joinTitle: string;
joinText: string;
sitemap: string;
points: string;
signup: string;
email: string;
subscribe: string;
note: string;
cta: string;
secondary: string;
};
Point the CLI at this runtime once, then add the item:
npx ui8kit init --yes --framework vue --dir src --registry-url https://registry.buildy.tw/vue --strict-cdnnpx ui8kit add footer-split// Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.
import type { Stat } from "./stats-band.types";
import type { Feature } from "./feature-grid.types";
export type FooterExtras = {
stats: Stat[];
points: Feature[];
contacts: Feature[];
channels: Feature[];
sitemapHref?: string;
ctaHref?: string;
secondaryHref?: string;
};
export type FooterSplitLabels = {
title: string;
text: string;
loopTitle: string;
loopText: string;
joinTitle: string;
joinText: string;
sitemap: string;
points: string;
signup: string;
email: string;
subscribe: string;
note: string;
cta: string;
secondary: string;
};
<!-- Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT. -->
<!--
A footer with more than links. Axes: layout (stats: the brand with three figures and a sitemap link over the
link groups as cards; points, links, newsletter, contacts, channels: a split beside a picture with the brand
and four points, the brand and small link columns, a newsletter card and link columns, the contacts and two
actions, or the community channels and figures), mediaSide, tone.
-->
<script lang="ts">
import type { FooterExtras, FooterSplitLabels } from "./footer-split.types";
import type { MegaGroup } from "./mega-menu.types";
import type { Stat } from "./stats-band.types";
import type { Feature } from "./feature-grid.types";
export type FooterSplitProps = {
id?: string;
label: string;
brand: string;
tagline: string;
copyright: string;
groups: MegaGroup[];
extras: FooterExtras;
labels: FooterSplitLabels;
layout?: "stats" | "points" | "links" | "newsletter" | "contacts" | "channels";
mediaSide?: "end" | "start";
tone?: "default" | "muted";
image?: string;
imageAlt?: string;
landmarkLabel?: string;
};
</script>
<script setup lang="ts">
import Block from "../compose/Block.vue";
import Box from "../compose/Box.vue";
import Container from "../compose/Container.vue";
import Group from "../compose/Group.vue";
import Stack from "../compose/Stack.vue";
import Text from "../compose/Text.vue";
import ActionGroup from "../components/action-group.vue";
import FooterBrand from "../components/footer-brand.vue";
import FooterChannels from "../components/footer-channels.vue";
import FooterContacts from "../components/footer-contacts.vue";
import FooterFigures from "../components/footer-figures.vue";
import FooterGroupCards from "../components/footer-group-cards.vue";
import FooterLinkColumns from "../components/footer-link-columns.vue";
import FooterPoints from "../components/footer-points.vue";
import FooterSignupCard from "../components/footer-signup-card.vue";
import FooterSitemap from "../components/footer-sitemap.vue";
import MediaFrame from "../components/media-frame.vue";
import { cn } from "../utils";
const {
id = "footer",
label,
brand,
tagline,
copyright,
groups,
extras,
labels,
layout = "stats",
mediaSide = "end",
tone = "default",
image,
imageAlt,
landmarkLabel,
} = defineProps<FooterSplitProps>();
</script>
<template>
<Block
tag="footer"
:class="cn('border-t border-border', (((tone as string) === 'muted') ? 'bg-muted' : ''))"
:data-layout="layout"
:aria-label="landmarkLabel"
data-slot="footer-split"
>
<Container :class="cn('mx-auto w-full max-w-6xl px-4', 'py-12')" data-slot="container">
<Stack v-if="((layout as string) === 'stats')" gap="8" align="stretch">
<Group gap="6" align="start" justify="between" class="flex-wrap">
<Stack gap="6" align="start">
<FooterBrand :brand="brand" :tagline="tagline" />
<FooterFigures :extras="extras" />
</Stack>
<FooterSitemap :href="extras.sitemapHref" :label="labels.sitemap" />
</Group>
<FooterGroupCards :label="label" :groups="groups" :landmarkLabel="landmarkLabel" />
<Box class="border-t border-border pt-6">
<Text size="sm" class="text-muted-foreground">
{{ copyright }}
</Text>
</Box>
</Stack>
<Box v-else class="grid grid-cols-1 items-center gap-8 lg:grid-cols-2">
<MediaFrame
v-if="((mediaSide as string) === 'start')"
:alt="(imageAlt ? imageAlt : brand)"
:src="image"
ratio="4/3"
/>
<Stack gap="8" align="stretch">
<FooterBrand
v-if="(((layout as string) === 'points') || ((layout as string) === 'links'))"
:brand="brand"
:tagline="tagline"
/>
<Stack v-else gap="2" align="start">
<Text size="xl" weight="bold">
{{ (((layout as string) === "newsletter") ? labels.loopTitle : (((layout as string) === "channels") ? labels.joinTitle : labels.title)) }}
</Text>
<Text size="sm" class="text-muted-foreground">
{{ (((layout as string) === "newsletter") ? labels.loopText : (((layout as string) === "channels") ? labels.joinText : labels.text)) }}
</Text>
</Stack>
<FooterPoints v-if="((layout as string) === 'points')" :extras="extras" :title="labels.points" />
<FooterSignupCard v-if="((layout as string) === 'newsletter')" :id="id" :labels="labels" />
<FooterLinkColumns
v-if="(((layout as string) === 'links') || ((layout as string) === 'newsletter'))"
:label="label"
:groups="groups"
:landmarkLabel="landmarkLabel"
/>
<template v-if="((layout as string) === 'contacts')">
<FooterContacts :extras="extras" />
<ActionGroup
:primary="labels.cta"
:primaryHref="extras.ctaHref"
:secondary="labels.secondary"
:secondaryHref="extras.secondaryHref"
/>
</template>
<template v-if="((layout as string) === 'channels')">
<FooterChannels :extras="extras" />
<FooterFigures :extras="extras" />
</template>
<Box class="border-t border-border pt-6">
<Text size="sm" class="text-muted-foreground">
{{ copyright }}
</Text>
</Box>
</Stack>
<MediaFrame
v-if="((mediaSide as string) !== 'start')"
:alt="(imageAlt ? imageAlt : brand)"
:src="image"
ratio="4/3"
/>
</Box>
</Container>
</Block>
</template>
Point the CLI at this runtime once, then add the item:
npx ui8kit init --yes --framework solid --dir src --registry-url https://registry.buildy.tw/solid --strict-cdnnpx ui8kit add footer-split// Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.
/**
* A footer with more than links. Axes: layout (stats: the brand with three figures and a sitemap link over the
* link groups as cards; points, links, newsletter, contacts, channels: a split beside a picture with the brand
* and four points, the brand and small link columns, a newsletter card and link columns, the contacts and two
* actions, or the community channels and figures), mediaSide, tone.
*/
import { type JSX } from "solid-js";
import { Block, Box, Container, Group, Stack, Text } from "../compose";
import { ActionGroup } from "../components/action-group";
import { FooterBrand } from "../components/footer-brand";
import { FooterChannels } from "../components/footer-channels";
import { FooterContacts } from "../components/footer-contacts";
import { FooterFigures } from "../components/footer-figures";
import { FooterGroupCards } from "../components/footer-group-cards";
import { FooterLinkColumns } from "../components/footer-link-columns";
import { FooterPoints } from "../components/footer-points";
import { FooterSignupCard } from "../components/footer-signup-card";
import { FooterSitemap } from "../components/footer-sitemap";
import { MediaFrame } from "../components/media-frame";
import { cn } from "../utils";
import type { FooterExtras, FooterSplitLabels } from "./footer-split.types";
import type { MegaGroup } from "./mega-menu.types";
import type { Stat } from "./stats-band.types";
import type { Feature } from "./feature-grid.types";
export type FooterSplitProps = {
id?: string;
label: string;
brand: string;
tagline: string;
copyright: string;
groups: MegaGroup[];
extras: FooterExtras;
labels: FooterSplitLabels;
layout?: "stats" | "points" | "links" | "newsletter" | "contacts" | "channels";
mediaSide?: "end" | "start";
tone?: "default" | "muted";
image?: string;
imageAlt?: string;
landmarkLabel?: string;
};
export function FooterSplit({
id = "footer",
label,
brand,
tagline,
copyright,
groups,
extras,
labels,
layout = "stats",
mediaSide = "end",
tone = "default",
image,
imageAlt,
landmarkLabel,
}: FooterSplitProps) {
return (
<Block
tag="footer"
class={cn("border-t border-border", (((tone as string) === "muted") ? "bg-muted" : ""))}
data-layout={layout}
aria-label={landmarkLabel}
data-slot="footer-split"
>
<Container class={cn("mx-auto w-full max-w-6xl px-4", "py-12")} data-slot="container">
{((layout as string) === "stats") ? (
<Stack gap="8" align="stretch">
<Group gap="6" align="start" justify="between" class="flex-wrap">
<Stack gap="6" align="start">
<FooterBrand brand={brand} tagline={tagline} />
<FooterFigures extras={extras} />
</Stack>
<FooterSitemap href={extras.sitemapHref} label={labels.sitemap} />
</Group>
<FooterGroupCards label={label} groups={groups} landmarkLabel={landmarkLabel} />
<Box class="border-t border-border pt-6">
<Text size="sm" class="text-muted-foreground">
{copyright}
</Text>
</Box>
</Stack>
) : (
<Box class="grid grid-cols-1 items-center gap-8 lg:grid-cols-2">
{((mediaSide as string) === "start") ? (
<MediaFrame alt={(imageAlt ? imageAlt : brand)} src={image} ratio="4/3" />
) : null}
<Stack gap="8" align="stretch">
{(((layout as string) === "points") || ((layout as string) === "links")) ? (
<FooterBrand brand={brand} tagline={tagline} />
) : (
<Stack gap="2" align="start">
<Text size="xl" weight="bold">
{(((layout as string) === "newsletter") ? labels.loopTitle : (((layout as string) === "channels") ? labels.joinTitle : labels.title))}
</Text>
<Text size="sm" class="text-muted-foreground">
{(((layout as string) === "newsletter") ? labels.loopText : (((layout as string) === "channels") ? labels.joinText : labels.text))}
</Text>
</Stack>
)}
{((layout as string) === "points") ? (
<FooterPoints extras={extras} title={labels.points} />
) : null}
{((layout as string) === "newsletter") ? (
<FooterSignupCard id={id} labels={labels} />
) : null}
{(((layout as string) === "links") || ((layout as string) === "newsletter")) ? (
<FooterLinkColumns label={label} groups={groups} landmarkLabel={landmarkLabel} />
) : null}
{((layout as string) === "contacts") ? (
<>
<FooterContacts extras={extras} />
<ActionGroup
primary={labels.cta}
primaryHref={extras.ctaHref}
secondary={labels.secondary}
secondaryHref={extras.secondaryHref}
/>
</>
) : null}
{((layout as string) === "channels") ? (
<>
<FooterChannels extras={extras} />
<FooterFigures extras={extras} />
</>
) : null}
<Box class="border-t border-border pt-6">
<Text size="sm" class="text-muted-foreground">
{copyright}
</Text>
</Box>
</Stack>
{((mediaSide as string) !== "start") ? (
<MediaFrame alt={(imageAlt ? imageAlt : brand)} src={image} ratio="4/3" />
) : null}
</Box>
)}
</Container>
</Block>
);
}
// Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.
import type { Stat } from "./stats-band.types";
import type { Feature } from "./feature-grid.types";
export type FooterExtras = {
stats: Stat[];
points: Feature[];
contacts: Feature[];
channels: Feature[];
sitemapHref?: string;
ctaHref?: string;
secondaryHref?: string;
};
export type FooterSplitLabels = {
title: string;
text: string;
loopTitle: string;
loopText: string;
joinTitle: string;
joinText: string;
sitemap: string;
points: string;
signup: string;
email: string;
subscribe: string;
note: string;
cta: string;
secondary: string;
};
Point the CLI at this runtime once, then add the item:
npx ui8kit init --yes --framework templ --dir src --registry-url https://registry.buildy.tw/templ --strict-cdnnpx ui8kit add footer-split// Code generated by packages/kit-compose/src/server-organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.
// Source: packages/compose-gen/specs/organisms/footer-split.json
package blocks
import (
"github.com/ui8kit/codegen/generated/templ/ui/box"
"github.com/ui8kit/codegen/generated/templ/compose"
"github.com/ui8kit/codegen/generated/templ/ui/text"
uiutils "github.com/ui8kit/codegen/generated/templ/orgutils"
)
// FooterSplitProps are the props of FooterSplit; the values are the JSON shapes of the TypeScript props.
type FooterSplitProps struct {
Id any `json:"id"`
Label any `json:"label"`
Brand any `json:"brand"`
Tagline any `json:"tagline"`
Copyright any `json:"copyright"`
Groups any `json:"groups"`
Extras any `json:"extras"`
Labels any `json:"labels"`
Layout any `json:"layout"`
MediaSide any `json:"mediaSide"`
Tone any `json:"tone"`
Image any `json:"image"`
ImageAlt any `json:"imageAlt"`
LandmarkLabel any `json:"landmarkLabel"`
}
// A footer with more than links. Axes: layout (stats: the brand with three figures and a sitemap link over the link groups as cards; points, links, newsletter, contacts, channels: a split beside a picture with the brand and four points, the brand and small link columns, a newsletter card and link columns, the contacts and two actions, or the community channels and figures), mediaSide, tone.
templ FooterSplit(p FooterSplitProps) {
{{ vId := uiutils.Def(p.Id, "footer") }}
{{ vLabel := p.Label }}
{{ vBrand := p.Brand }}
{{ vTagline := p.Tagline }}
{{ vCopyright := p.Copyright }}
{{ vGroups := p.Groups }}
{{ vExtras := p.Extras }}
{{ vLabels := p.Labels }}
{{ vLayout := uiutils.Def(p.Layout, "stats") }}
{{ vMediaSide := uiutils.Def(p.MediaSide, "end") }}
{{ vTone := uiutils.Def(p.Tone, "default") }}
{{ vImage := p.Image }}
{{ vImageAlt := p.ImageAlt }}
{{ vLandmarkLabel := p.LandmarkLabel }}
@compose.Block(compose.BlockProps{BoxProps: box.BoxProps{Tag: "footer", Class: uiutils.S(uiutils.Cnv("border-t border-border", uiutils.Cond(uiutils.T(uiutils.Eq(vTone, "muted")), "bg-muted", ""))), Attrs: uiutils.Attrs("data-layout", vLayout, "aria-label", vLandmarkLabel, "data-slot", "footer-split")}}) {
@compose.Container(compose.ContainerProps{BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cnv("mx-auto w-full max-w-6xl px-4", "py-12")), Attrs: uiutils.Attrs("data-slot", "container")}}) {
if uiutils.Eq(vLayout, "stats") {
@compose.Stack(compose.StackProps{Gap: "8", Align: "stretch", BoxProps: box.BoxProps{}}) {
@compose.Group(compose.GroupProps{Gap: "6", Align: "start", Justify: "between", BoxProps: box.BoxProps{Class: "flex-wrap"}}) {
@compose.Stack(compose.StackProps{Gap: "6", Align: "start", BoxProps: box.BoxProps{}}) {
@FooterBrand(FooterBrandProps{Brand: vBrand, Tagline: vTagline})
@FooterFigures(FooterFiguresProps{Extras: vExtras})
}
@FooterSitemap(FooterSitemapProps{Href: uiutils.Get(vExtras, "sitemapHref"), Label: uiutils.Get(vLabels, "sitemap")})
}
@FooterGroupCards(FooterGroupCardsProps{Label: vLabel, Groups: vGroups, LandmarkLabel: vLandmarkLabel})
@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: "border-t border-border pt-6"}}) {
@compose.Text(compose.TextProps{Size: "sm", TextProps: text.TextProps{Class: "text-muted-foreground"}}) {
{ uiutils.Text(vCopyright) }
}
}
}
} else {
@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: "grid grid-cols-1 items-center gap-8 lg:grid-cols-2"}}) {
if uiutils.Eq(vMediaSide, "start") {
@MediaFrame(MediaFrameProps{Alt: uiutils.Cond(uiutils.T(vImageAlt), vImageAlt, vBrand), Src: vImage, Ratio: "4/3"})
}
@compose.Stack(compose.StackProps{Gap: "8", Align: "stretch", BoxProps: box.BoxProps{}}) {
if uiutils.T(uiutils.Or(uiutils.Eq(vLayout, "points"), uiutils.Eq(vLayout, "links"))) {
@FooterBrand(FooterBrandProps{Brand: vBrand, Tagline: vTagline})
} else {
@compose.Stack(compose.StackProps{Gap: "2", Align: "start", BoxProps: box.BoxProps{}}) {
@compose.Text(compose.TextProps{Size: "xl", Weight: "bold", TextProps: text.TextProps{}}) {
{ uiutils.Text(uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, "newsletter")), uiutils.Get(vLabels, "loopTitle"), uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, "channels")), uiutils.Get(vLabels, "joinTitle"), uiutils.Get(vLabels, "title")))) }
}
@compose.Text(compose.TextProps{Size: "sm", TextProps: text.TextProps{Class: "text-muted-foreground"}}) {
{ uiutils.Text(uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, "newsletter")), uiutils.Get(vLabels, "loopText"), uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, "channels")), uiutils.Get(vLabels, "joinText"), uiutils.Get(vLabels, "text")))) }
}
}
}
if uiutils.Eq(vLayout, "points") {
@FooterPoints(FooterPointsProps{Extras: vExtras, Title: uiutils.Get(vLabels, "points")})
}
if uiutils.Eq(vLayout, "newsletter") {
@FooterSignupCard(FooterSignupCardProps{Id: vId, Labels: vLabels})
}
if uiutils.T(uiutils.Or(uiutils.Eq(vLayout, "links"), uiutils.Eq(vLayout, "newsletter"))) {
@FooterLinkColumns(FooterLinkColumnsProps{Label: vLabel, Groups: vGroups, LandmarkLabel: vLandmarkLabel})
}
if uiutils.Eq(vLayout, "contacts") {
@FooterContacts(FooterContactsProps{Extras: vExtras})
@ActionGroup(ActionGroupProps{Primary: uiutils.Get(vLabels, "cta"), PrimaryHref: uiutils.Get(vExtras, "ctaHref"), Secondary: uiutils.Get(vLabels, "secondary"), SecondaryHref: uiutils.Get(vExtras, "secondaryHref")})
}
if uiutils.Eq(vLayout, "channels") {
@FooterChannels(FooterChannelsProps{Extras: vExtras})
@FooterFigures(FooterFiguresProps{Extras: vExtras})
}
@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: "border-t border-border pt-6"}}) {
@compose.Text(compose.TextProps{Size: "sm", TextProps: text.TextProps{Class: "text-muted-foreground"}}) {
{ uiutils.Text(vCopyright) }
}
}
}
if !uiutils.Eq(vMediaSide, "start") {
@MediaFrame(MediaFrameProps{Alt: uiutils.Cond(uiutils.T(vImageAlt), vImageAlt, vBrand), Src: vImage, Ratio: "4/3"})
}
}
}
}
}
}
Point the CLI at this runtime once, then add the item:
npx ui8kit init --yes --framework twig --dir src --registry-url https://registry.buildy.tw/twig --strict-cdnnpx ui8kit add footer-split{#- Code generated by packages/kit-compose/src/server-organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.
Source: packages/compose-gen/specs/organisms/footer-split.json
A footer with more than links. Axes: layout (stats: the brand with three figures and a sitemap link over the link groups as cards; points, links, newsletter, contacts, channels: a split beside a picture with the brand and four points, the brand and small link columns, a newsletter card and link columns, the contacts and two actions, or the community channels and figures), mediaSide, tone.
Props (p): id, label, brand, tagline, copyright, groups, extras, labels, layout, mediaSide, tone, image, imageAlt, landmarkLabel. -#}
{%- set v_id = (p.id ?? 'footer') -%}
{%- 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_extras = (p.extras ?? null) -%}
{%- set v_labels = (p.labels ?? null) -%}
{%- set v_layout = (p.layout ?? 'stats') -%}
{%- set v_mediaSide = (p.mediaSide ?? 'end') -%}
{%- set v_tone = (p.tone ?? 'default') -%}
{%- set v_image = (p.image ?? null) -%}
{%- set v_imageAlt = (p.imageAlt ?? null) -%}
{%- set v_landmarkLabel = (p.landmarkLabel ?? null) -%}
{%- set c_14 -%}
{%- set c_13 -%}
{%- if og_t(og_eq(v_layout, 'stats')) %}
{%- set c_5 -%}
{%- set c_2 -%}
{%- set c_1 -%}
{{ include('blocks/footer-brand.html.twig', {'p': {'brand': v_brand, 'tagline': v_tagline}}, with_context = false) }}
{{ include('blocks/footer-figures.html.twig', {'p': {'extras': v_extras}}, with_context = false) }}
{%- endset -%}
{{ include('compose/Stack.html.twig', {'gap': '6', 'align': 'start', 'children': c_1}, with_context = false) }}
{{ include('blocks/footer-sitemap.html.twig', {'p': {'href': og_get(v_extras, ['sitemapHref']), 'label': og_get(v_labels, ['sitemap'])}}, with_context = false) }}
{%- endset -%}
{{ include('compose/Group.html.twig', {'gap': '6', 'align': 'start', 'justify': 'between', 'class': 'flex-wrap', 'children': c_2}, with_context = false) }}
{{ include('blocks/footer-group-cards.html.twig', {'p': {'label': v_label, 'groups': v_groups, 'landmarkLabel': v_landmarkLabel}}, with_context = false) }}
{%- set c_4 -%}
{%- set c_3 -%}
{{ og_text(v_copyright) }}
{%- endset -%}
{{ include('compose/Text.html.twig', {'size': 'sm', 'class': 'text-muted-foreground', 'children': c_3}, with_context = false) }}
{%- endset -%}
{{ include('compose/Box.html.twig', {'class': 'border-t border-border pt-6', 'children': c_4}, with_context = false) }}
{%- endset -%}
{{ include('compose/Stack.html.twig', {'gap': '8', 'align': 'stretch', 'children': c_5}, with_context = false) }}
{%- else %}
{%- set c_12 -%}
{%- if og_t(og_eq(v_mediaSide, 'start')) %}
{{ include('blocks/media-frame.html.twig', {'p': {'alt': (og_t(v_imageAlt) ? v_imageAlt : v_brand), 'src': v_image, 'ratio': '4/3'}}, with_context = false) }}
{%- endif %}
{%- set c_11 -%}
{%- if og_t(og_or([og_eq(v_layout, 'points'), og_eq(v_layout, 'links')])) %}
{{ include('blocks/footer-brand.html.twig', {'p': {'brand': v_brand, 'tagline': v_tagline}}, with_context = false) }}
{%- else %}
{%- set c_8 -%}
{%- set c_6 -%}
{{ og_text((og_t(og_eq(v_layout, 'newsletter')) ? og_get(v_labels, ['loopTitle']) : (og_t(og_eq(v_layout, 'channels')) ? og_get(v_labels, ['joinTitle']) : og_get(v_labels, ['title'])))) }}
{%- endset -%}
{{ include('compose/Text.html.twig', {'size': 'xl', 'weight': 'bold', 'children': c_6}, with_context = false) }}
{%- set c_7 -%}
{{ og_text((og_t(og_eq(v_layout, 'newsletter')) ? og_get(v_labels, ['loopText']) : (og_t(og_eq(v_layout, 'channels')) ? og_get(v_labels, ['joinText']) : og_get(v_labels, ['text'])))) }}
{%- endset -%}
{{ include('compose/Text.html.twig', {'size': 'sm', 'class': 'text-muted-foreground', 'children': c_7}, with_context = false) }}
{%- endset -%}
{{ include('compose/Stack.html.twig', {'gap': '2', 'align': 'start', 'children': c_8}, with_context = false) }}
{%- endif %}
{%- if og_t(og_eq(v_layout, 'points')) %}
{{ include('blocks/footer-points.html.twig', {'p': {'extras': v_extras, 'title': og_get(v_labels, ['points'])}}, with_context = false) }}
{%- endif %}
{%- if og_t(og_eq(v_layout, 'newsletter')) %}
{{ include('blocks/footer-signup-card.html.twig', {'p': {'id': v_id, 'labels': v_labels}}, with_context = false) }}
{%- endif %}
{%- if og_t(og_or([og_eq(v_layout, 'links'), og_eq(v_layout, 'newsletter')])) %}
{{ include('blocks/footer-link-columns.html.twig', {'p': {'label': v_label, 'groups': v_groups, 'landmarkLabel': v_landmarkLabel}}, with_context = false) }}
{%- endif %}
{%- if og_t(og_eq(v_layout, 'contacts')) %}
{{ include('blocks/footer-contacts.html.twig', {'p': {'extras': v_extras}}, with_context = false) }}
{{ include('blocks/action-group.html.twig', {'p': {'primary': og_get(v_labels, ['cta']), 'primaryHref': og_get(v_extras, ['ctaHref']), 'secondary': og_get(v_labels, ['secondary']), 'secondaryHref': og_get(v_extras, ['secondaryHref'])}}, with_context = false) }}
{%- endif %}
{%- if og_t(og_eq(v_layout, 'channels')) %}
{{ include('blocks/footer-channels.html.twig', {'p': {'extras': v_extras}}, with_context = false) }}
{{ include('blocks/footer-figures.html.twig', {'p': {'extras': v_extras}}, with_context = false) }}
{%- endif %}
{%- set c_10 -%}
{%- set c_9 -%}
{{ og_text(v_copyright) }}
{%- endset -%}
{{ include('compose/Text.html.twig', {'size': 'sm', 'class': 'text-muted-foreground', 'children': c_9}, with_context = false) }}
{%- endset -%}
{{ include('compose/Box.html.twig', {'class': 'border-t border-border pt-6', 'children': c_10}, with_context = false) }}
{%- endset -%}
{{ include('compose/Stack.html.twig', {'gap': '8', 'align': 'stretch', 'children': c_11}, with_context = false) }}
{%- if og_t(not (og_eq(v_mediaSide, 'start'))) %}
{{ include('blocks/media-frame.html.twig', {'p': {'alt': (og_t(v_imageAlt) ? v_imageAlt : v_brand), 'src': v_image, 'ratio': '4/3'}}, with_context = false) }}
{%- endif %}
{%- endset -%}
{{ include('compose/Box.html.twig', {'class': 'grid grid-cols-1 items-center gap-8 lg:grid-cols-2', 'children': c_12}, with_context = false) }}
{%- endif %}
{%- endset -%}
{{ include('compose/Container.html.twig', {'class': og_s(og_cnv(['mx-auto w-full max-w-6xl px-4', 'py-12'])), 'attrs': og_attrs(['data-slot', 'container']), 'children': c_13}, with_context = false) }}
{%- endset -%}
{{ include('compose/Block.html.twig', {'tag': 'footer', 'class': og_s(og_cnv(['border-t border-border', (og_t(og_eq(v_tone, 'muted')) ? 'bg-muted' : '')])), 'attrs': og_attrs(['data-layout', v_layout, 'aria-label', v_landmarkLabel, 'data-slot', 'footer-split']), 'children': c_14}, with_context = false) }}
Point the CLI at this runtime once, then add the item:
npx ui8kit init --yes --framework latte --dir src --registry-url https://registry.buildy.tw/latte --strict-cdnnpx ui8kit add footer-split{* Code generated by packages/kit-compose/src/server-organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.
Source: packages/compose-gen/specs/organisms/footer-split.json
A footer with more than links. Axes: layout (stats: the brand with three figures and a sitemap link over the link groups as cards; points, links, newsletter, contacts, channels: a split beside a picture with the brand and four points, the brand and small link columns, a newsletter card and link columns, the contacts and two actions, or the community channels and figures), mediaSide, tone.
Props (p): id, label, brand, tagline, copyright, groups, extras, labels, layout, mediaSide, tone, image, imageAlt, landmarkLabel. *}
{var $v_id = ($p['id'] ?? 'footer')}
{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_extras = ($p['extras'] ?? null)}
{var $v_labels = ($p['labels'] ?? null)}
{var $v_layout = ($p['layout'] ?? 'stats')}
{var $v_mediaSide = ($p['mediaSide'] ?? 'end')}
{var $v_tone = ($p['tone'] ?? 'default')}
{var $v_image = ($p['image'] ?? null)}
{var $v_imageAlt = ($p['imageAlt'] ?? null)}
{var $v_landmarkLabel = ($p['landmarkLabel'] ?? null)}
{capture $c_14}
{capture $c_13}
{if og_t(og_eq($v_layout, 'stats'))}
{capture $c_5}
{capture $c_2}
{capture $c_1}
{=og_include('blocks/footer-brand.latte', ['p' => ['brand' => $v_brand, 'tagline' => $v_tagline]])|noescape}
{=og_include('blocks/footer-figures.latte', ['p' => ['extras' => $v_extras]])|noescape}
{/capture}
{=og_include('compose/Stack.latte', ['gap' => '6', 'align' => 'start', 'children' => (string) $c_1])|noescape}
{=og_include('blocks/footer-sitemap.latte', ['p' => ['href' => og_get($v_extras, ['sitemapHref']), 'label' => og_get($v_labels, ['sitemap'])]])|noescape}
{/capture}
{=og_include('compose/Group.latte', ['gap' => '6', 'align' => 'start', 'justify' => 'between', 'class' => 'flex-wrap', 'children' => (string) $c_2])|noescape}
{=og_include('blocks/footer-group-cards.latte', ['p' => ['label' => $v_label, 'groups' => $v_groups, 'landmarkLabel' => $v_landmarkLabel]])|noescape}
{capture $c_4}
{capture $c_3}
{=og_text($v_copyright)}
{/capture}
{=og_include('compose/Text.latte', ['size' => 'sm', 'class' => 'text-muted-foreground', 'children' => (string) $c_3])|noescape}
{/capture}
{=og_include('compose/Box.latte', ['class' => 'border-t border-border pt-6', 'children' => (string) $c_4])|noescape}
{/capture}
{=og_include('compose/Stack.latte', ['gap' => '8', 'align' => 'stretch', 'children' => (string) $c_5])|noescape}
{else}
{capture $c_12}
{if og_t(og_eq($v_mediaSide, 'start'))}
{=og_include('blocks/media-frame.latte', ['p' => ['alt' => (og_t($v_imageAlt) ? $v_imageAlt : $v_brand), 'src' => $v_image, 'ratio' => '4/3']])|noescape}
{/if}
{capture $c_11}
{if og_t(og_or([og_eq($v_layout, 'points'), og_eq($v_layout, 'links')]))}
{=og_include('blocks/footer-brand.latte', ['p' => ['brand' => $v_brand, 'tagline' => $v_tagline]])|noescape}
{else}
{capture $c_8}
{capture $c_6}
{=og_text((og_t(og_eq($v_layout, 'newsletter')) ? og_get($v_labels, ['loopTitle']) : (og_t(og_eq($v_layout, 'channels')) ? og_get($v_labels, ['joinTitle']) : og_get($v_labels, ['title']))))}
{/capture}
{=og_include('compose/Text.latte', ['size' => 'xl', 'weight' => 'bold', 'children' => (string) $c_6])|noescape}
{capture $c_7}
{=og_text((og_t(og_eq($v_layout, 'newsletter')) ? og_get($v_labels, ['loopText']) : (og_t(og_eq($v_layout, 'channels')) ? og_get($v_labels, ['joinText']) : og_get($v_labels, ['text']))))}
{/capture}
{=og_include('compose/Text.latte', ['size' => 'sm', 'class' => 'text-muted-foreground', 'children' => (string) $c_7])|noescape}
{/capture}
{=og_include('compose/Stack.latte', ['gap' => '2', 'align' => 'start', 'children' => (string) $c_8])|noescape}
{/if}
{if og_t(og_eq($v_layout, 'points'))}
{=og_include('blocks/footer-points.latte', ['p' => ['extras' => $v_extras, 'title' => og_get($v_labels, ['points'])]])|noescape}
{/if}
{if og_t(og_eq($v_layout, 'newsletter'))}
{=og_include('blocks/footer-signup-card.latte', ['p' => ['id' => $v_id, 'labels' => $v_labels]])|noescape}
{/if}
{if og_t(og_or([og_eq($v_layout, 'links'), og_eq($v_layout, 'newsletter')]))}
{=og_include('blocks/footer-link-columns.latte', ['p' => ['label' => $v_label, 'groups' => $v_groups, 'landmarkLabel' => $v_landmarkLabel]])|noescape}
{/if}
{if og_t(og_eq($v_layout, 'contacts'))}
{=og_include('blocks/footer-contacts.latte', ['p' => ['extras' => $v_extras]])|noescape}
{=og_include('blocks/action-group.latte', ['p' => ['primary' => og_get($v_labels, ['cta']), 'primaryHref' => og_get($v_extras, ['ctaHref']), 'secondary' => og_get($v_labels, ['secondary']), 'secondaryHref' => og_get($v_extras, ['secondaryHref'])]])|noescape}
{/if}
{if og_t(og_eq($v_layout, 'channels'))}
{=og_include('blocks/footer-channels.latte', ['p' => ['extras' => $v_extras]])|noescape}
{=og_include('blocks/footer-figures.latte', ['p' => ['extras' => $v_extras]])|noescape}
{/if}
{capture $c_10}
{capture $c_9}
{=og_text($v_copyright)}
{/capture}
{=og_include('compose/Text.latte', ['size' => 'sm', 'class' => 'text-muted-foreground', 'children' => (string) $c_9])|noescape}
{/capture}
{=og_include('compose/Box.latte', ['class' => 'border-t border-border pt-6', 'children' => (string) $c_10])|noescape}
{/capture}
{=og_include('compose/Stack.latte', ['gap' => '8', 'align' => 'stretch', 'children' => (string) $c_11])|noescape}
{if og_t(!(og_eq($v_mediaSide, 'start')))}
{=og_include('blocks/media-frame.latte', ['p' => ['alt' => (og_t($v_imageAlt) ? $v_imageAlt : $v_brand), 'src' => $v_image, 'ratio' => '4/3']])|noescape}
{/if}
{/capture}
{=og_include('compose/Box.latte', ['class' => 'grid grid-cols-1 items-center gap-8 lg:grid-cols-2', 'children' => (string) $c_12])|noescape}
{/if}
{/capture}
{=og_include('compose/Container.latte', ['class' => og_s(og_cnv(['mx-auto w-full max-w-6xl px-4', 'py-12'])), 'attrs' => og_attrs(['data-slot', 'container']), 'children' => (string) $c_13])|noescape}
{/capture}
{=og_include('compose/Block.latte', ['tag' => 'footer', 'class' => og_s(og_cnv(['border-t border-border', (og_t(og_eq($v_tone, 'muted')) ? 'bg-muted' : '')])), 'attrs' => og_attrs(['data-layout', $v_layout, 'aria-label', $v_landmarkLabel, 'data-slot', 'footer-split']), 'children' => (string) $c_14])|noescape}
Point the CLI at this runtime once, then add the item:
npx ui8kit init --yes --framework jinja2 --dir src --registry-url https://registry.buildy.tw/jinja2 --strict-cdnnpx ui8kit add footer-split{#- Code generated by packages/kit-compose/src/server-organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.
Source: packages/compose-gen/specs/organisms/footer-split.json
A footer with more than links. Axes: layout (stats: the brand with three figures and a sitemap link over the link groups as cards; points, links, newsletter, contacts, channels: a split beside a picture with the brand and four points, the brand and small link columns, a newsletter card and link columns, the contacts and two actions, or the community channels and figures), mediaSide, tone.
Props (p): id, label, brand, tagline, copyright, groups, extras, labels, layout, mediaSide, tone, image, imageAlt, landmarkLabel. -#}
{%- set v_id = og_def(p['id'], 'footer') -%}
{%- set v_label = og_def(p['label'], none) -%}
{%- set v_brand = og_def(p['brand'], none) -%}
{%- set v_tagline = og_def(p['tagline'], none) -%}
{%- set v_copyright = og_def(p['copyright'], none) -%}
{%- set v_groups = og_def(p['groups'], none) -%}
{%- set v_extras = og_def(p['extras'], none) -%}
{%- set v_labels = og_def(p['labels'], none) -%}
{%- set v_layout = og_def(p['layout'], 'stats') -%}
{%- set v_mediaSide = og_def(p['mediaSide'], 'end') -%}
{%- set v_tone = og_def(p['tone'], 'default') -%}
{%- set v_image = og_def(p['image'], none) -%}
{%- set v_imageAlt = og_def(p['imageAlt'], none) -%}
{%- set v_landmarkLabel = og_def(p['landmarkLabel'], none) -%}
{%- set c_14 -%}
{%- set c_13 -%}
{%- if og_t(og_eq(v_layout, 'stats')) %}
{%- set c_5 -%}
{%- set c_2 -%}
{%- set c_1 -%}
{{ og_include('blocks/footer-brand.html.j2', {'p': {'brand': v_brand, 'tagline': v_tagline}}) }}
{{ og_include('blocks/footer-figures.html.j2', {'p': {'extras': v_extras}}) }}
{%- endset -%}
{{ og_include('compose/stack.html.j2', {'p': {'Gap': '6', 'Align': 'start'}, 'children': c_1}) }}
{{ og_include('blocks/footer-sitemap.html.j2', {'p': {'href': og_get(v_extras, ['sitemapHref']), 'label': og_get(v_labels, ['sitemap'])}}) }}
{%- endset -%}
{{ og_include('compose/group.html.j2', {'p': {'Gap': '6', 'Align': 'start', 'Justify': 'between', 'Class': 'flex-wrap'}, 'children': c_2}) }}
{{ og_include('blocks/footer-group-cards.html.j2', {'p': {'label': v_label, 'groups': v_groups, 'landmarkLabel': v_landmarkLabel}}) }}
{%- set c_4 -%}
{%- set c_3 -%}
{{ og_text(v_copyright) }}
{%- endset -%}
{{ og_include('compose/text.html.j2', {'p': {'Size': 'sm', 'Class': 'text-muted-foreground'}, 'children': c_3}) }}
{%- endset -%}
{{ og_include('compose/box.html.j2', {'p': {'Class': 'border-t border-border pt-6'}, 'children': c_4}) }}
{%- endset -%}
{{ og_include('compose/stack.html.j2', {'p': {'Gap': '8', 'Align': 'stretch'}, 'children': c_5}) }}
{%- else %}
{%- set c_12 -%}
{%- if og_t(og_eq(v_mediaSide, 'start')) %}
{{ og_include('blocks/media-frame.html.j2', {'p': {'alt': (v_imageAlt if og_t(v_imageAlt) else v_brand), 'src': v_image, 'ratio': '4/3'}}) }}
{%- endif %}
{%- set c_11 -%}
{%- if og_t(og_or([og_eq(v_layout, 'points'), og_eq(v_layout, 'links')])) %}
{{ og_include('blocks/footer-brand.html.j2', {'p': {'brand': v_brand, 'tagline': v_tagline}}) }}
{%- else %}
{%- set c_8 -%}
{%- set c_6 -%}
{{ og_text((og_get(v_labels, ['loopTitle']) if og_t(og_eq(v_layout, 'newsletter')) else (og_get(v_labels, ['joinTitle']) if og_t(og_eq(v_layout, 'channels')) else og_get(v_labels, ['title'])))) }}
{%- endset -%}
{{ og_include('compose/text.html.j2', {'p': {'Size': 'xl', 'Weight': 'bold'}, 'children': c_6}) }}
{%- set c_7 -%}
{{ og_text((og_get(v_labels, ['loopText']) if og_t(og_eq(v_layout, 'newsletter')) else (og_get(v_labels, ['joinText']) if og_t(og_eq(v_layout, 'channels')) else og_get(v_labels, ['text'])))) }}
{%- endset -%}
{{ og_include('compose/text.html.j2', {'p': {'Size': 'sm', 'Class': 'text-muted-foreground'}, 'children': c_7}) }}
{%- endset -%}
{{ og_include('compose/stack.html.j2', {'p': {'Gap': '2', 'Align': 'start'}, 'children': c_8}) }}
{%- endif %}
{%- if og_t(og_eq(v_layout, 'points')) %}
{{ og_include('blocks/footer-points.html.j2', {'p': {'extras': v_extras, 'title': og_get(v_labels, ['points'])}}) }}
{%- endif %}
{%- if og_t(og_eq(v_layout, 'newsletter')) %}
{{ og_include('blocks/footer-signup-card.html.j2', {'p': {'id': v_id, 'labels': v_labels}}) }}
{%- endif %}
{%- if og_t(og_or([og_eq(v_layout, 'links'), og_eq(v_layout, 'newsletter')])) %}
{{ og_include('blocks/footer-link-columns.html.j2', {'p': {'label': v_label, 'groups': v_groups, 'landmarkLabel': v_landmarkLabel}}) }}
{%- endif %}
{%- if og_t(og_eq(v_layout, 'contacts')) %}
{{ og_include('blocks/footer-contacts.html.j2', {'p': {'extras': v_extras}}) }}
{{ og_include('blocks/action-group.html.j2', {'p': {'primary': og_get(v_labels, ['cta']), 'primaryHref': og_get(v_extras, ['ctaHref']), 'secondary': og_get(v_labels, ['secondary']), 'secondaryHref': og_get(v_extras, ['secondaryHref'])}}) }}
{%- endif %}
{%- if og_t(og_eq(v_layout, 'channels')) %}
{{ og_include('blocks/footer-channels.html.j2', {'p': {'extras': v_extras}}) }}
{{ og_include('blocks/footer-figures.html.j2', {'p': {'extras': v_extras}}) }}
{%- endif %}
{%- set c_10 -%}
{%- set c_9 -%}
{{ og_text(v_copyright) }}
{%- endset -%}
{{ og_include('compose/text.html.j2', {'p': {'Size': 'sm', 'Class': 'text-muted-foreground'}, 'children': c_9}) }}
{%- endset -%}
{{ og_include('compose/box.html.j2', {'p': {'Class': 'border-t border-border pt-6'}, 'children': c_10}) }}
{%- endset -%}
{{ og_include('compose/stack.html.j2', {'p': {'Gap': '8', 'Align': 'stretch'}, 'children': c_11}) }}
{%- if og_t(not (og_eq(v_mediaSide, 'start'))) %}
{{ og_include('blocks/media-frame.html.j2', {'p': {'alt': (v_imageAlt if og_t(v_imageAlt) else v_brand), 'src': v_image, 'ratio': '4/3'}}) }}
{%- endif %}
{%- endset -%}
{{ og_include('compose/box.html.j2', {'p': {'Class': 'grid grid-cols-1 items-center gap-8 lg:grid-cols-2'}, 'children': c_12}) }}
{%- endif %}
{%- endset -%}
{{ og_include('compose/container.html.j2', {'p': {'Class': og_s(og_cnv(['mx-auto w-full max-w-6xl px-4', 'py-12'])), 'Attrs': og_attrs(['data-slot', 'container'])}, 'children': c_13}) }}
{%- endset -%}
{{ og_include('compose/block.html.j2', {'p': {'Tag': 'footer', 'Class': og_s(og_cnv(['border-t border-border', ('bg-muted' if og_t(og_eq(v_tone, 'muted')) else '')])), 'Attrs': og_attrs(['data-layout', v_layout, 'aria-label', v_landmarkLabel, 'data-slot', 'footer-split'])}, 'children': c_14}) }}
Props
Names and types come from the xgen specs of the source. Standard HTML attributes (id, role, tabIndex, aria-*) pass through to the root element; the class prop is className in React.
A footer with more than links. Axes: layout (stats: the brand with three figures and a sitemap link over the link groups as cards; points, links, newsletter, contacts, channels: a split beside a picture with the brand and four points, the brand and small link columns, a newsletter card and link columns, the contacts and two actions, or the community channels and figures), mediaSide, tone.
| Prop | Type | Default | Description |
|---|---|---|---|
| id | string | "footer" | |
| label (required) | string | - | accessible name of the link groups |
| brand (required) | string | - | |
| tagline (required) | string | - | |
| copyright (required) | string | - | |
| groups (required) | MegaGroup[] | - | |
| extras (required) | FooterExtras | - | |
| labels (required) | FooterSplitLabels | - | the heading and text of the contacts, newsletter (loop) and channels (join) layouts, the sitemap link, the points title, the sign-up words and the two actions |
| layout | "stats" | "points" | "links" | "newsletter" | "contacts" | "channels" | "stats" | |
| mediaSide | "end" | "start" | "end" | |
| tone | "default" | "muted" | "default" | |
| image | string | - | address of the picture (an https URL or a path); none: the placeholder |
| imageAlt | string | - | alt text of the picture; none: the title |
| landmarkLabel | string | - | accessible name of the landmark of this component when the page shows it more than once (a variant); replaces the heading name of the root landmark, follows the name of a nested one |