From 604e507b311171f0f5d914ce28a3d42a2281a5e6 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Wed, 11 Jun 2025 16:34:34 +0000 Subject: refactor: update blog layout and components - Removed the PostSummary component and replaced it with a new PostElement component for better post display. - Introduced SocialLinks and Welcome sections to enhance the homepage layout. - Updated the index page to utilize the new sections, improving overall structure and user experience. --- src/pages/index.astro | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'src/pages/index.astro') diff --git a/src/pages/index.astro b/src/pages/index.astro index 56ccdff..87bd89c 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -1,17 +1,10 @@ --- -import { getCollection } from "astro:content"; import Layout from "../layouts/BaseLayout.astro"; -import PostSummary from "../components/PostSummary.astro"; - -const posts = await getCollection("blog", ({ data }) => { - return data.draft !== true; -}); - -posts.sort((a, b) => b.data.pubDate.getTime() - a.data.pubDate.getTime()); +import SocialLinksSection from "../components/Sections/SocialLinks.astro"; +import WelcomeSection from "../components/Sections/Welcome.astro"; --- -
- {posts.map((post) => )} -
+ +
-- cgit v1.2.3