Replace /journal with tags

There's unfortunately still an issue when a post has too many tags and is viewed on mobile: the tags can overflow, see TODO.
This commit is contained in:
ekzyis 2025-11-28 00:13:41 +01:00
parent 8e0dea515e
commit 9583c26a0d
37 changed files with 73 additions and 34 deletions

View File

@ -2,6 +2,7 @@
title: 4_F4ll_GuY_0x01.md
date: 2024-03-07T15:30:29.003Z
sn_id: 454525
tags: mostly-harmless
---
---------DISCLAIMER BEGIN---------

View File

@ -3,6 +3,7 @@ title: 4_F4ll_GuY_0x02.md
date: 2024-03-21T22:46:03.079Z
banner: fall-guy.webp
sn_id: 474909
tags: mostly-harmless
---
[_click here for part 1_](/4-f4ll-guy-0x01)

View File

@ -2,6 +2,7 @@
title: I just failed my PPL theoretical exam pre-test—AMA!
date: 2025-10-30
sn_id: 1269593
tags: flying
---
Welcome to [~flying](https://stacker.news/~flying)!

View File

@ -2,6 +2,7 @@
title: A girl told me she likes my shoes, gotta talk about it
date: 2025-10-26
sn_id: 1265480
tags: mostly-harmless
---
I think I just fell in love with a girl I just met at a kebap place. I just came back and gotta talk about it while it's still fresh:

View File

@ -3,6 +3,7 @@ title: About
date: 2024-04-13T12:27:51.281Z
banner: psychedelic-digital-sky.webp
sn_id: 505345
tags: mostly-harmless
---
Hi, I'm ek. I guess this is the part where I introduce myself in an interesting and unique way such that reading this is worth your time and you don't immediately leave. [Attention is a scarce resource](https://en.wikipedia.org/wiki/Attention_economy) after all.

View File

@ -3,6 +3,7 @@ title: Between Moments of Wonder and Euphoria
date: 2024-07-13
banner: landscape.webp
sn_id: 607554
tags: mostly-harmless
---
## A Mostly Harmless Substance

View File

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 69 KiB

View File

@ -2,6 +2,7 @@
title: Confession
date: 2025-05-15
sn_id: 981392
tags: journal
---
Dear Journal,

View File

@ -2,6 +2,7 @@
title: Demystifying WireGuard and iptables
date: 2023-08-09
sn_id: 221471
tags: networking,wireguard
---
# introduction

View File

@ -2,6 +2,7 @@
title: I signed up for flight school
date: 2025-09-22
sn_id: 1232455
tags: flying
---
![](./plane.webp)

View File

@ -2,6 +2,7 @@
title: HTMX Intrigue
date: 2024-06-07T06:48:38.417Z
sn_id: 564849
tags: dev
---
> ### htmx in a nutshell

View File

@ -3,6 +3,7 @@ title: I miss her
date: 2025-05-10
sn_id: 977206
banner: remember.webp
tags: journal
---
I've been reading [@plebpoet](https://stacker.news/plebpoet)'s [journal](https://www.plebpoet.com/journal.html). I'll write a few words every now and then and hope they survive.

View File

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 69 KiB

View File

@ -2,6 +2,7 @@
title: internet feelings
date: 2024-11-19T20:09:04.857Z
sn_id: 774628
tags: poetry
---
Heres a [little poem](https://stacker.news/items/621774) I wrote while I was in Nashville for the Bitcoin Circlejerk 2024. I came up with it because I felt a little lost, as I often do around people, but this time I felt especially lost because I had to walk home in the dark for an hour, and my phones battery was almost dead. My VISA card was declined by Uber for no apparent reason.

View File

@ -3,6 +3,7 @@ title: LaTeX Template for Bitcoin Multi-Signature Wallets
date: 2023-05-23
url: https://gist.github.com/ekzyis/7736e2446dbb8ed2cdb587071c42380b
sn_id: 1064197
tags: bitcoin
---
I created a LaTeX template to backup all cosigners of a bitcoin m-of-n [multi-signature](https://en.bitcoin.it/wiki/Multi-signature) wallet:

View File

@ -3,6 +3,7 @@ title: Life is about Awareness
date: 2024-02-05
sn_id: 413652
banner: palebluedot.webp
tags: mostly-harmless
---
> Some say we're never meant to grow up

View File

@ -2,6 +2,7 @@
title: How to encrypt and decrypt files using openssl and a password
date: 2025-04-07
sn_id: 937345
tags: crypto,openssl
---
Every time I feel like I should save something encrypted—especially because my [NixOS installation is not using FDE](https://nixos.wiki/wiki/Full_Disk_Encryption), but that's a story for another day—, I realize I have no idea how to do this except that it should be possible with `openssl` which is quite embarrassing as the founder of ~crypto and ~security.

View File

@ -2,6 +2,7 @@
title: Post-Quantum TLS vs. MTU?
date: 2025-07-13
sn_id: 1037999
tags: networking,wireguard,crypto
---
**Update Aug 07, 2025:**

View File

@ -2,6 +2,7 @@
title: Mercy for My Flight Radiotelephone Operator's Certificate
date: 2025-11-13
sn_id: 1281843
tags: flying
---
![](./certificate.webp)

View File

@ -2,6 +2,7 @@
title: I'm learning how to fly because I'm ready to die
date: 2025-11-18
sn_id: 1285081
tags: flying
---
With my first flight lessons getting closer, I keep thinking about what my first takeoff will be like. Going down the runway at full throttle for the first time, I'll probably already feel like I'm about to die.

View File

@ -2,6 +2,7 @@
title: Stephanie
date: 2025-05-22
sn_id: 987273
tags: journal
---
Dear Journal,

View File

@ -2,6 +2,7 @@
title: The Beauty of FOSS
date: 2025-05-16
sn_id: 982124
tags: journal
---
Dear Journal,

View File

@ -2,6 +2,7 @@
title: The Curious Case of Digital Signatures
date: 2024-02-24T23:53:31.373Z
sn_id: 436752
tags: crypto
---
# Good questions demand good answers

View File

@ -2,6 +2,7 @@
title: The View from Halfway Down
date: 2024-01-23
sn_id: 398641
tags: zap-to-zero
---
![](https://www.youtube.com/watch?v=u1_EBSlnDlU)

View File

@ -2,6 +2,7 @@
title: The Waymo Experience
date: 2025-05-12
sn_id: 978850
tags: journal
---
> My words echo in my head

View File

Before

Width:  |  Height:  |  Size: 107 KiB

After

Width:  |  Height:  |  Size: 107 KiB

View File

Before

Width:  |  Height:  |  Size: 438 KiB

After

Width:  |  Height:  |  Size: 438 KiB

View File

@ -3,6 +3,7 @@ title: Trust Is the Scaling Solution
date: 2025-05-13
banner: colorado.webp
sn_id: 979677
tags: journal
---
This starts to feel like work, but I think it's going to pay off.

View File

Before

Width:  |  Height:  |  Size: 469 KiB

After

Width:  |  Height:  |  Size: 469 KiB

View File

@ -2,6 +2,7 @@
title: WireGuard Packet Forwarding
date: 2023-08-21
sn_id: 230179
tags: networking,wireguard
---
# introduction

View File

@ -2,6 +2,7 @@
title: WireGuard Port Forwarding
date: 2023-09-25
sn_id: 265524
tags: networking,wireguard
---
# introduction

View File

@ -4,8 +4,6 @@
<nav class="mb-3 sm:px-3 text-sm">
<a href="/">ekzyis</a>
<div class="flex float-right items-center">
<a class="px-2" href="/journal">Journal</a>
<span>|</span>
<a class="px-2" href="/about/">About</a>
</div>
</nav>

View File

@ -1,8 +1,15 @@
{{ define "post/list" }}
<article class="post-item{{ if .Hidden }} !hidden{{ end }}">
<div>
<h4 class="post-item-title">
<a href="/{{ .URL }}/">{{ .Title }}</a>
</h4>
<div class="post-item-tags mt-1">
{{ range .Tags }}
{{ if . }}<span>{{ . }}</span>{{ end }}
{{ end }}
</div>
</div>
<time class="post-item-meta" datetime="{{ formatTime .Time "2006-01-02T15:04:05Z" }}">
{{ formatTime .Time "2 Jan 2006" }}
</time>

View File

@ -24,6 +24,11 @@
<time datetime="{{ formatTime .Time "2006-01-02T15:04:05Z" }}" itemprop="datePublished">
{{ formatTime .Time "Jan 2, 2006" }}
</time>
<div class="post-item-tags mx-1">
{{ range .Tags }}
{{ if . }}<span>{{ . }}</span>{{ end }}
{{ end }}
</div>
</div>
</header>
<div class="post-content">

View File

@ -12,6 +12,8 @@
--post-header-color: #eaeaea;
--quote-color: #9b9ba3;
--quote-border-color: #4a4d56;
--tag-background-color: hsla(0, 0%, 100%, .1); /* #4a4d56; */
--tag-color: #969696;
--footer-color: #767f87;
--footnotes-color: #767f87;
}

View File

@ -31,10 +31,14 @@
}
.post-meta {
display: flex;
align-items: center;
gap: .3rem;
color: var(--post-meta-color);
padding-top: 3px;
line-height: 1.2;
font-size: 0.875rem;
text-wrap: nowrap; /* TODO: tags can overflow on mobile instead of wrapping to next line */
}
.post-content {
@ -125,6 +129,24 @@
border-top: none;
}
.post-item-title {
display: flex;
align-items: center;
}
.post-item-tags {
display: flex;
font-size: 0.7rem;
gap: .2rem;
}
.post-item-tags > span {
background-color: var(--tag-background-color);
padding: .125rem .25rem;
border-radius: .25rem;
color: var(--tag-color);
}
.post-item-meta {
text-wrap: nowrap;
color: var(--post-meta-color);

View File

@ -33,6 +33,7 @@ type Post struct {
Hidden bool
URL string
Banner string
Tags []string
SnId int
Comments int
Sats int
@ -140,18 +141,11 @@ func walkMarkdownContent() ([]string, error) {
return args, nil
}
blogFiles, err := filepath.Glob(filepath.Join(contentDir, "*", "index.md"))
files, err := filepath.Glob(filepath.Join(contentDir, "*", "index.md"))
if err != nil {
return nil, err
}
journalFiles, err := filepath.Glob(filepath.Join(contentDir, "journal", "*", "index.md"))
if err != nil {
return nil, err
}
files := append(blogFiles, journalFiles...)
return files, nil
}
@ -208,6 +202,10 @@ func parsePost(path string) (*Post, error) {
// banner
banner, _ := frontmatter["banner"].(string)
// tags
rawTags, _ := frontmatter["tags"].(string)
tags := strings.Split(rawTags, ",")
// stacker news
snId, _ := frontmatter["sn_id"].(int)
var comments, sats int
@ -260,6 +258,7 @@ func parsePost(path string) (*Post, error) {
Time: time,
Hidden: hidden,
Banner: banner,
Tags: tags,
SnId: snId,
Comments: comments,
Sats: sats,
@ -293,31 +292,11 @@ func executeTemplates(posts []Post) error {
return fmt.Errorf("error parsing templates: %v", err)
}
var blogPosts []Post
var journalPosts []Post
for _, post := range posts {
if !strings.Contains(post.Path, "/journal/") {
blogPosts = append(blogPosts, post)
} else {
journalPosts = append(journalPosts, post)
}
}
err = executeIndexTemplate(tmpl, "public/index.html", blogPosts)
err = executeIndexTemplate(tmpl, "public/index.html", posts)
if err != nil {
return fmt.Errorf("error executing index template: %v", err)
}
journalDir := filepath.Join("public", "journal")
err = os.MkdirAll(journalDir, 0755)
if err != nil {
return fmt.Errorf("error creating directory for journal: %v", err)
}
err = executeIndexTemplate(tmpl, "public/journal/index.html", journalPosts)
if err != nil {
return fmt.Errorf("error executing journal index template: %v", err)
}
err = executeErrorTemplate(tmpl)
if err != nil {
return fmt.Errorf("error executing error template: %v", err)