feat: convert site to astro via codex
This commit is contained in:
@@ -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 === 'en' && !['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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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 === 'es' && !['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>
|
||||
@@ -0,0 +1,4 @@
|
||||
---
|
||||
import HomePage from '../../components/HomePage.astro';
|
||||
---
|
||||
<HomePage lang="es" />
|
||||
@@ -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 === 'es' && !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>
|
||||
@@ -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 === 'es' && !data.draft)).sort((a, b) => b.data.date.valueOf() - a.data.date.valueOf());
|
||||
const popular = posts.slice(0, 5);
|
||||
---
|
||||
<BlogIndexLayout title="La Biblioteca en AZ Institute for Autism" description="Noticias sobre terapia ABA y educación especial, casos de estudio, recetas, editoriales y tutoriales para y sobre nuestros estudiantes con autismo." lang="es">
|
||||
<aside class="library-sidebar"><h2>Publicaciones populares</h2><ul>{popular.map((post) => <li><a href={`/es/library/${post.data.slug}`}>{post.data.title}</a></li>)}</ul></aside>
|
||||
<div class="blog-list">{posts.map((post) => <BlogCard post={post} prefix="/es" />)}</div>
|
||||
</BlogIndexLayout>
|
||||
@@ -0,0 +1,4 @@
|
||||
---
|
||||
import HomePage from '../components/HomePage.astro';
|
||||
---
|
||||
<HomePage lang="en" />
|
||||
@@ -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 === 'en' && !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>
|
||||
@@ -0,0 +1,16 @@
|
||||
---
|
||||
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 === 'en' && !data.draft)).sort((a, b) => b.data.date.valueOf() - a.data.date.valueOf());
|
||||
const popular = posts.slice(0, 5);
|
||||
---
|
||||
<BlogIndexLayout title="The Library at AZ Institute for Autism" description="Welcome to the Library at AIA, where we share valuable insights, strategies, and resources to support individuals with autism, their families, and professionals in the field. Our articles explore key topics in Applied Behavior Analysis (ABA) therapy, community events, success stories, and expert guidance.">
|
||||
<aside class="library-sidebar">
|
||||
<label for="library-search">Search</label>
|
||||
<input id="library-search" type="search" placeholder="Search" />
|
||||
<h2>Popular Posts</h2>
|
||||
<ul>{popular.map((post) => <li><a href={`/library/${post.data.slug}`}>{post.data.title}</a></li>)}</ul>
|
||||
</aside>
|
||||
<div class="blog-list">{posts.map((post) => <BlogCard post={post} />)}</div>
|
||||
</BlogIndexLayout>
|
||||
Reference in New Issue
Block a user