diff options
Diffstat (limited to 'layouts/partials/sidebar.html')
-rw-r--r-- | layouts/partials/sidebar.html | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html new file mode 100644 index 0000000..d8f3b31 --- /dev/null +++ b/layouts/partials/sidebar.html @@ -0,0 +1,33 @@ +<div class="sidebar"> + {{ with ( .Site.GetPage "page" "about" ) }} + <h4><a href="{{ .RelPermalink }}">{{ .Title }}</a></h4> + {{ .Summary }} + <hr /> + {{ end }} + {{ if not .IsNode }} + <h4><a href="{{ "/tags/" | relLangURL }}">Tags</a></h4> + {{ with .Params.Tags }} + <div> + {{ range . }} + <a class="badge badge-pill badge-secondary" href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a> + {{ end }} + </div> + {{ end }} + <hr /> + {{ end }} + <h4><a href="{{ "/categories/" | relLangURL }}">Categories</a></h4> + {{ with .Site.Taxonomies.categories }} + <div> + <ul> + {{ range $key, $value := . }} + <li> + <a href="{{ "/categories/" | relLangURL }}{{ $key | urlize }}"> + {{ $key | humanize }} + <span class="badge badge-pill badge-light">{{ len $value }}</span> + </a> + </li> + {{ end }} + </ul> + </div> + {{ end }} +</div> |