about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorAlan Pearce2024-02-09 14:23:34 +0100
committerAlan Pearce2024-02-09 14:23:34 +0100
commitae5793d52c8b186184c074869aab9386f79acadc (patch)
tree22c58e084f692c231c3aeeef99d45602c6f441fc /src
parent7d44ee8ea40647f914893d96728612f38fbd91e2 (diff)
downloadwebsite-ae5793d52c8b186184c074869aab9386f79acadc.tar.lz
website-ae5793d52c8b186184c074869aab9386f79acadc.tar.zst
website-ae5793d52c8b186184c074869aab9386f79acadc.zip
Add headings to tag pages
Diffstat (limited to 'src')
-rw-r--r--src/templates.ts5
1 files changed, 5 insertions, 0 deletions
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();