Newer
Older
{{ $show_descriptions := .show_descriptions }}
{{ $show_images := .show_images }}
{{ $heading_level := .heading_level | default 3 }}
{{ $heading_tag := partial "GetHeadingTag" (dict
"level" $heading_level
"attributes" "class='page-title'"
)}}
<ul class="list {{ if and (not $show_descriptions) (not $show_images) }} title-only {{ end }}">
{{ if or $show_descriptions $show_images }}
<article>
<div class="page-content">
{{ $heading_tag.open }}
<a href="{{- .Permalink -}}">
{{- partial "PrepareHTML" .Title -}}
</a>
{{ $heading_tag.close }}
{{ if and $show_descriptions .Params.summary }}
<p>{{ partial "GetTruncateContent" ( dict
"text" .Params.summary
"length" site.Params.pages.index.truncate_description
) }}</p>
{{ end }}
</div>
{{ if $show_images }}
{{- partial "pages/page-media.html" . -}}
{{ end }}
</article>
{{ else }}
<a href="{{- .Permalink -}}">
{{- partial "PrepareHTML" .Title -}}
</a>
{{ end }}