Skip to content

Commit a8171ae

Browse files
committed
feat: automatically show popup if there is a markdown post with the popup frontmatter attribute set to true
1 parent 2719ab6 commit a8171ae

3 files changed

Lines changed: 9 additions & 4 deletions

File tree

src/components/Popup.astro

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ const { text, href } = Astro.props;
55
<div
66
class="sticky bottom-4 z-50 flex items-center justify-between gap-4 rounded-lg dark:bg-gray-100 bg-gray-900 px-5 py-3 dark:text-gray-900 text-gray-100"
77
>
8-
<a href={href} target="_blank" rel="noreferrer" class="text-sm font-medium hover:opacity-75">
8+
👋
9+
<a href={href} class="text-sm font-medium hover:opacity-75">
910
{text}
1011
</a>
1112

src/pages/blog/internships.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
---
22
layout: ../../layouts/PostLayout.astro
3-
title: "Internships and entry level positions"
3+
title: 'Internships and entry level positions'
44
pubDate: 2023-07-03
5-
description: "Seeking challenging internships and entry-level positions to apply and enhance my coding skills"
6-
tags: ["internships", "work"]
5+
description: 'Seeking challenging internships and entry-level positions to apply and enhance my coding skills'
6+
tags: ['internships', 'work']
7+
draft: true
8+
popup: true
79
---
810

911
Hi! My name is Milan, I'm a motivated and ambitious second-year CS student with a strong desire to gain practical experience in the field. Seeking challenging internships and entry-level positions to apply and enhance my coding skills, contribute to real-world projects, and learn from industry professionals. Committed to delivering high-quality work, collaborating effectively in team environments, and continuously expanding my knowledge. If you think I'd be a good fit in your team, contact me at milanherke@protonmail.com!

src/pages/index.astro

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@ const orderedPosts = nonDraftPosts.sort((a, b) => {
1313
const bDate = new Date(b.frontmatter.pubDate);
1414
return bDate.valueOf() - aDate.valueOf();
1515
});
16+
const popupPost = orderedPosts.find((post) => post.frontmatter.popup);
1617
---
1718

1819
<BaseLayout title="Milán Herke - Software engineer">
1920
<Navbar />
2021
<About />
2122
<LatestBlogPost post={orderedPosts[0]} />
2223
<Projects />
24+
{popupPost && <Popup text={popupPost.frontmatter.description} href={popupPost.url} />}
2325
</BaseLayout>

0 commit comments

Comments
 (0)