--- import '../styles/global.css'; import '@fontsource-variable/fraunces'; import '@fontsource-variable/eb-garamond'; import '@fontsource-variable/jetbrains-mono'; import ThemeSwitcher from '../components/react/ThemeSwitcher'; import Search from '../components/react/Search'; import LogoutButton from '../components/react/LogoutButton'; import EditableText from '../components/react/EditableText'; interface Props { title: string; wide?: boolean; description?: string; image?: string; type?: 'website' | 'article'; } const { title, wide = false, description, image, type = 'website' } = Astro.props; const API_URL = process.env.PUBLIC_API_URL || 'http://backend:3000'; const isAdmin = Astro.cookies.get('admin_session')?.value === '1'; let siteConfig: { title: string; subtitle: string; footer: string; favicon: string; theme: string; custom_css: string; contact_links?: { kind: string; label: string; value: string }[]; } = { title: "Ela's Atelier", subtitle: "Works on paper, canvas, and elsewhere", footer: "Hand-arranged with care", favicon: "/favicon.svg", theme: "salon", custom_css: "", contact_links: [] }; try { const res = await fetch(`${API_URL}/api/config`); if (res.ok) { siteConfig = await res.json(); } } catch (e) { console.error("Failed to fetch config:", e); } const fullTitle = `${title} · ${siteConfig.title}`; const year = new Date().getFullYear(); const hasContact = (siteConfig.contact_links?.length ?? 0) > 0; --- {fullTitle} {description && } {description && } {image && } {description && } {image && } {siteConfig.custom_css &&