Present tags more nicely
This commit is contained in:
parent
cbe455b566
commit
f8060fbef6
@ -20,7 +20,9 @@
|
||||
<a href="{{ .URL }}">{{ niceURL .URL }}</a>
|
||||
</td>
|
||||
<td>
|
||||
{{ join .Tags ", " }}
|
||||
{{ range .Tags }}
|
||||
<span class="label primary">{{ . }}</span>
|
||||
{{ end }}
|
||||
</td>
|
||||
<td class="show-for-large">{{ (nicetime .TimestampCreated).HumanDuration }} ago</td>
|
||||
<td class="show-for-large">{{ (nicetime .TimestampLastScraped).HumanDuration }} ago</td>
|
||||
|
@ -12,11 +12,12 @@
|
||||
<div class="small-12 large-6 cell">
|
||||
{{ range .tags }}
|
||||
<a href="#"
|
||||
class=""
|
||||
title="remove {{ . }}"
|
||||
hx-trigger="click"
|
||||
hx-target="#label-widget"
|
||||
hx-post="/tags?remove={{ . }}">[-]</a>
|
||||
{{ . }}
|
||||
<span class="label primary">{{ . }}</span>
|
||||
|
||||
{{ end }}
|
||||
<input type="hidden" name="tags_hidden" value="{{ .tags_hidden }}">
|
||||
|
@ -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{}
|
||||
|
Loading…
x
Reference in New Issue
Block a user