--- import Base from '../../layouts/Base.astro'; import PageHero from '../../components/PageHero.astro'; import BentoGrid from '../../components/BentoGrid.astro'; import BentoTile from '../../components/BentoTile.astro'; import DecoOrb from '../../components/DecoOrb.astro'; import { getCollection } from 'astro:content'; const blogPosts = await getCollection('blog'); const sortedPosts = blogPosts.sort((a, b) => b.data.date.valueOf() - a.data.date.valueOf()); // Surface color rotation for variety across the post grid const surfaces = ['white', 'soft', 'yellow', 'mint', 'purple-soft', 'teal'] as const; function surfaceFor(i: number) { return surfaces[i % surfaces.length]; } --- {sortedPosts.length > 0 && ( {sortedPosts[0].data.image && ( )} {sortedPosts[0].data.excerpt} {new Date(sortedPosts[0].data.date).toLocaleDateString('th-TH', { year: 'numeric', month: 'long', day: 'numeric' })} อ่านต่อ )} บทความทั้งหมด บทความ ล่าสุด {sortedPosts.length > 1 && ( {sortedPosts.slice(1).map((post, i) => ( {post.data.image && ( )} {post.data.excerpt} {new Date(post.data.date).toLocaleDateString('th-TH', { year: 'numeric', month: 'long', day: 'numeric' })} ))} )} ต้องการความช่วยเหลือ? ปรึกษาฟรี! เราพร้อมช่วยวิเคราะห์และให้คำแนะนำ ติดต่อเรา → 080-995-5945
{sortedPosts[0].data.excerpt}
{post.data.excerpt}
ปรึกษาฟรี! เราพร้อมช่วยวิเคราะห์และให้คำแนะนำ