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/components/PostElement.astro | 4 ++ src/components/PostSummary.astro | 49 ---------------------- src/components/Sections/SocialLinks.astro | 70 +++++++++++++++++++++++++++++++ src/components/Sections/Welcome.astro | 10 +++++ src/pages/index.astro | 15 ++----- 5 files changed, 88 insertions(+), 60 deletions(-) delete mode 100644 src/components/PostSummary.astro create mode 100644 src/components/Sections/SocialLinks.astro create mode 100644 src/components/Sections/Welcome.astro diff --git a/src/components/PostElement.astro b/src/components/PostElement.astro index e213ce7..e5a9c50 100644 --- a/src/components/PostElement.astro +++ b/src/components/PostElement.astro @@ -14,6 +14,10 @@ const formattedDate = dayjs(post.data.pubDate.toString()).format("MMMM DD, YYYY" - - -
-
- - - {remarkPluginFrontmatter.minutesRead} -
-

{post.data.title}

-

{post.data.description}

-
-
diff --git a/src/components/Sections/SocialLinks.astro b/src/components/Sections/SocialLinks.astro new file mode 100644 index 0000000..dbad5ef --- /dev/null +++ b/src/components/Sections/SocialLinks.astro @@ -0,0 +1,70 @@ + + +
+
+ + + + + + + + + + + + + + + + + + + +
+
diff --git a/src/components/Sections/Welcome.astro b/src/components/Sections/Welcome.astro new file mode 100644 index 0000000..5d64206 --- /dev/null +++ b/src/components/Sections/Welcome.astro @@ -0,0 +1,10 @@ +
+
+

Hi, I'm Valentin Popov 👋

+

+ I'm a professional software developer currently working as a project manager and team lead. On my personal + website, I share insights, ideas, and articles on software development, leadership, and the digital world. +

+

Welcome, and feel free to explore!

+
+
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