summaryrefslogtreecommitdiff
path: root/themes/new_theme/layouts/partials/widgets/taglist.html
blob: 9b6046b62e56e798bb99a3c831c74e4af4847f04 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{{- $tags := .Site.Taxonomies.tags }}
{{- if gt (len $tags) 0 }}
<div class="widget-taglist widget">
	<h4 class="widget__title">{{ T "tags_title" }}</h4>
	<div class="widget__content">
	{{- 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 }}