From f8060fbef6c4332ff8c3fc9b22a67556b5c8b030 Mon Sep 17 00:00:00 2001 From: Justin Hawkins Date: Fri, 27 May 2022 22:00:24 +0930 Subject: [PATCH] Present tags more nicely --- web/templates/manage.html | 4 +++- web/templates/tags_widget.html | 3 ++- web/web.go | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/web/templates/manage.html b/web/templates/manage.html index 8b83596..2aa11b8 100644 --- a/web/templates/manage.html +++ b/web/templates/manage.html @@ -20,7 +20,9 @@ {{ niceURL .URL }} - {{ join .Tags ", " }} + {{ range .Tags }} + {{ . }} + {{ end }} {{ (nicetime .TimestampCreated).HumanDuration }} ago {{ (nicetime .TimestampLastScraped).HumanDuration }} ago diff --git a/web/templates/tags_widget.html b/web/templates/tags_widget.html index 1df50fc..4788eed 100644 --- a/web/templates/tags_widget.html +++ b/web/templates/tags_widget.html @@ -12,11 +12,12 @@
{{ range .tags }} [-] - {{ . }} + {{ . }} {{ end }} diff --git a/web/web.go b/web/web.go index 034170b..55d00d8 100644 --- a/web/web.go +++ b/web/web.go @@ -250,7 +250,7 @@ func cleanupTags(tags []string) []string { keys := make(map[string]struct{}) for _, k := range tags { if k != "" && k != "|" { - keys[k] = struct{}{} + keys[strings.ToLower(k)] = struct{}{} } } out := []string{}