diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2020-06-05 16:57:53 +0200 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2020-06-05 16:57:53 +0200 |
commit | 983b64ca51f5e769f790a5ebc55e3808157b8d94 (patch) | |
tree | 4fb52d8e2f449e44a51ed0549cec9debbcd3d157 /themes/new_theme/layouts/partials/widgets/taglist.html | |
parent | ff7e6bde0be9ac60e694097ce3598f9b552c4807 (diff) | |
download | www-andreasbaumann-cc-983b64ca51f5e769f790a5ebc55e3808157b8d94.tar.gz www-andreasbaumann-cc-983b64ca51f5e769f790a5ebc55e3808157b8d94.tar.bz2 |
updated to newest theme supporting newer hugo versions
Diffstat (limited to 'themes/new_theme/layouts/partials/widgets/taglist.html')
-rw-r--r-- | themes/new_theme/layouts/partials/widgets/taglist.html | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/themes/new_theme/layouts/partials/widgets/taglist.html b/themes/new_theme/layouts/partials/widgets/taglist.html index 966205a..9b6046b 100644 --- a/themes/new_theme/layouts/partials/widgets/taglist.html +++ b/themes/new_theme/layouts/partials/widgets/taglist.html @@ -1,14 +1,15 @@ -{{- if .Site.Params.widgets.tags }} -{{- if isset .Site.Taxonomies "tags" }} -{{- if not (eq (len .Site.Taxonomies.tags) 0) }} +{{- $tags := .Site.Taxonomies.tags }} +{{- if gt (len $tags) 0 }} <div class="widget-taglist widget"> - <h4 class="widget__title">Tags</h4> + <h4 class="widget__title">{{ T "tags_title" }}</h4> <div class="widget__content"> - {{- range $name, $items := .Site.Taxonomies.tags }} - <a class="widget__link widget__link--taglist" href="{{ $.Site.BaseURL }}tags/{{ $name | urlize | lower }}" title="{{ $name }}">{{ $name }}</a> + {{- range $name, $taxonomy := $tags }} + {{- with $.Site.GetPage (printf "/tags/%s" $name) }} + <a class="widget-taglist__link widget__link btn" href="{{ .RelPermalink }}" title="{{ .Title }}"> + {{- .Title -}}{{- if .Site.Params.widgets.tags_counter }} ({{ $taxonomy.Count }}){{ end -}} + </a> {{- end }} + {{- end }} </div> </div> {{- end }} -{{- end }} -{{- end }}
\ No newline at end of file |