{{ if .Site.Params.widgets.tags }}
{{ if isset .Site.Taxonomies "tags" }}
{{ if not (eq (len .Site.Taxonomies.tags) 0) }}
<div class="panel sidebar-menu">

    <div class="panel-heading">
        <h3 class="panel-title">{{ i18n "tagsTitle" }}</h3>
    </div>

    <div class="panel-body">
        <ul class="tag-cloud">
            {{ $current := . }}
            {{ range $name, $items := .Site.Taxonomies.tags }}
            <li{{ if eq $current.RelPermalink ($name | urlize | lower | printf "/tags/%s/") }} class="active"{{ end }}>
                <a href="{{ "tags/" | relURL }}{{ $name | urlize | lower }}"><i class="fas fa-tags"></i> {{ $name }}</a>
            </li>
            {{ end }}
        </ul>
    </div>

</div>
{{ end }}
{{ end }}
{{ end }}
