hugo-theme-zzo/layouts/partials/sidebar/list/posts-by-order.html

18 lines
707 B
HTML
Raw Normal View History

{{ if ($.Param "enableSidebarPostsByOrder" | default false) }}
{{ $filteredSections := .Site.Pages }}
{{ range $.Param "notAllowedTypesInHomeSidebar" }}
{{ $filteredSections = (where $filteredSections "Type" "!=" (lower .)) }}
{{ end }}
2020-02-19 01:34:48 +00:00
<div class="sidebar-recent__title p2">{{ i18n "posts-by-order" | default "TOP POSTS" }}</div>
<ul class="sidebar-recent__ul">
{{ range first ($.Param "itemsPerCategory") ($filteredSections.ByParam "order") }}
{{ if .Params.order }}
<li>
<a href="{{ .RelPermalink }}" class="sidebar-recent__a p2">{{ .Title }}</a>
</li>
{{ end }}
{{ end }}
</ul>
<hr class="hr-fade sidebar-hr" />
{{ end }}