feat: convert site to astro via codex
This commit is contained in:
@@ -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