--- import '../styles/global.css'; import 'katex/dist/katex.min.css'; import 'highlight.js/styles/atom-one-dark.css'; import '@fontsource-variable/fraunces'; import '@fontsource-variable/eb-garamond'; import '@fontsource/caveat'; 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: "Ela's Atelier", subtitle: "Works on paper, canvas, and elsewhere", footer: "Hand-arranged with care", favicon: "/favicon.svg", theme: "salon", custom_css: "" }; 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(); ---