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

+11
View File
@@ -0,0 +1,11 @@
---
import { getCollection, render } from 'astro:content';
import PageLayout from '../../layouts/PageLayout.astro';
export async function getStaticPaths() {
const pages = await getCollection('pages', ({ data }) => data.lang === 'ar' && !['index', 'library'].includes(data.slug) && !data.draft);
return pages.map((entry) => ({ params: { slug: entry.data.slug }, props: { entry } }));
}
const { entry } = Astro.props;
const { Content } = await render(entry);
---
<PageLayout entry={entry}><Content /></PageLayout>
+11
View File
@@ -0,0 +1,11 @@
---
import { getCollection } from 'astro:content';
import BaseLayout from '../../layouts/BaseLayout.astro';
import Hero from '../../components/Hero.astro';
import BlogCard from '../../components/BlogCard.astro';
const posts = (await getCollection('blog', ({ data }) => data.lang === 'ar' && !data.draft)).slice(0, 3);
---
<BaseLayout title="معهد أريزونا للتوحد" description="موارد ودعم للأسر والأطفال المصابين بالتوحد." canonical="https://www.azinstitute4autism.com/ar" lang="ar">
<Hero eyebrow="Arizona Institute for Autism" title="الصحة السلوكية والتعليم الخاص" description="محتوى عربي متاح من مكتبة معهد أريزونا للتوحد." image="/assets/images/playing-boy.webp" alt="" />
<section class="section"><div class="container"><div class="section-heading"><h2>المكتبة</h2></div><div class="card-grid">{posts.map((post) => <BlogCard post={post} prefix="/ar" />)}</div></div></section>
</BaseLayout>
+11
View File
@@ -0,0 +1,11 @@
---
import { getCollection, render } from 'astro:content';
import BlogPostLayout from '../../../layouts/BlogPostLayout.astro';
export async function getStaticPaths() {
const posts = await getCollection('blog', ({ data }) => data.lang === 'ar' && !data.draft);
return posts.map((entry) => ({ params: { slug: entry.data.slug }, props: { entry } }));
}
const { entry } = Astro.props;
const { Content } = await render(entry);
---
<BlogPostLayout entry={entry}><Content /></BlogPostLayout>
+11
View File
@@ -0,0 +1,11 @@
---
import { getCollection } from 'astro:content';
import BlogIndexLayout from '../../../layouts/BlogIndexLayout.astro';
import BlogCard from '../../../components/BlogCard.astro';
const posts = (await getCollection('blog', ({ data }) => data.lang === 'ar' && !data.draft)).sort((a, b) => b.data.date.valueOf() - a.data.date.valueOf());
const popular = posts.slice(0, 5);
---
<BlogIndexLayout title="مكتبة معهد أريزونا للتوحد" description="مقالات إخبارية حول علاج تحليل السلوك التطبيقي والتعليم الخاص، ودراسات حالة، ووصفات، ومقالات افتتاحية، ودروس تعليمية." lang="ar">
<aside class="library-sidebar"><h2>المقالات الشائعة</h2><ul>{popular.map((post) => <li><a href={`/ar/library/${post.data.slug}`}>{post.data.title}</a></li>)}</ul></aside>
<div class="blog-list">{posts.map((post) => <BlogCard post={post} prefix="/ar" />)}</div>
</BlogIndexLayout>