feat: convert site to astro via codex

This commit is contained in:
DeCentN2Madness committed 2026-06-08 11:17:39 -07:00
1 parent f3d3562cec
commit 33e78ff8a5
355 files changed
+19954 -6

No files matched your search

+43
View File
@@ -0,0 +1,43 @@
---
import Header from '../components/Header.astro';
import Footer from '../components/Footer.astro';
import Seo from '../components/Seo.astro';
import site from '../data/site.json';
import '../styles/global.css';
import '../styles/rtl.css';
const { title, description, canonical, image, lang = 'en', type = 'website' } = Astro.props;
const dir = lang === 'ar' ? 'rtl' : 'ltr';
const organizationSchema = {
'@context': 'https://schema.org',
'@type': 'MedicalOrganization',
name: site.name,
url: site.url,
telephone: site.phone,
email: site.email,
address: {
'@type': 'PostalAddress',
streetAddress: '8901 E Raintree Dr Ste 160',
addressLocality: 'Scottsdale',
addressRegion: 'AZ',
postalCode: '85260',
addressCountry: 'US'
},
sameAs: Object.values(site.social)
};
---
<!doctype html>
<html lang={lang} dir={dir}>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<link rel="icon" href="/assets/images/aia-logo.svg" />
<Seo title={title} description={description} canonical={canonical} image={image} lang={lang} type={type} />
<script type="application/ld+json" set:html={JSON.stringify(organizationSchema)} />
</head>
<body>
<a class="skip-link" href="#main">Skip to content</a>
<Header lang={lang} />
<main id="main"><slot /></main>
<Footer lang={lang} />
</body>
</html>
+11
View File
@@ -0,0 +1,11 @@
---
import BaseLayout from './BaseLayout.astro';
const { title, description, lang = 'en' } = Astro.props;
const languagePrefix = lang === 'en' ? '' : `/${lang}`;
const canonical = `https://www.azinstitute4autism.com${languagePrefix}/library`;
---
<BaseLayout title={title} description={description} canonical={canonical} lang={lang}>
<header class="library-banner"><div class="container"><p class="script-label">Welcome to</p><h1>{title}</h1></div></header>
<section class="library-intro"><div class="container"><h2>Library</h2><p>{description}</p></div></section>
<div class="container section library-layout"><slot /></div>
</BaseLayout>
+19
View File
@@ -0,0 +1,19 @@
---
import BaseLayout from './BaseLayout.astro';
import LikeViewCounter from '../components/LikeViewCounter.astro';
const { entry } = Astro.props;
---
<BaseLayout title={entry.data.title} description={entry.data.description} canonical={entry.data.canonical} image={entry.data.featuredImage} lang={entry.data.lang} type="article">
<article class="blog-post">
<header class="article-header container">
<h1>{entry.data.title}</h1>
<div class="article-byline">
<img src="/assets/images/rula-diab-avatar.jpg" alt="" />
<p><strong>Rula Diab, Clinical Director, M.Ed, BCBA, LBA</strong><br /><time datetime={entry.data.date.toISOString()}>{entry.data.date.toLocaleDateString(entry.data.lang, { day: '2-digit', month: 'long', year: 'numeric' })}</time></p>
</div>
{entry.data.featuredImage && <div class="article-featured"><img src={entry.data.featuredImage} alt={entry.data.alt || ''} /></div>}
</header>
<div class="prose blog-post-body container"><slot /></div>
<div class="container"><LikeViewCounter slug={entry.data.slug} /></div>
</article>
</BaseLayout>
+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>