diff options
author | Valentin Popov <valentin@popov.link> | 2025-06-11 19:34:34 +0300 |
---|---|---|
committer | Valentin Popov <valentin@popov.link> | 2025-06-11 19:34:34 +0300 |
commit | 604e507b311171f0f5d914ce28a3d42a2281a5e6 (patch) | |
tree | 43395e26f5ddf6dd8ae6c83ba864aeba0e339715 /src/pages | |
parent | 3d6aedd272a2c73d65ce79036d63e6916e8f71b5 (diff) | |
download | popov.link-604e507b311171f0f5d914ce28a3d42a2281a5e6.tar.xz popov.link-604e507b311171f0f5d914ce28a3d42a2281a5e6.zip |
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.
Diffstat (limited to 'src/pages')
-rw-r--r-- | src/pages/index.astro | 15 |
1 files changed, 4 insertions, 11 deletions
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"; --- <Layout> - <section style={{ "margin-top": "3rem" }}> - {posts.map((post) => <PostSummary post={post} />)} - </section> + <WelcomeSection /> + <SocialLinksSection /> </Layout> |