    {{ if and .amount (or .paginator .pages) }}
    {{ $amount := .amount }}
    {{ $pages := .pages.ByLastmod.Reverse }}
    {{ if .paginator }}
        {{ $pages = .paginator.Pages.ByLastmod.Reverse }}
    {{ end }}

    {{- $paginator := .context.Paginate $pages -}}
	{{ if eq $paginator.PageNumber 1 }}
        {{ if .content }}
            {{ partial "snippets/content" (dict "content" .content) }}
        {{ end }}
	{{ end }}    
    {{- if gt (len $pages) 0 -}}
        {{ if .title }}<h2 style="margin-left: .6rem;">{{ .title }}</h2>{{ end }}
        {{- range first $amount $pages -}}
            <article class="articlebgcol1 borderrad25">
                <a href="{{- .Permalink -}}">
                    <div id="articletitle">
                        <h2>{{- .Title -}}</h2>
                    </div>
                </a>
                <a href="{{- .Permalink -}}">
                    <div id="articlecontent">
                        {{ partial "layout/article" (dict "context" . "type" "list" "pic" "true") }}
                    </div>
                </a>
            </article>
        {{ end }}
        {{ if .paginate }}
            <div id="pagination_outer" style="display: flex; justify-content: center;">
                {{ partial "snippets/paginator" (dict "paginator" $paginator) }}
            </div>
        {{ end }}
    {{ end }}
{{ end }}
