diff options
author | Alan Pearce | 2024-02-09 14:23:34 +0100 |
---|---|---|
committer | Alan Pearce | 2024-02-09 14:23:34 +0100 |
commit | ae5793d52c8b186184c074869aab9386f79acadc (patch) | |
tree | 22c58e084f692c231c3aeeef99d45602c6f441fc /src | |
parent | 7d44ee8ea40647f914893d96728612f38fbd91e2 (diff) | |
download | website-ae5793d52c8b186184c074869aab9386f79acadc.tar.lz website-ae5793d52c8b186184c074869aab9386f79acadc.tar.zst website-ae5793d52c8b186184c074869aab9386f79acadc.zip |
Add headings to tag pages
Diffstat (limited to 'src')
-rw-r--r-- | src/templates.ts | 5 |
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(); |