Page Footer 4
Local shop-front footer: the owner's one big line, then a bento that shows the reader they are covered and
Use it in a prompt
Use content/page-footer-4 from the FunnelDNA library. Follow the skill and theme contract. Ask me for the copy, images, and brand details you need; do not invent proof.
Paste into Claude or ChatGPT with FunnelDNA connected (MCP setup), or alongside the skill.
Use it in code
- Save
component.tsx(Code tab) ascomponents/funneldna/content/page-footer-4.tsx. - Import it and pass your copy and images (Props tab):
import { PageFooter4 } from "@/components/funneldna/content/page-footer-4"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/content/page-footer-4/component.tsx 720 lines
// layout: quote-led
// Local shop-front footer: the owner's one big line, then a bento that shows the reader they are covered and
// can call right now. It holds the service-area map with area chips, a tap-to-call business card, today's hours
// with a live Open now / Closing soon / Closed status (with the next opening time) and the free-quote action.
// Theme notes: every colour reads the theme tokens; hex appears only as the last fallback inside var().
// The white tick glyph inside the solid success badge is the contract's documented white, written only as the
// last fallback of the scoped `--cf-pf4-badge-ink` variable so a theme can override it.
// Images arrive as props: the area map (slot 'scene') and the owner cut-out (slot 'presenter-cutout').
import * as React from 'react';
import { Check, MapPin, Phone, ShieldCheck } from 'lucide-react';
export type PageFooter4Hours = {
/** Day of the week: 0 = Sunday … 6 = Saturday. */
day: number;
/** Opening time, 24-hour 'HH:MM'. Leave empty for a closed day. */
open?: string;
/** Closing time, 24-hour 'HH:MM'; '24:00' is midnight, a time before `open` runs past midnight. */
close?: string;
};
export type PageFooter4Link = { label: string; href: string };
/** 'auto' reads the clock; the others force a status for previews. */
export type PageFooter4Status = 'auto' | 'open' | 'closing' | 'closed';
export type PageFooter4State = 'default' | 'hover' | 'active' | 'disabled';
/** Every generated word. Placeholders: {time}, {minutes}, {when}, {hours}, {open}, {close}. */
export type PageFooter4Copy = {
open: string;
closing: string;
closed: string;
openDetail: string;
closingDetail: string;
closedDetail: string;
noHours: string;
callOpen: string;
callClosing: string;
callClosed: string;
todayHeading: string;
todayClosed: string;
hoursRange: string;
closedDay: string;
today: string;
tomorrow: string;
weekLabel: string;
am: string;
pm: string;
/** Seven day names, Sunday first. */
dayNames: string[];
};
export type PageFooter4Props = {
/** The owner's one big line, in their own words. */
headline?: React.ReactNode;
/** Italic aside in the owner's voice under the line. Hidden when empty. */
aside?: string;
/** Who said it, e.g. 'Marco Reyes, owner'. Hidden when empty. */
attribution?: string;
/** Owner or presenter on a transparent background (slot 'presenter-cutout'). */
presenterImage?: string;
presenterImageAlt?: string;
businessName?: string;
/** Logo image (slot 'logo'), shown above the business name. */
logoImage?: string;
addressLines?: string[];
/** Licence or insurance line, exactly as supplied. Hidden when empty. */
licence?: string;
/** Display phone number; the call buttons hide without it. */
phone?: string;
/** Dial link; defaults to tel: plus the digits of `phone`. */
phoneHref?: string;
/** Call button label; {phone} is replaced by the number. */
callLabel?: string;
/** Weekly opening hours; days left out are closed. */
hours?: PageFooter4Hours[];
/** IANA time zone of the business, e.g. 'America/Los_Angeles'; defaults to the visitor's clock. */
timeZone?: string;
/** Minutes before closing that switch the status to 'Closing soon'. */
closingSoonMinutes?: number;
timeFormat?: '12h' | '24h';
/** First day in the weekly list: 0 = Sunday, 1 = Monday. */
weekStartsOn?: number;
/** Illustrated map of the service area, no pins (slot 'scene'). */
mapImage?: string;
mapImageAlt?: string;
/** Area names shown as chips beside the map. */
areas?: string[];
/** Heading over the chips; {count} is the number of areas. */
areaHeading?: string;
/** Line under the chips before one is picked. */
areaPrompt?: string;
/** Line after a chip is picked; {area} is the area name. */
areaConfirm?: string;
onAreaSelect?: (area: string) => void;
/** Risk-first line that leads the quote action. */
quoteHeading?: string;
quoteText?: string;
quoteLabel?: string;
/** One short line under the quote button. */
quoteNote?: string;
/** Quote destination; without it the quote action is a <button>. */
href?: string;
/** Called when the quote button is clicked. */
onAction?: () => void;
links?: PageFooter4Link[];
/** Accessible name of the legal links. */
legalLabel?: string;
/** Named placeholders: {year} and {brand}. */
copyrightTemplate?: string;
/** Year in the copyright; defaults to the current year. */
year?: number | string;
copy?: Partial<PageFooter4Copy>;
status?: PageFooter4Status;
/** Forced button state for previews. */
state?: PageFooter4State;
className?: string;
};
export function PageFooter4(props: PageFooter4Props) {
const {
headline = 'Local people. A short drive from your door.',
aside,
attribution,
presenterImage,
presenterImageAlt = '',
businessName = 'Brightwater Plumbing & Drain',
logoImage,
addressLines = [],
licence,
phone,
phoneHref,
callLabel = 'Call {phone}',
hours = DEFAULT_HOURS,
timeZone,
closingSoonMinutes = 60,
timeFormat = '12h',
weekStartsOn = 1,
mapImage,
mapImageAlt = 'Illustrated map of the service area',
areas = [],
areaHeading = 'We cover these {count} areas',
areaPrompt = 'Tap your area to check.',
areaConfirm = 'Yes, {area} is on our route.',
onAreaSelect,
quoteHeading = 'Free quote. No obligation.',
quoteText,
quoteLabel = 'Get My Free Quote',
quoteNote = 'Takes 30 seconds',
href,
onAction,
links = DEFAULT_LINKS,
legalLabel = 'Legal',
copyrightTemplate = '© {year} {brand}. All rights reserved.',
year,
copy,
status = 'auto',
state = 'default',
className,
} = props;
const t: PageFooter4Copy = { ...DEFAULT_COPY, ...copy };
const uid = React.useId();
const slots = React.useMemo(() => buildSlots(hours), [hours]);
const read = React.useCallback((): Live => {
const now = readNow(timeZone);
const at = status === 'auto' ? now : simulate(slots, now.day, status, closingSoonMinutes);
return evaluate(slots, at.day, at.minutes, closingSoonMinutes);
}, [slots, timeZone, status, closingSoonMinutes]);
const [live, setLive] = React.useState<Live>(read);
React.useEffect(() => {
const sync = () => {
const next = read();
setLive((prev) => (sameLive(prev, next) ? prev : next));
};
sync();
if (status !== 'auto') return undefined;
const id = window.setInterval(sync, 30000);
return () => window.clearInterval(id);
}, [read, status]);
const [area, setArea] = React.useState<string | null>(null);
const fmt = (minutes: number) => formatTime(minutes, timeFormat, t.am, t.pm);
const todaySlot = slots[live.day];
const todayHeading = todaySlot
? fill(t.todayHeading, { hours: fill(t.hoursRange, { open: fmt(todaySlot.open), close: fmt(todaySlot.close) }) })
: t.todayClosed;
const when =
live.nextOffset === 0 ? t.today : live.nextOffset === 1 ? t.tomorrow : t.dayNames[live.nextDay ?? 0] ?? '';
const hasNext = live.kind !== 'closed' || live.nextOpen !== undefined;
const vars = {
time: live.kind === 'closed' ? fmt(live.nextOpen ?? 0) : fmt(live.closeAt ?? 0),
minutes: String(live.minutesLeft ?? 0),
when,
};
const pillLabel = live.kind === 'open' ? t.open : live.kind === 'closing' ? t.closing : t.closed;
const detail = hasNext
? fill(live.kind === 'open' ? t.openDetail : live.kind === 'closing' ? t.closingDetail : t.closedDetail, vars)
: t.noHours;
const callNote = hasNext
? fill(live.kind === 'open' ? t.callOpen : live.kind === 'closing' ? t.callClosing : t.callClosed, vars)
: t.noHours;
const disabled = state === 'disabled';
const tel = phoneHref || (phone ? `tel:${phone.replace(/[^\d+]/g, '')}` : undefined);
const handleAction = onAction ? () => onAction() : undefined;
const callButton = phone ? (
<a
className='cf-pf4__btn cf-pf4__btn--call'
href={disabled ? undefined : tel}
aria-disabled={disabled || undefined}
>
<Phone aria-hidden='true' size={20} strokeWidth={2.5} />
<span>{fill(callLabel, { phone })}</span>
</a>
) : null;
const callNoteEl = (
<p className='cf-pf4__note'>
<span className='cf-pf4__dot' data-kind={live.kind} aria-hidden='true' />
{callNote}
</p>
);
const quoteButton =
href && !disabled ? (
<a className='cf-pf4__btn cf-pf4__btn--primary' href={href} onClick={handleAction}>
{quoteLabel}
</a>
) : (
<button type='button' className='cf-pf4__btn cf-pf4__btn--primary' disabled={disabled} onClick={handleAction}>
{quoteLabel}
</button>
);
const areaList = areas.filter(Boolean);
const showMap = Boolean(mapImage) || areaList.length > 0;
const week = Array.from({ length: 7 }, (_, i) => (((weekStartsOn + i) % 7) + 7) % 7);
const copyright = fill(copyrightTemplate, {
year: String(year ?? new Date().getFullYear()),
brand: businessName,
});
return (
<footer className={className ? `cf-pf4 ${className}` : 'cf-pf4'} data-state={state}>
<style>{CSS}</style>
<div className='cf-pf4__wrap'>
<div className={presenterImage ? 'cf-pf4__head' : 'cf-pf4__head cf-pf4__head--solo'}>
<div className='cf-pf4__say'>
<h2 className='cf-pf4__headline'>{headline}</h2>
{aside ? <p className='cf-pf4__aside'>{aside}</p> : null}
{attribution ? <p className='cf-pf4__by'>{attribution}</p> : null}
</div>
{presenterImage ? (
<img
className='cf-pf4__cutout'
src={presenterImage}
alt={presenterImageAlt}
width={480}
height={480}
loading='lazy'
decoding='async'
/>
) : null}
</div>
<div className='cf-pf4__bento' data-map={showMap ? 'yes' : 'none'}>
<div className='cf-pf4__quick'>
{phone ? (
<div className='cf-pf4__act'>
{callButton}
{callNoteEl}
</div>
) : null}
<div className='cf-pf4__act'>
{quoteHeading ? <p className='cf-pf4__risk'>{quoteHeading}</p> : null}
{quoteButton}
{quoteNote ? <p className='cf-pf4__note'>{quoteNote}</p> : null}
</div>
</div>
<section className='cf-pf4__tile cf-pf4__hours' aria-labelledby={`${uid}-today`} style={delay(0)}>
<div className='cf-pf4__status'>
<span key={live.kind} className='cf-pf4__pill' data-kind={live.kind}>
<span className='cf-pf4__pillDot' aria-hidden='true' />
{pillLabel}
</span>
</div>
<h3 id={`${uid}-today`} className='cf-pf4__h3 cf-pf4__today'>
{todayHeading}
</h3>
<p className='cf-pf4__detail'>{detail}</p>
<ul className='cf-pf4__week' aria-label={t.weekLabel}>
{week.map((d) => {
const slot = slots[d];
const isToday = d === live.day;
return (
<li
key={d}
className='cf-pf4__day'
data-today={isToday ? '' : undefined}
aria-current={isToday ? 'date' : undefined}
>
<span>{t.dayNames[d]}</span>
<span className={slot ? 'cf-pf4__time' : 'cf-pf4__time cf-pf4__time--off'}>
{slot ? fill(t.hoursRange, { open: fmt(slot.open), close: fmt(slot.close) }) : t.closedDay}
</span>
</li>
);
})}
</ul>
</section>
{showMap ? (
<section
className='cf-pf4__tile cf-pf4__map'
aria-labelledby={areaList.length ? `${uid}-areas` : undefined}
aria-label={areaList.length ? undefined : mapImageAlt}
style={delay(1)}
>
{mapImage ? (
<figure className='cf-pf4__mapFig'>
<img src={mapImage} alt={mapImageAlt} width={1024} height={1024} loading='lazy' decoding='async' />
</figure>
) : null}
{areaList.length ? (
<div className='cf-pf4__areas'>
<h3 id={`${uid}-areas`} className='cf-pf4__h3'>
{fill(areaHeading, { count: String(areaList.length) })}
</h3>
<ul className='cf-pf4__chips'>
{areaList.map((name) => (
<li key={name}>
<button
type='button'
className='cf-pf4__chip'
aria-pressed={area === name}
onClick={() => {
setArea(area === name ? null : name);
onAreaSelect?.(name);
}}
>
{name}
</button>
</li>
))}
</ul>
<p className='cf-pf4__check' aria-live='polite'>
{area ? (
<>
<span className='cf-pf4__tick' aria-hidden='true'>
<Check size={14} strokeWidth={3} />
</span>
{fill(areaConfirm, { area })}
</>
) : (
areaPrompt
)}
</p>
</div>
) : null}
</section>
) : null}
<section className='cf-pf4__tile cf-pf4__contact' aria-labelledby={`${uid}-biz`} style={delay(2)}>
{logoImage ? <img className='cf-pf4__logo' src={logoImage} alt='' height={40} /> : null}
<h3 id={`${uid}-biz`} className='cf-pf4__h3'>
{businessName}
</h3>
{addressLines.length ? (
<address className='cf-pf4__line'>
<MapPin aria-hidden='true' size={20} strokeWidth={2.5} />
<span>
{addressLines.map((line, i) => (
<React.Fragment key={i}>
{i ? <br /> : null}
{line}
</React.Fragment>
))}
</span>
</address>
) : null}
{licence ? (
<p className='cf-pf4__line cf-pf4__line--small'>
<ShieldCheck aria-hidden='true' size={18} strokeWidth={2.5} />
<span>{licence}</span>
</p>
) : null}
{phone ? (
<div className='cf-pf4__act cf-pf4__contactAct'>
{callButton}
{callNoteEl}
</div>
) : null}
</section>
<section className='cf-pf4__tile cf-pf4__quote' aria-labelledby={`${uid}-quote`} style={delay(3)}>
<div className='cf-pf4__quoteCopy'>
<h3 id={`${uid}-quote`} className='cf-pf4__h3'>
{quoteHeading || quoteLabel}
</h3>
{quoteText ? <p className='cf-pf4__body'>{quoteText}</p> : null}
</div>
<div className='cf-pf4__act'>
{quoteButton}
{quoteNote ? <p className='cf-pf4__note'>{quoteNote}</p> : null}
</div>
</section>
</div>
<div className='cf-pf4__base'>
{links.length ? (
<nav aria-label={legalLabel}>
<ul className='cf-pf4__links'>
{links.map((link) => (
<li key={`${link.href}-${link.label}`}>
<a href={link.href}>{link.label}</a>
</li>
))}
</ul>
</nav>
) : null}
<p className='cf-pf4__copy'>{copyright}</p>
</div>
</div>
</footer>
);
}
export default PageFooter4;
type Slot = { open: number; close: number };
type Live = {
kind: 'open' | 'closing' | 'closed';
day: number;
closeAt?: number;
minutesLeft?: number;
nextOffset?: number;
nextDay?: number;
nextOpen?: number;
};
const WEEKDAYS = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
const DEFAULT_HOURS: PageFooter4Hours[] = [
{ day: 1, open: '08:00', close: '17:00' },
{ day: 2, open: '08:00', close: '17:00' },
{ day: 3, open: '08:00', close: '17:00' },
{ day: 4, open: '08:00', close: '17:00' },
{ day: 5, open: '08:00', close: '17:00' },
{ day: 6, open: '09:00', close: '13:00' },
];
const DEFAULT_LINKS: PageFooter4Link[] = [
{ label: 'Privacy policy', href: '#privacy' },
{ label: 'Terms of service', href: '#terms' },
{ label: 'Accessibility', href: '#accessibility' },
];
const DEFAULT_COPY: PageFooter4Copy = {
open: 'Open now',
closing: 'Closing soon',
closed: 'Closed now',
openDetail: 'Open until {time}',
closingDetail: 'Closes at {time} · {minutes} min left',
closedDetail: 'Opens {when} at {time}',
noHours: 'Call to check our hours',
callOpen: 'We’re open now · tap to call',
callClosing: 'Closing at {time} · call now',
callClosed: 'Closed now · we open {when} at {time}',
todayHeading: 'Today: {hours}',
todayClosed: 'Closed today',
hoursRange: '{open} – {close}',
closedDay: 'Closed',
today: 'today',
tomorrow: 'tomorrow',
weekLabel: 'Opening hours',
am: 'AM',
pm: 'PM',
dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
};
function delay(index: number): React.CSSProperties {
return { ['--cf-pf4-d']: `${Math.min(index * 0.07, 0.28)}s` } as React.CSSProperties;
}
function fill(template: string, values: Record<string, string>): string {
return template.replace(/\{(\w+)\}/g, (whole: string, key: string) => values[key] ?? whole);
}
function toMinutes(value?: string): number | null {
if (!value) return null;
const match = /^(\d{1,2}):(\d{2})$/.exec(value.trim());
if (!match) return null;
const minutes = Number(match[1]) * 60 + Number(match[2]);
return minutes >= 0 && minutes <= 1440 ? minutes : null;
}
function buildSlots(hours: PageFooter4Hours[]): (Slot | null)[] {
const slots: (Slot | null)[] = [null, null, null, null, null, null, null];
for (const entry of hours) {
const day = Math.round(entry.day);
if (day < 0 || day > 6) continue;
const open = toMinutes(entry.open);
const close = toMinutes(entry.close);
if (open === null || close === null || open === 1440) continue;
slots[day] = { open, close: close <= open ? close + 1440 : close };
}
return slots;
}
function readNow(timeZone?: string): { day: number; minutes: number } {
const date = new Date();
if (timeZone) {
try {
const parts = new Intl.DateTimeFormat('en-US', {
timeZone,
weekday: 'short',
hour: '2-digit',
minute: '2-digit',
hourCycle: 'h23',
}).formatToParts(date);
const get = (type: string) => parts.find((part) => part.type === type)?.value ?? '';
const day = WEEKDAYS.indexOf(get('weekday'));
const hour = Number(get('hour')) % 24;
const minute = Number(get('minute'));
if (day >= 0 && Number.isFinite(hour) && Number.isFinite(minute)) return { day, minutes: hour * 60 + minute };
} catch {
// Unknown time zone: fall back to the visitor's clock.
}
}
return { day: date.getDay(), minutes: date.getHours() * 60 + date.getMinutes() };
}
function evaluate(slots: (Slot | null)[], day: number, minutes: number, soon: number): Live {
const prev = slots[(day + 6) % 7];
if (prev && prev.close > 1440 && minutes < prev.close - 1440) {
const left = prev.close - 1440 - minutes;
return { kind: left <= soon ? 'closing' : 'open', day, closeAt: prev.close, minutesLeft: left };
}
const current = slots[day];
if (current && minutes >= current.open && minutes < current.close) {
const left = current.close - minutes;
return { kind: left <= soon ? 'closing' : 'open', day, closeAt: current.close, minutesLeft: left };
}
if (current && minutes < current.open) {
return { kind: 'closed', day, nextOffset: 0, nextDay: day, nextOpen: current.open };
}
for (let offset = 1; offset <= 7; offset += 1) {
const next = (day + offset) % 7;
const slot = slots[next];
if (slot) return { kind: 'closed', day, nextOffset: offset, nextDay: next, nextOpen: slot.open };
}
return { kind: 'closed', day };
}
// Preview helper: picks a moment in the supplied week that shows the forced status.
function simulate(
slots: (Slot | null)[],
day: number,
kind: 'open' | 'closing' | 'closed',
soon: number,
): { day: number; minutes: number } {
let target = day;
let slot = slots[day] ?? null;
if (!slot) {
for (let offset = 1; offset <= 7; offset += 1) {
const next = (day + offset) % 7;
const candidate = slots[next];
if (candidate) {
target = next;
slot = candidate;
break;
}
}
}
if (!slot) return { day, minutes: 720 };
let minutes =
kind === 'open'
? slot.open + Math.floor((slot.close - slot.open) / 2)
: kind === 'closing'
? slot.close - Math.max(1, Math.min(25, soon))
: slot.close + 30;
if (minutes >= 1440) {
target = (target + 1) % 7;
minutes -= 1440;
}
return { day: target, minutes };
}
function sameLive(a: Live, b: Live): boolean {
return JSON.stringify(a) === JSON.stringify(b);
}
function formatTime(minutes: number, format: '12h' | '24h', am: string, pm: string): string {
const m = ((minutes % 1440) + 1440) % 1440;
const hour = Math.floor(m / 60);
const minute = m % 60;
const pad = (n: number) => String(n).padStart(2, '0');
if (format === '24h') return `${pad(hour)}:${pad(minute)}`;
const h12 = hour % 12 === 0 ? 12 : hour % 12;
return `${h12}${minute ? `:${pad(minute)}` : ''}\u00a0${hour < 12 ? am : pm}`;
}
const CSS = `
.cf-pf4{position:relative;background:var(--band,#1c2c4c);color:var(--band-ink,#fff);font-family:var(--font-body,system-ui,sans-serif);padding:clamp(56px,8vw,112px) clamp(16px,5vw,48px) clamp(40px,5vw,56px);overflow-x:clip}
.cf-pf4 *,.cf-pf4 *::before,.cf-pf4 *::after{box-sizing:border-box}
.cf-pf4 :where(h2,h3,p,ul,figure,address){margin:0}
.cf-pf4 :where(ul){list-style:none;padding:0}
.cf-pf4 :where(address){font-style:normal}
.cf-pf4 img{display:block;max-width:100%}
.cf-pf4__wrap{max-width:1120px;margin-inline:auto}
.cf-pf4__head{display:grid;grid-template-columns:minmax(0,1fr) clamp(168px,19vw,240px);gap:clamp(24px,4vw,56px);align-items:end}
.cf-pf4__head--solo{grid-template-columns:minmax(0,1fr)}
.cf-pf4__say{min-width:0;padding-bottom:clamp(0px,1.5vw,16px)}
.cf-pf4__headline{font-family:var(--font-display,inherit);font-weight:var(--display-weight,800);letter-spacing:var(--display-tracking,-0.025em);text-transform:var(--display-case,none);font-size:clamp(2rem,3.6vw,3.25rem);line-height:1.06;text-wrap:balance}
.cf-pf4__aside{margin-top:16px;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;font-weight:500;font-style:italic;color:color-mix(in oklch,var(--band-ink,#fff) 88%,var(--band,#1c2c4c));text-wrap:pretty}
.cf-pf4__by{margin-top:24px;font-size:.9375rem;line-height:1.4;font-weight:700;color:color-mix(in oklch,var(--band-ink,#fff) 84%,var(--band,#1c2c4c))}
.cf-pf4__cutout{width:100%;height:auto;aspect-ratio:1 / 1;object-fit:contain;object-position:center bottom;filter:drop-shadow(0 2px 3px oklch(from var(--shadow,oklch(0.22 0.03 260)) calc(l - 0.08) c h / 0.55)) drop-shadow(0 14px 18px oklch(from var(--shadow,oklch(0.22 0.03 260)) calc(l - 0.08) c h / 0.35))}
.cf-pf4__bento{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:16px;margin-top:clamp(32px,4vw,48px)}
.cf-pf4__quick{display:none}
.cf-pf4__tile{position:relative;min-width:0;display:flex;flex-direction:column;padding:clamp(20px,3vw,32px);border-radius:var(--card-radius,var(--radius,14px));background:color-mix(in oklch,var(--band-ink,#fff) 7%,var(--band,#1c2c4c));border:1px solid oklch(from var(--band-ink,#fff) l c h / 0.12);box-shadow:inset 0 1px 0 oklch(from var(--band-ink,#fff) l c h / 0.06);animation:cf-pf4-rise .45s cubic-bezier(.2,.7,.2,1) both;animation-delay:var(--cf-pf4-d,0s)}
.cf-pf4__map{grid-column:1 / 8;grid-row:1 / 3;gap:24px}
.cf-pf4__contact{grid-column:8 / 13;grid-row:1;gap:12px}
.cf-pf4__hours{grid-column:8 / 13;grid-row:2}
.cf-pf4__quote{grid-column:1 / 13;grid-row:3;display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,380px);gap:24px 48px;align-items:center}
.cf-pf4__bento[data-map=none] .cf-pf4__contact{grid-column:1 / 7;grid-row:1}
.cf-pf4__bento[data-map=none] .cf-pf4__hours{grid-column:7 / 13;grid-row:1}
.cf-pf4__bento[data-map=none] .cf-pf4__quote{grid-row:2}
.cf-pf4__h3{font-family:var(--font-display,inherit);font-weight:var(--display-weight,800);text-transform:var(--display-case,none);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;letter-spacing:-0.01em;text-wrap:balance}
.cf-pf4__body{margin-top:12px;max-width:60ch;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;color:color-mix(in oklch,var(--band-ink,#fff) 88%,var(--band,#1c2c4c));text-wrap:pretty}
.cf-pf4__logo{height:40px;width:auto;object-fit:contain;margin-bottom:4px}
.cf-pf4__line{display:grid;grid-template-columns:20px minmax(0,1fr);gap:12px;align-items:start;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5}
.cf-pf4__line svg{margin-top:.15em}
.cf-pf4__line--small{font-size:.9375rem;line-height:1.4;font-weight:600;color:color-mix(in oklch,var(--band-ink,#fff) 86%,var(--band,#1c2c4c))}
.cf-pf4__line--small svg{margin-top:.05em}
.cf-pf4__contactAct{margin-top:auto;padding-top:16px}
.cf-pf4__act{display:flex;flex-direction:column;gap:12px;min-width:0}
.cf-pf4__note{font-size:.9375rem;line-height:1.4;font-weight:600;text-align:center;color:color-mix(in oklch,var(--band-ink,#fff) 86%,var(--band,#1c2c4c));text-wrap:pretty}
.cf-pf4__dot{display:inline-block;width:10px;height:10px;border-radius:50%;vertical-align:.05em;margin-inline:2px .55em;background:var(--success,#1f7a45);outline:2px solid oklch(from var(--band-ink,#fff) l c h / 0.85)}
.cf-pf4__dot[data-kind=closing]{background:var(--warning,#875a00)}
.cf-pf4__dot[data-kind=closed]{background:var(--danger,#c0362c)}
.cf-pf4__risk{font-family:var(--font-display,inherit);font-weight:var(--display-weight,800);text-transform:var(--display-case,none);font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.15;text-align:center;text-wrap:balance}
.cf-pf4__btn{--pf4-bg:var(--button-bg,var(--cta,#d92d20));--pf4-bg2:var(--button-bg-2,var(--cta-2,#b42318));--pf4-sh:var(--shadow,oklch(0.22 0.03 260));display:inline-flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:64px;padding:12px 24px;border:0;border-radius:var(--button-radius,var(--radius,12px));font-family:var(--button-font,var(--font-display,inherit));font-weight:var(--button-weight,800);text-transform:var(--button-case,none);font-size:clamp(1.125rem,1.55vw,1.375rem);line-height:1.15;text-align:center;text-wrap:balance;text-decoration:none;cursor:pointer;-webkit-tap-highlight-color:transparent;transition:transform .16s ease,box-shadow .16s ease,background .16s ease}
.cf-pf4__btn svg{flex:none}
.cf-pf4__btn--primary{color:var(--button-ink,var(--cta-ink,#fff));text-shadow:var(--button-text-shadow,none);background:linear-gradient(oklch(from var(--pf4-bg) calc(l + 0.04) c h),oklch(from var(--pf4-bg2) calc(l - 0.02) c h));box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--pf4-bg) calc(l + 0.14) c h / 0.7),inset 0 -3px 0 oklch(from var(--pf4-bg) calc(l - 0.16) c h),0 1px 2px oklch(from var(--pf4-sh) calc(l - 0.06) c h / 0.45),0 8px 16px -6px oklch(from var(--pf4-sh) calc(l - 0.06) c h / 0.55))}
.cf-pf4__btn--primary:hover,.cf-pf4[data-state=hover] .cf-pf4__btn--primary{background:linear-gradient(oklch(from var(--pf4-bg) calc(l - 0.01) c h),oklch(from var(--pf4-bg2) calc(l - 0.07) c h));box-shadow:inset 0 1px 0 oklch(from var(--pf4-bg) calc(l + 0.12) c h / 0.6),inset 0 -3px 0 oklch(from var(--pf4-bg) calc(l - 0.18) c h),0 1px 2px oklch(from var(--pf4-sh) calc(l - 0.06) c h / 0.5),0 10px 18px -6px oklch(from var(--pf4-sh) calc(l - 0.06) c h / 0.65)}
.cf-pf4__btn--primary:active,.cf-pf4[data-state=active] .cf-pf4__btn--primary{transform:translateY(1px);background:linear-gradient(oklch(from var(--pf4-bg) calc(l - 0.05) c h),oklch(from var(--pf4-bg2) calc(l - 0.09) c h));box-shadow:inset 0 2px 4px oklch(from var(--pf4-bg) calc(l - 0.22) c h / 0.55),inset 0 -2px 0 oklch(from var(--pf4-bg) calc(l - 0.18) c h),0 1px 1px oklch(from var(--pf4-sh) calc(l - 0.06) c h / 0.45)}
.cf-pf4__btn--call{--pf4-b2:var(--button-2-bg,var(--secondary,#eceff4));color:var(--button-2-ink,var(--secondary-ink,#141c2e));text-shadow:none;background:linear-gradient(oklch(from var(--pf4-b2) calc(l + 0.02) c h),oklch(from var(--pf4-b2) calc(l - 0.02) c h));border:1px solid var(--button-2-border,transparent);box-shadow:var(--button-2-shadow,var(--shadow-sm,0 1px 2px oklch(0.22 0.03 260 / 0.25)))}
.cf-pf4__btn--call:hover,.cf-pf4[data-state=hover] .cf-pf4__btn--call{background:linear-gradient(oklch(from var(--pf4-b2) calc(l - 0.03) c h),oklch(from var(--pf4-b2) calc(l - 0.07) c h))}
.cf-pf4__btn--call:active,.cf-pf4[data-state=active] .cf-pf4__btn--call{transform:translateY(1px);background:linear-gradient(oklch(from var(--pf4-b2) calc(l - 0.07) c h),oklch(from var(--pf4-b2) calc(l - 0.09) c h));box-shadow:inset 0 2px 3px oklch(from var(--pf4-sh) l c h / 0.22)}
.cf-pf4__btn:disabled,.cf-pf4__btn[aria-disabled=true]{cursor:not-allowed;transform:none;color:color-mix(in oklch,var(--band-ink,#fff) 72%,var(--band,#1c2c4c));background:color-mix(in oklch,var(--band-ink,#fff) 16%,var(--band,#1c2c4c));border-color:transparent;box-shadow:none;text-shadow:none}
.cf-pf4__btn:focus-visible,.cf-pf4__chip:focus-visible,.cf-pf4__links a:focus-visible{outline:3px solid var(--band-ink,#fff);outline-offset:3px}
.cf-pf4__mapFig{position:relative;border-radius:12px;overflow:hidden;aspect-ratio:16 / 10}
.cf-pf4__mapFig img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center}
.cf-pf4__areas{display:flex;flex-direction:column;gap:16px}
.cf-pf4__chips{display:flex;flex-wrap:wrap;gap:8px}
.cf-pf4__chip{display:inline-flex;align-items:center;min-height:40px;padding:6px 14px;border-radius:999px;border:1px solid oklch(from var(--band-ink,#fff) l c h / 0.2);background:oklch(from var(--band-ink,#fff) l c h / 0.1);color:var(--band-ink,#fff);font-family:inherit;font-size:.875rem;font-weight:800;line-height:1.2;cursor:pointer;transition:background .16s ease,border-color .16s ease,transform .16s ease}
.cf-pf4__chip:hover{background:oklch(from var(--band-ink,#fff) l c h / 0.18);border-color:oklch(from var(--band-ink,#fff) l c h / 0.32)}
.cf-pf4__chip:active{transform:translateY(1px)}
.cf-pf4__chip[aria-pressed=true]{background:var(--accent-fill,var(--accent,#2f6fdb));border-color:transparent;color:var(--accent-fill-ink,var(--card,#fff))}
.cf-pf4__check{min-height:1.4em;font-size:.9375rem;line-height:1.4;font-weight:600;color:color-mix(in oklch,var(--band-ink,#fff) 88%,var(--band,#1c2c4c));text-wrap:pretty}
.cf-pf4__tick{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;border-radius:50%;vertical-align:-0.3em;margin-inline-end:.5em;background:var(--success,#1f7a45);color:var(--cf-pf4-badge-ink,#fff)}
.cf-pf4__hours{background:var(--card,#fff);color:var(--ink,#141c2e);border:1px solid color-mix(in oklch,var(--accent,#2f6fdb) 32%,var(--card,#fff));box-shadow:var(--card-shadow,var(--shadow-lg,0 2px 4px oklch(0.22 0.03 260 / 0.22),0 12px 24px -8px oklch(0.22 0.03 260 / 0.32)))}
.cf-pf4__status{display:flex;flex-wrap:wrap;gap:8px}
.cf-pf4__pill{display:inline-flex;align-items:center;gap:8px;min-height:32px;padding:4px 12px;border-radius:999px;font-size:.875rem;font-weight:800;line-height:1.2;animation:cf-pf4-pop .3s cubic-bezier(.2,.7,.2,1) both}
.cf-pf4__pill[data-kind=open]{background:var(--success-soft,#e3f4e9);color:var(--success,#1f7a45)}
.cf-pf4__pill[data-kind=closing]{background:var(--warning-soft,#f7efd9);color:var(--warning,#875a00)}
.cf-pf4__pill[data-kind=closed]{background:color-mix(in oklch,var(--ink,#141c2e) 6%,var(--card,#fff));color:var(--ink,#141c2e)}
.cf-pf4__pillDot{flex:none;width:10px;height:10px;border-radius:50%;background:currentColor}
.cf-pf4__pill[data-kind=closed] .cf-pf4__pillDot{background:var(--danger,#c0362c)}
.cf-pf4__today{margin-top:16px}
.cf-pf4__detail{margin-top:8px;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;font-weight:600;color:var(--ink,#141c2e);font-variant-numeric:tabular-nums}
.cf-pf4__week{margin-top:20px;display:flex;flex-direction:column}
.cf-pf4__day{display:flex;justify-content:space-between;gap:16px;padding:8px 12px;border-radius:8px;border-top:1px solid transparent;font-size:1rem;line-height:1.4;color:var(--ink,#141c2e);font-variant-numeric:tabular-nums}
.cf-pf4__day + .cf-pf4__day{border-top-color:oklch(from var(--ink,#141c2e) l c h / 0.08)}
.cf-pf4__day[data-today],.cf-pf4__day[data-today] + .cf-pf4__day{border-top-color:transparent}
.cf-pf4__day[data-today]{background:color-mix(in oklch,var(--accent,#2f6fdb) 10%,var(--card,#fff));font-weight:800}
.cf-pf4__time{text-align:end}
.cf-pf4__time--off{color:var(--muted,#4a5568)}
.cf-pf4__day[data-today] .cf-pf4__time--off{color:var(--ink,#141c2e)}
.cf-pf4__quoteCopy{min-width:0}
.cf-pf4__base{margin-top:clamp(40px,5vw,64px);display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px 32px}
.cf-pf4__links{display:flex;flex-wrap:wrap;gap:4px 24px}
.cf-pf4__links a{display:inline-block;padding-block:8px;color:var(--band-ink,#fff);font-size:.9375rem;font-weight:600;line-height:1.4;text-decoration:underline;text-decoration-color:oklch(from var(--band-ink,#fff) l c h / 0.45);text-underline-offset:.18em;transition:text-decoration-color .16s ease}
.cf-pf4__links a:hover{text-decoration-color:var(--band-ink,#fff)}
.cf-pf4__copy{font-size:.9375rem;line-height:1.4;color:color-mix(in oklch,var(--band-ink,#fff) 82%,var(--band,#1c2c4c))}
@keyframes cf-pf4-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes cf-pf4-pop{from{transform:scale(.9)}to{transform:none}}
@media (min-width:960px){
.cf-pf4__mapFig{aspect-ratio:auto;flex:1 1 auto;min-height:300px}
}
@media (max-width:959px){
.cf-pf4__contact{grid-column:1 / 7;grid-row:1}
.cf-pf4__hours{grid-column:7 / 13;grid-row:1}
.cf-pf4__map{grid-column:1 / 13;grid-row:2}
.cf-pf4__quote{grid-row:3}
}
@media (max-width:720px){
.cf-pf4__head{grid-template-columns:minmax(0,1fr)}
.cf-pf4__cutout{display:none}
.cf-pf4__by{margin-top:16px}
.cf-pf4__bento{grid-template-columns:minmax(0,1fr);margin-top:32px}
.cf-pf4 .cf-pf4__bento[data-map] > *{grid-column:1 / -1;grid-row:auto}
.cf-pf4__quick{display:flex;flex-direction:column;gap:24px;margin-bottom:16px}
.cf-pf4__contactAct,.cf-pf4__quote{display:none}
.cf-pf4__mapFig{aspect-ratio:4 / 3}
.cf-pf4__base{flex-direction:column;align-items:flex-start}
}
@media (prefers-reduced-motion:reduce){
.cf-pf4 .cf-pf4__tile,.cf-pf4 .cf-pf4__pill{animation:none}
.cf-pf4 .cf-pf4__btn,.cf-pf4 .cf-pf4__chip,.cf-pf4 .cf-pf4__links a{transition:none}
.cf-pf4 .cf-pf4__btn:active,.cf-pf4[data-state=active] .cf-pf4__btn,.cf-pf4 .cf-pf4__chip:active{transform:none}
}
`;
pieces/content/page-footer-4/specimen.tsx 70 lines
import __studioImage154f2ff9 from "../assets/888e2218252cae46.webp";
import __studioImage34185383 from "../assets/c71d7a813854b634.webp";
// Specimen: Brightwater Plumbing & Drain, a fictional local service, closing its funnel with the shop-front footer.
import * as React from 'react';
import { PageFooter4 } from '../page-footer-4';
import { slot } from '../../slots';
export const states = ['default', 'hover', 'active', 'disabled', 'open', 'closing', 'closed'];
export default function PageFooter4Specimen({ state = 'default' }: { state?: string }) {
const status = state === 'open' || state === 'closing' || state === 'closed' ? state : 'auto';
const buttonState = state === 'hover' || state === 'active' || state === 'disabled' ? state : 'default';
return (
<PageFooter4
headline='“If your street is on this map, we can be at your door today.”'
aside='(Yes, even at 5:45 on a Friday.)'
attribution='Marco Reyes, owner and master plumber'
presenterImage={slot(
'presenter-cutout',
__studioImage154f2ff9,
)}
presenterImageAlt='Marco Reyes, owner of Brightwater Plumbing & Drain'
businessName='Brightwater Plumbing & Drain'
addressLines={['1840 Harbor Road, Unit 3', 'Brightwater, OR 97035']}
licence='Licensed & insured · Plumbing contractor #PC-20418'
phone='(555) 014-2290'
hours={[
{ day: 1, open: '07:00', close: '19:00' },
{ day: 2, open: '07:00', close: '19:00' },
{ day: 3, open: '07:00', close: '19:00' },
{ day: 4, open: '07:00', close: '19:00' },
{ day: 5, open: '07:00', close: '19:00' },
{ day: 6, open: '08:00', close: '16:00' },
]}
timeZone='America/Los_Angeles'
mapImage={slot(
'scene',
__studioImage34185383,
)}
mapImageAlt='Illustrated map of the Brightwater service area'
areas={[
'Brightwater',
'Harbor Point',
'Old Mill',
'Cedar Flats',
'Northshore',
'Riverbend',
'Kettle Bay',
'Fernhill',
'Lantern Hill',
]}
areaHeading='Same-day visits across {count} neighborhoods'
areaPrompt='Tap your neighborhood to check.'
areaConfirm='Yes, {area} is on our route.'
quoteHeading='Free quote. Zero obligation.'
quoteText='Tell us what’s leaking or backed up. You get a clear price before anyone picks up a wrench.'
quoteLabel='Get My Free Quote'
quoteNote='Takes 30 seconds · no obligation'
links={[
{ label: 'Privacy policy', href: '#privacy' },
{ label: 'Terms of service', href: '#terms' },
{ label: 'Accessibility', href: '#accessibility' },
{ label: 'Licence & insurance', href: '#licence' },
]}
status={status}
state={buttonState}
/>
);
}
| Name | Type | Details |
|---|---|---|
headline OptionalPageFooter4 |
React.ReactNode |
|
aside OptionalPageFooter4 |
string |
|
attribution OptionalPageFooter4 |
string |
|
presenterImage OptionalPageFooter4 |
string |
|
presenterImageAlt OptionalPageFooter4 |
string |
|
businessName OptionalPageFooter4 |
string |
|
logoImage OptionalPageFooter4 |
string |
|
addressLines OptionalPageFooter4 |
string[] |
|
licence OptionalPageFooter4 |
string |
|
phone OptionalPageFooter4 |
string |
|
phoneHref OptionalPageFooter4 |
string |
|
callLabel OptionalPageFooter4 |
string |
|
hours OptionalPageFooter4 |
PageFooter4Hours[] |
|
timeZone OptionalPageFooter4 |
string |
|
closingSoonMinutes OptionalPageFooter4 |
number |
|
timeFormat OptionalPageFooter4 |
'12h' | '24h' |
|
weekStartsOn OptionalPageFooter4 |
number |
|
mapImage OptionalPageFooter4 |
string |
|
mapImageAlt OptionalPageFooter4 |
string |
|
areas OptionalPageFooter4 |
string[] |
|
areaHeading OptionalPageFooter4 |
string |
|
areaPrompt OptionalPageFooter4 |
string |
|
areaConfirm OptionalPageFooter4 |
string |
|
onAreaSelect OptionalPageFooter4 |
(area: string) => void |
|
quoteHeading OptionalPageFooter4 |
string |
|
quoteText OptionalPageFooter4 |
string |
|
quoteLabel OptionalPageFooter4 |
string |
|
quoteNote OptionalPageFooter4 |
string |
|
href OptionalPageFooter4 |
string |
|
onAction OptionalPageFooter4 |
() => void |
|
links OptionalPageFooter4 |
PageFooter4Link[] |
|
legalLabel OptionalPageFooter4 |
string |
|
copyrightTemplate OptionalPageFooter4 |
string |
|
year OptionalPageFooter4 |
number | string |
|
copy OptionalPageFooter4 |
Partial<PageFooter4Copy> |
|
status OptionalPageFooter4 |
PageFooter4Status |
|
state OptionalPageFooter4 |
PageFooter4State |
|
className OptionalPageFooter4 |
string |
Theme roles it reads
Set by the theme bar, a preset or your brand. Colours come from the base tokens (--surface, --ink, --cta…) every piece uses.
--button-bg--button-bg-2--button-case--button-font--button-ink--button-radius--button-shadow--button-text-shadow--button-weight- Main CTA button: background, ink, font, weight, case, radius and shadow.
--button-2-bg--button-2-border--button-2-ink--button-2-shadow- Secondary button.
--card-radius--card-shadow- Cards and panels: radius, border and shadow.
--display-case--display-tracking--display-weight- Headlines: weight, letter case and tracking.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
presenter-cutout- The presenter on a transparent background.
scene- A wide atmosphere photo behind or beside the copy.
-
888e2218252cae46.webp
image/webp · 117 KB
-
c71d7a813854b634.webp
image/webp · 338 KB