From ae5793d52c8b186184c074869aab9386f79acadc Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Fri, 9 Feb 2024 14:23:34 +0100 Subject: Add headings to tag pages --- src/templates.ts | 5 +++++ templates/list.html | 6 ++++++ templates/tags.html | 1 + 3 files changed, 12 insertions(+) diff --git a/src/templates.ts b/src/templates.ts index b8139f6..ac58a2c 100644 --- a/src/templates.ts +++ b/src/templates.ts @@ -118,6 +118,11 @@ async function renderListPage(tag: string, posts: Post[]) { const $feed = $(".h-feed"); const $tpl = $(".h-entry").remove(); $(".title").addClass("p-author h-card").attr("rel", "author"); + if (tag === "") { + $(".filter").remove(); + } else { + $(".filter").find("h3").text(`#${tag}`); + } for (const post of posts) { const $post = $tpl.clone(); diff --git a/templates/list.html b/templates/list.html index 5716b06..ffe29f0 100644 --- a/templates/list.html +++ b/templates/list.html @@ -24,6 +24,12 @@
+
+

Tag

+ + Remove filter + +