diff options
Diffstat (limited to 'src/components/Sections')
| -rw-r--r-- | src/components/Sections/LatestPosts.astro | 43 | ||||
| -rw-r--r-- | src/components/Sections/SocialLinks.astro | 19 | ||||
| -rw-r--r-- | src/components/Sections/Welcome.astro | 7 |
3 files changed, 69 insertions, 0 deletions
diff --git a/src/components/Sections/LatestPosts.astro b/src/components/Sections/LatestPosts.astro new file mode 100644 index 0000000..e514ff5 --- /dev/null +++ b/src/components/Sections/LatestPosts.astro @@ -0,0 +1,43 @@ +--- +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; +}); + +posts.sort((a, b) => b.data.datePublished.getTime() - a.data.datePublished.getTime()); + +const latestPosts = posts.slice(0, 5); +--- + +<style lang="scss"> + @use "../../scss/variables" as *; + + small { + font-size: $fontSizeBase * 0.75; + opacity: 0.5; + } +</style> + +<section> + <h2>Latest posts <RSSIcon /></h2> + <ul> + { + latestPosts.map((post) => ( + <li> + <a href={`/blog/${post.slug}`} lang={post.data.lang}> + {post.data.title} + </a> + + <small> + <time datetime={post.data.datePublished.toISOString()} lang="en"> + {dayjs(post.data.datePublished.toString()).format("MMMM DD, YYYY")} + </time> + </small> + </li> + )) + } + </ul> +</section> diff --git a/src/components/Sections/SocialLinks.astro b/src/components/Sections/SocialLinks.astro new file mode 100644 index 0000000..c804b60 --- /dev/null +++ b/src/components/Sections/SocialLinks.astro @@ -0,0 +1,19 @@ +--- +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; + } +</style> + +<section> + <div> + <GitHubIcon /> + <LinkedInIcon /> + <EmailIcon /> + </div> +</section> diff --git a/src/components/Sections/Welcome.astro b/src/components/Sections/Welcome.astro new file mode 100644 index 0000000..ee7cae5 --- /dev/null +++ b/src/components/Sections/Welcome.astro @@ -0,0 +1,7 @@ +<section> + <div> + <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> +</section> |
