tagliatelle

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit f5dc905ae2d88df7b55e6213452ca9cb66d34c5c
parent c2fd9a8c62663cdb1c873949a1ccff81d9b518ea
Author: breadcat <breadcat@users.noreply.github.com>
Date:   Tue, 30 Jun 2026 09:56:18 +0100

Truncate nav lists if over 65 entries

Diffstat:
Mtemplates/_header.html | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/templates/_header.html b/templates/_header.html @@ -21,7 +21,11 @@ {{range $cat, $tags := .Tags}}<li> <a href="/tags#tag-{{$cat}}">{{$cat}}</a> <ul> - {{range $tags}}<li><a href="/tag/{{$cat}}/{{.Value}}">{{.Value}} ({{.Count}})</a></li> + {{if gt (len $tags) 65}} + <li><a href="/tags#tag-{{$cat}}">{{len $tags}} entries...</a></li> + {{else}} + {{range $tags}}<li><a href="/tag/{{$cat}}/{{.Value}}">{{.Value}} ({{.Count}})</a></li> + {{end}} {{end}}<li><a href="/tag/{{$cat}}/previews">Previews</a></li> <li><a href="/tag/{{$cat}}/unassigned">Unassigned</a></li> </ul>