Skip to content

Commit

Permalink
update .gitignore and remove .obsidian/
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewDTR committed Oct 12, 2024
1 parent b36cae6 commit 54350ac
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 24 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ pnpm-debug.log*

# jetbrains setting folder
.idea/

# obsidian
.obsidian/
3 changes: 1 addition & 2 deletions src/components/Header.astro
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ const currentPath = Astro.url.pathname;
</svg>
<b class="no-underline">Andrew Moses</b>
</a>
<a class={currentPath === "/blog" ? "nav bold" : "nav"} href="/blog"
>Blog</a
<a class={currentPath === "/blog" ? "nav bold" : "nav"} href="/blog">Blog</a
>
<a class="nav" href="/resume.pdf">Resume</a>
<!-- <a class={currentPath === "/about" ? "nav bold" : "nav"} href="/about">About</a> -->
Expand Down
46 changes: 26 additions & 20 deletions src/pages/blog.astro
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ const allPosts = await Astro.glob("./blog/*.md");
function groupPostsByYearAndMonth(posts) {
const grouped = {};
posts.forEach(post => {
posts.forEach((post) => {
const date = new Date(post.frontmatter.date);
const year = date.getFullYear();
const month = date.toLocaleString('default', { month: 'long' });
const month = date.toLocaleString("default", { month: "long" });
const key = `${year}-${month}`;
if (!grouped[key]) {
Expand All @@ -21,27 +21,33 @@ function groupPostsByYearAndMonth(posts) {
}
const groupedPosts = groupPostsByYearAndMonth(allPosts);
const sortedKeys = Object.keys(groupedPosts).sort((a, b) => new Date(b) - new Date(a)); // Sort keys in reverse order
const sortedKeys = Object.keys(groupedPosts).sort(
(a, b) => new Date(b) - new Date(a)
); // Sort keys in reverse order
---

<BaseLayout>
{sortedKeys.map((key) => {
const [year, month] = key.split("-");
return (
<section key={key}>
<h2 style="margin-bottom: 0px;">{month} {year}</h2>
<ul style="margin-top: 4px;">
{groupedPosts[key].map((post) => (
<li key={post.url}>
<a href={post.url} class="blog-link">
{post.frontmatter.title} - <i>{post.frontmatter.subtitle}</i>
</a>
</li>
))}
</ul>
</section>
);
})}
{
sortedKeys.map((key) => {
const [year, month] = key.split("-");
return (
<section key={key}>
<h2 style="margin-bottom: 0px;">
{month} {year}
</h2>
<ul style="margin-top: 4px;">
{groupedPosts[key].map((post) => (
<li key={post.url}>
<a href={post.url} class="blog-link">
{post.frontmatter.title} - <i>{post.frontmatter.subtitle}</i>
</a>
</li>
))}
</ul>
</section>
);
})
}
</BaseLayout>

<style>
Expand Down
6 changes: 5 additions & 1 deletion src/pages/blog/upl-people-counter.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,8 @@ There's no doubt that as far back as IRC, members of the UPL messaged each other

Well, myself, in collaboration with other UPL members, decided to fix this issue in, perhaps, the most CS-student-esque way possible: an automated system to identify the exact number of people in the lab.

(rest of article to come here soon! sorry for the wait!)
## Switching to door sensing

This worked perfectly for a while -- people would check the Discord channel name and see an estimated count of the number of people in the room. If it said "zero people", they could infer that the UPL wasn't open.

However, this solution started presenting issues. For one, having people in the room didn't necessarily indicate that the UPL was open -- there could be a meeting, or a separate gathering where the doors were closed and people weren't allowed inside. This was confusing to people who might have seen
2 changes: 1 addition & 1 deletion src/pages/posts/blog1.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ subtitle: "This is the first blog post"

# Hello World

Lorem ipsum odor amet, consectetuer adipiscing elit. Sem ac proin erat; efficitur maecenas lobortis tempus. Sed duis euismod ultricies netus arcu magnis rutrum velit. Hac himenaeos finibus lacus nascetur curabitur ornare montes. Nibh ullamcorper risus ligula, leo mauris scelerisque ex felis. Sed pretium gravida volutpat semper nisl primis pellentesque eu torquent. Tempus vulputate efficitur etiam class diam sapien potenti?
Lorem ipsum odor amet, consectetuer adipiscing elit. Sem ac proin erat; efficitur maecenas lobortis tempus. Sed duis euismod ultricies netus arcu magnis rutrum velit. Hac himenaeos finibus lacus nascetur curabitur ornare montes. Nibh ullamcorper risus ligula, leo mauris scelerisque ex felis. Sed pretium gravida volutpat semper nisl primis pellentesque eu torquent. Tempus vulputate efficitur etiam class diam sapien potenti?

```js
for i in range(0,5)
Expand Down

0 comments on commit 54350ac

Please sign in to comment.