aboutsummaryrefslogtreecommitdiff
path: root/src/components/PostSummary.astro
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2025-06-11 19:34:34 +0300
committerValentin Popov <valentin@popov.link>2025-06-11 19:34:34 +0300
commit604e507b311171f0f5d914ce28a3d42a2281a5e6 (patch)
tree43395e26f5ddf6dd8ae6c83ba864aeba0e339715 /src/components/PostSummary.astro
parent3d6aedd272a2c73d65ce79036d63e6916e8f71b5 (diff)
downloadpopov.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/components/PostSummary.astro')
-rw-r--r--src/components/PostSummary.astro49
1 files changed, 0 insertions, 49 deletions
diff --git a/src/components/PostSummary.astro b/src/components/PostSummary.astro
deleted file mode 100644
index a3fbb29..0000000
--- a/src/components/PostSummary.astro
+++ /dev/null
@@ -1,49 +0,0 @@
----
-import { type CollectionEntry } from "astro:content";
-import dayjs from "dayjs";
-
-type Props = {
- readonly post: CollectionEntry<"blog">;
-};
-
-const { post } = Astro.props;
-const { remarkPluginFrontmatter } = await post.render();
-const formattedDate = dayjs(post.data.pubDate.toString()).format("MMMM DD, YYYY");
----
-
-<style lang="scss">
- @use "../scss/variables" as *;
-
- a {
- color: $colorText;
- display: block;
- padding-bottom: 3rem;
-
- &:visited {
- color: $colorText;
- }
- }
-
- h2 {
- color: $colorBlossom;
- font-size: 1.25em;
- margin: 0.5em 0;
- }
-
- div {
- font-size: $fontSizeBase * 0.75;
- opacity: 0.5;
- }
-</style>
-
-<a href={`/blog/${post.slug}`}>
- <article>
- <div>
- <time datetime={post.data.pubDate.toISOString()}>{formattedDate}</time>
- <span>•</span>
- <span>{remarkPluginFrontmatter.minutesRead}</span>
- </div>
- <h2>{post.data.title}</h2>
- <p>{post.data.description}</p>
- </article>
-</a>