Welcome to mirror list, hosted at ThFree Co, Russian Federation.

tags.html « widgets « partials « layouts - github.com/devcows/hugo-universal-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d6aa383b8e34ddebae591efc1de454b27d38eb2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{{ 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 }}