Skip to content

Commit

Permalink
holy cow this actually got on HN
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewDTR committed Oct 21, 2024
1 parent 9da644b commit 62f04bd
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/layouts/Blog.astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import BaseLayout from "./BaseLayout.astro";
const { frontmatter } = Astro.props;
const hasTags = frontmatter.tags && frontmatter.tags.length > 0;
const imgLink = `${Astro.site.origin}/og${Astro.url.pathname.replace(/\/$/, "")}.png`;
const hasDiscussion = frontmatter.discussion && frontmatter.discussion_link;
---

<BaseLayout
Expand Down Expand Up @@ -34,6 +35,18 @@ const imgLink = `${Astro.site.origin}/og${Astro.url.pathname.replace(/\/$/, "")}
)
}

{
hasDiscussion && (
<p class="discussion">
<i class="fa-solid fa-comment" />
Discussion:
<a href={frontmatter.discussion_link} class="discussion-link">
{frontmatter.discussion}
</a>
</p>
)
}

<hr class="custom-hr" style="margin-top: 25px;" />
</div>

Expand Down Expand Up @@ -75,6 +88,7 @@ const imgLink = `${Astro.site.origin}/og${Astro.url.pathname.replace(/\/$/, "")}

.tags {
margin-top: 3px;
margin-bottom: 0px;
}

.content {
Expand All @@ -97,5 +111,9 @@ const imgLink = `${Astro.site.origin}/og${Astro.url.pathname.replace(/\/$/, "")}
.tag-code:hover {
background-color: #555f6a;
}

.discussion {
margin-top: 4px;
}
</style>
</BaseLayout>
2 changes: 2 additions & 0 deletions src/pages/blog/upl-people-counter.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ pubDate: "2024-10-14"
subtitle: "who knew figuring out the lab's occupancy would be so much work?!"
tags: ["projects", "python", "js", "upl"]
author: "Andrew"
discussion: "Hacker News"
discussion_link: "https://news.ycombinator.com/item?id=41907360"
---

## A History of UPL's Cameras
Expand Down

0 comments on commit 62f04bd

Please sign in to comment.