diff options
Diffstat (limited to 'internal/web/templates.go')
| -rw-r--r-- | internal/web/templates.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/internal/web/templates.go b/internal/web/templates.go index f322ccc..1e17654 100644 --- a/internal/web/templates.go +++ b/internal/web/templates.go @@ -99,6 +99,8 @@ var funcs = template.FuncMap{ return *p }, "lower": strings.ToLower, + // hasPrefix marks the current dashboard tab: {{if hasPrefix .Path "/b/x/posts"}} + "hasPrefix": strings.HasPrefix, // dict builds a map for passing several values to a partial: {{template "x" (dict "a" 1 "b" 2)}} "dict": func(kv ...any) (map[string]any, error) { if len(kv)%2 != 0 { |
