tagliatelle

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

commit e43f384bb4aabaa636ee1bbc7e8737363ad8783c
parent 243e5f9261fb782cd45b85817da595e4aa920255
Author: breadcat <breadcat@users.noreply.github.com>
Date:   Thu, 26 Feb 2026 12:50:24 +0000

Lowercase filenames in breadcrumbs bar too

Diffstat:
Minclude-templates.go | 3+++
Mtemplates/list.html | 2+-
2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/include-templates.go b/include-templates.go @@ -11,6 +11,9 @@ func InitTemplates() (*template.Template, error) { return template.New("").Funcs(template.FuncMap{ "add": func(a, b int) int { return a + b }, "sub": func(a, b int) int { return a - b }, + "hasPrefix": func(s, prefix string) bool { + return strings.HasPrefix(s, prefix) + }, "hasAnySuffix": func(s string, suffixes ...string) bool { for _, suf := range suffixes { if strings.HasSuffix(strings.ToLower(s), suf) { diff --git a/templates/list.html b/templates/list.html @@ -5,7 +5,7 @@ {{range $index, $crumb := .Breadcrumbs}} {{if ne $index 0}} <span class="breadcrumb-separator">&#9654;</span> {{end}} {{if $crumb.URL}} - <a href="{{$crumb.URL}}">{{$crumb.Name}}</a> + <a href="{{$crumb.URL}}" {{if hasPrefix $crumb.URL "/property/filetype/"}}style="text-transform:lowercase"{{end}}>{{$crumb.Name}}</a> {{else}} <a href="/tags#tag-{{$crumb.Name}}">{{$crumb.Name}}</a> {{end}}