aboutsummaryrefslogtreecommitdiff
path: root/src/components/Sections
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2025-06-12 02:20:36 +0300
committerValentin Popov <valentin@popov.link>2025-06-12 02:20:36 +0300
commit67f245a48faf6e89989aca2ea571b657fd4c8888 (patch)
tree110c7f4f842d30ef1c79d916d40e143d30adec5a /src/components/Sections
parent16fa8a3b5de7dd7c4fa763fecbba0063f6b4369b (diff)
downloadpopov.link-67f245a48faf6e89989aca2ea571b657fd4c8888.tar.xz
popov.link-67f245a48faf6e89989aca2ea571b657fd4c8888.zip
feat: integrate schema.org support and enhance component structure
- Added schema.org support by introducing `schema-dts` for structured data in components. - Updated `Head`, `BaseLayout`, and various page components to accept and utilize schema props for better SEO. - Created new utility schemas for blog posts and website to standardize structured data implementation. - Enhanced the `SocialLinks` section by utilizing dedicated icon components for improved maintainability. - Refactored the `Header` component to improve accessibility and structure. - Introduced new icons for social links and integrated them into the layout.
Diffstat (limited to 'src/components/Sections')
-rw-r--r--src/components/Sections/LatestPosts.astro10
-rw-r--r--src/components/Sections/SocialLinks.astro42
-rw-r--r--src/components/Sections/Welcome.astro2
3 files changed, 18 insertions, 36 deletions
diff --git a/src/components/Sections/LatestPosts.astro b/src/components/Sections/LatestPosts.astro
index 070dc46..e91cb4c 100644
--- a/src/components/Sections/LatestPosts.astro
+++ b/src/components/Sections/LatestPosts.astro
@@ -1,6 +1,7 @@
---
import { getCollection } from "astro:content";
import dayjs from "dayjs";
+import RSSIcon from "../Icons/RSS.astro";
const posts = await getCollection("blog", ({ data }) => {
return data.draft !== true;
@@ -21,7 +22,7 @@ const latestPosts = posts.slice(0, 5);
</style>
<section>
- <h2>Latest posts</h2>
+ <h2>Latest posts <RSSIcon /></h2>
<ul>
{
latestPosts.map((post) => (
@@ -29,7 +30,12 @@ const latestPosts = posts.slice(0, 5);
<a href={`/blog/${post.slug}`} lang={post.data.lang}>
{post.data.title}
</a>
- <small>{dayjs(post.data.pubDate.toString()).format("MMMM DD, YYYY")}</small>
+
+ <small>
+ <time datetime={post.data.pubDate.toISOString()} lang="en">
+ {dayjs(post.data.pubDate.toString()).format("MMMM DD, YYYY")}
+ </time>
+ </small>
</li>
))
}
diff --git a/src/components/Sections/SocialLinks.astro b/src/components/Sections/SocialLinks.astro
index 53b8243..c804b60 100644
--- a/src/components/Sections/SocialLinks.astro
+++ b/src/components/Sections/SocialLinks.astro
@@ -1,43 +1,19 @@
-<style lang="scss">
- @use "../../scss/variables" as *;
+---
+import GitHubIcon from "../Icons/GitHub.astro";
+import LinkedInIcon from "../Icons/LinkedIn.astro";
+import EmailIcon from "../Icons/Email.astro";
+---
+<style lang="scss">
div {
margin-bottom: 2rem;
}
-
- a {
- display: inline-block;
- margin: 0 0.5rem;
- color: $colorText;
- text-decoration: none;
- }
- a svg {
- vertical-align: middle;
- }
</style>
<section>
<div>
- <a href="https://github.com/valentineus" title="GitHub" target="_blank">
- <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-label="GitHub">
- <path
- d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"
- >
- </path>
- </svg>
- </a>
- <a href="mailto:valentin@popov.link" title="E-Mail" target="_blank">
- <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-label="E-Mail">
- <path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"></path>
- <polyline points="22,6 12,13 2,6"></polyline>
- </svg>
- </a>
- <a href="/feed.xml" title="RSS" target="_blank">
- <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-label="RSS">
- <path d="M4 11a9 9 0 0 1 9 9"></path>
- <path d="M4 4a16 16 0 0 1 16 16"></path>
- <circle cx="5" cy="19" r="1"></circle>
- </svg>
- </a>
+ <GitHubIcon />
+ <LinkedInIcon />
+ <EmailIcon />
</div>
</section>
diff --git a/src/components/Sections/Welcome.astro b/src/components/Sections/Welcome.astro
index 8056202..ee7cae5 100644
--- a/src/components/Sections/Welcome.astro
+++ b/src/components/Sections/Welcome.astro
@@ -1,6 +1,6 @@
<section>
<div>
- <h1>Hi, I'm Valentin Popov 👋</h1>
+ <h1>Hi, I'm Valentin 👋</h1>
<p>I'm a professional software developer currently working as a project manager and team lead. On my personal website, I share thoughts on tech, leadership, and digital life.</p>
<p>Welcome, and feel free to explore!</p>
</div>