feat: convert site to astro via codex

This commit is contained in:
2026-06-08 11:17:39 -07:00
parent f3d3562cec
commit 33e78ff8a5
355 changed files with 19954 additions and 6 deletions
+56
View File
@@ -0,0 +1,56 @@
---
import BaseLayout from './BaseLayout.astro';
import FormShell from '../components/FormShell.astro';
import TeamPage from '../components/TeamPage.astro';
const { entry } = Astro.props;
const showForm = ['client-consultation', 'contact', 'schedule-consultation', 'referrals'].includes(entry.data.slug);
const serviceTitles: Record<string, Record<string, string>> = {
en: {
'aba-therapy': 'Behavioral',
'autism-evaluations': 'Psychological',
'learner-social-club': 'Sociological'
},
es: {
'aba-therapy': 'Conductual',
'autism-evaluations': 'Psicológicos',
'learner-social-club': 'Sociológico'
}
};
const pageTitles: Record<string, Record<string, string>> = {
en: {
'aba-therapy-intake-process': 'Learner Intake Process',
about: 'About AIA',
careers: 'Employment Opportunities',
'client-consultation': 'Schedule Your Free Consultation',
'client-forms': 'Client Forms',
contact: 'Contact AIA',
'donate-autism-giveback': 'Giveback & Donate',
'employee-portal': 'Employee Portal',
faqs: 'ABA Therapy Helpline',
insurance: 'Insurance Guide',
'privacy-policy': 'Privacy Policy',
referrals: 'Physician & Insurer Referrals',
'schedule-consultation': 'Reach Out for Your Free Consultation',
services: 'ABA & Educational Services',
team: 'Meet the Team',
tour: 'Schedule a Guided Tour'
},
es: {
'aba-therapy-intake-process': 'Proceso de admisión de estudiantes',
'client-consultation': 'Programa tu consulta gratuita',
contact: 'Contactar a AIA',
services: 'Servicios ABA y Educativos'
}
};
const bannerTitle = serviceTitles[entry.data.lang]?.[entry.data.slug] || pageTitles[entry.data.lang]?.[entry.data.slug] || entry.data.title.split('|')[0].trim();
const isService = Boolean(serviceTitles[entry.data.lang]?.[entry.data.slug]);
---
<BaseLayout title={entry.data.title} description={entry.data.description} canonical={entry.data.canonical} image={entry.data.featuredImage} lang={entry.data.lang}>
<header class:list={['source-page-banner', { 'service-banner': isService }]}>
<div class="container"><h1>{bannerTitle}</h1></div>
</header>
{entry.data.slug === 'team' && entry.data.lang === 'en'
? <TeamPage />
: <article class:list={['prose', 'source-page', 'container', { 'service-page': isService }]}><slot /></article>}
{showForm && <FormShell title={bannerTitle} />}
</BaseLayout>