summaryrefslogtreecommitdiff
path: root/themes/new_theme/layouts/partials/widgets/taglist.html
diff options
context:
space:
mode:
Diffstat (limited to 'themes/new_theme/layouts/partials/widgets/taglist.html')
-rw-r--r--themes/new_theme/layouts/partials/widgets/taglist.html17
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