blog/themes/beautifulhugo/layouts/_default/terms.html

39 lines
1.4 KiB
HTML
Raw Normal View History

2022-06-25 08:56:31 +01:00
{{ define "main" }}
{{ $data := .Data }}
<div class="container" role="main">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<article class="post-preview">
<div class="panel-group" id="accordion">
{{ range $key, $value := .Data.Terms.ByCount }}
<div class="panel panel-default">
<a class="collapsed" role="button" data-toggle="collapse" data-target="#collapse{{ $value.Name }}" data-parent="#accordion">
<div class="panel-heading" id="header{{ $value.Name }}">
<h4 class="panel-title">
{{ $value.Name }}
<span class="badge">{{ $value.Count }}</span>
</h4>
</div>
</a>
<div id="collapse{{ $value.Name }}" class="panel-collapse collapse">
<div class="panel-body">
<a href="{{ $.Site.LanguagePrefix | absURL }}/{{ $data.Plural }}/{{ $value.Name | urlize }}/" class="list-group-item view-all">
View all</a>
<div class="list-group">
{{ range $item := $value.WeightedPages }}
<a href="{{$item.Permalink}}" class="list-group-item">{{ $item.Title }}</a>
{{ end }}
</div>
</div>
</div>
</div>
{{ end }}
</div>
</article>
</div>
</div>
{{ end }}