Skip to content

Commit

Permalink
Add tag pages
Browse files Browse the repository at this point in the history
  • Loading branch information
cy-by committed Sep 15, 2024
1 parent 8bd4db8 commit 82c9a66
Show file tree
Hide file tree
Showing 8 changed files with 69 additions and 29 deletions.
6 changes: 0 additions & 6 deletions about.md

This file was deleted.

21 changes: 21 additions & 0 deletions index.liquid
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
title: index
layout: layout.liquid
---

<h1>Posts</h1>

<ul class="post-list">
{%- for post in collections.post reversed -%}
<li>
<a class="post-link" href="{{ post.url }}">{{ post.data.title }}</a>
<time>{{ post.data.date | date: "%B %e, %Y"}}</time>
<ul class="tag-list">
<li aria-hidden="true">🔖</li>
{%- for tag in post.data.tags -%}
<li><a href="/tags/{{ tag }}">{{ tag }}</a></li>
{%- endfor %}
</ul>
</li>
{%- endfor %}
</ul>
16 changes: 0 additions & 16 deletions index.md

This file was deleted.

2 changes: 1 addition & 1 deletion posts/make-node-list-an-array.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
date: 2019-12-07
tags: ['JavaScript']
tags: javascript
title: Make node list into an array
description: "Make iterating through a set of DOM nodes easy by turning a Node List into an array."
---
Expand Down
2 changes: 1 addition & 1 deletion posts/nested-destructuring.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Nested Destructuring
date: 2019-06-22
tags: JavaScript
tags: javascript
description: "I always forget the syntax for nested object destructuring. So I wrote this article so that I don't forget again."
---

Expand Down
2 changes: 1 addition & 1 deletion posts/visual-studio-code-setup/visual-studio-code-setup.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
date: 2020-03-02
tags: ['VSCode', 'Setup', 'Productivity']
tags: ['vscode', 'setup', 'productivity']
title: Visual Studio Code Setup
description: "I've been using Visual studio code since 2017, I decided to look through my set up and document what I use."
---
Expand Down
32 changes: 28 additions & 4 deletions styles/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -218,17 +218,27 @@ nav {
padding: 0;
text-wrap: balance;

li {
> li {
display: flex;
flex-direction: column;
}

a {
> li + li {
margin-block-start: 1.5rem;
}

.post-link {
font-size: clamp(2rem, 5vi, 4rem);
font-weight: 800;
letter-spacing: -0.08rem;
text-decoration-thickness: 7%;
text-decoration-color: light-dark(var(--dark-red), var(--yellow));
text-decoration-color: LinkText;
color: currentColor;

&:visited {
text-decoration-color: VisitedText;
color: currentColor;
}

/* TODO: Decide on hover styling */
&:hover,
Expand All @@ -238,7 +248,21 @@ nav {
}

time {
font-size: 1rem;
font-size: 0.8rem;
/* color: light-dark(var(--dark-red), var(--yellow)); */
font-style: italic;
}
}

.tag-list {
display: flex;
align-items: center;
list-style: none;
padding: 0;
text-wrap: balance;

> li + li {
margin-inline-start: 0.5rem;
}
}

Expand Down
17 changes: 17 additions & 0 deletions tags/tags.liquid
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
pagination:
data: collections
size: 1
alias: tag
permalink: /tags/{{ tag }}/
layout: layout.liquid
---

<h1>Tagged "{{ tag }}"</h1>

<ul>
{% assign taglist = collections[tag] %}
{% for post in taglist reversed %}
<li><a href="{{ post.url }}">{{ post.data.title }}</a></li>
{% endfor %}
</ul>

0 comments on commit 82c9a66

Please sign in to comment.