all repos — website @ ae5793d52c8b186184c074869aab9386f79acadc

My website

Add headings to tag pages

Alan Pearce
commit

ae5793d52c8b186184c074869aab9386f79acadc

parent

7d44ee8ea40647f914893d96728612f38fbd91e2

3 files changed, 12 insertions(+), 0 deletions(-)

changed files
M src/templates.tssrc/templates.ts
@@ -118,6 +118,11 @@ );
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();
M templates/list.htmltemplates/list.html
@@ -24,6 +24,12 @@ <a href="/">Home</a>
</nav> </header> <main id="content"> + <div class="filter"> + <h3>Tag</h3> + <small> + <a href="../">Remove filter</a> + </small> + </div> <ul class="h-feed"> <li class="h-entry"> <span>
M templates/tags.htmltemplates/tags.html
@@ -24,6 +24,7 @@ <a href="/">Home</a>
</nav> </header> <main id="content"> + <h3 style="margin-bottom: 0">Tags</h3> <ul class="tags"> <li class="h-feed"> <a href="/tags/tag">#tag</a>