import type { Child } from 'hono/jsx'; import type { AppConfig } from './config.js'; import { WEEKDAY_SHORT, calendarMonth, calendarToday, chooseCalendarMonth, monthStep, type CalendarDay } from './calendar.js'; import { spotsSentence, type PublicEvent, type PublicShift } from './schedule.js'; import type { SignupErrors, SignupValues } from './signup-form.js'; import type { MoveTarget } from './admin/store.js'; import type { ManageView } from './signup.js'; import { appPath } from './url.js'; const PANTRY_SITE = 'https://hopefoodpantrysc.org'; function asset(config: AppConfig, file: string): string { return appPath(config, file); } export function Layout(props: { config: AppConfig; title: string; path?: string; turnstile?: boolean; account?: { csrf: string } | null; children?: Child; }) { const home = appPath(props.config, '/'); const privacy = appPath(props.config, '/privacy'); const coordinator = appPath(props.config, props.account ? '/admin' : '/login'); const logo = asset(props.config, '/img/logo.png'); const menu = asset(props.config, '/img/icons/menu.svg'); const close = asset(props.config, '/img/icons/close.svg'); const facebook = asset(props.config, '/img/icons/facebook.svg'); const instagram = asset(props.config, '/img/icons/instagram.svg'); const wave = asset(props.config, '/img/wave-secondary.svg'); return ( {props.title}