joinpeertube/themes/hugo-bootstrap-premium/layouts/partials/bloc/content/sidebar.html
2018-02-28 16:33:36 +01:00

37 lines
1.1 KiB
HTML

<div>
{{ if and .IsPage (eq .Params.toc true) }}
<div class="section">
<header><div class="title">TableOfContents</div></header>
<div class="list-default">{{ .TableOfContents }}</div>
</div>
{{ end }}
<div class="section">
<header><div class="title"><b>{{ i18n "latestposts" }}</b></div></header>
<div class="content">
<ul>
{{ range first 10 (where (where .Site.Pages "Type" "post") "IsPage" true) }}
<li>
<a href="{{ .Permalink }}">{{ .Title }}</a>
</li>
{{ end }}
</ul>
</div>
</div>
{{ range $key, $value := .Site.Taxonomies }}
{{ $len := len $value }}
{{ if (not ( eq $len 0 ) ) }}
<div class="section taxonomies">
<header><div class="title"><b>{{ $key | singularize }}</b></div></header>
<div class="content">
<ul>
{{ range first 10 $value.ByCount }}<li><a href="{{$.LanguagePrefix }}/{{ $key }}/{{ .Name | urlize }}">{{ .Name }}</a></li>{{ end }}
</ul>
</div>
</div>
{{ end }}
{{ end }}
</div>