post archive: display listings consistent with posts widget (Close #262)

This commit is contained in:
George Cushen 2017-09-30 23:21:13 +01:00
commit f42cfe7d1a
3 changed files with 4 additions and 21 deletions

View file

@ -1,5 +1,4 @@
{{ $post := .post }}
{{ $page := .page }}
<div class="article-list-item" itemscope itemprop="blogPost">
{{ $preview := $post.Params.header.preview | default true }}

View file

@ -44,7 +44,7 @@
{{ $show_post := $.Scratch.Get "show_post" }}
{{ if ne $show_post "0" }}
{{ $params := dict "post" . "page" $page }}
{{ $params := dict "post" . }}
{{ partial "post_li" $params }}
{{end}}
@ -71,7 +71,7 @@
{{ $show_post := $.Scratch.Get "show_post" }}
{{ if ne $show_post "0" }}
{{ $params := dict "post" . "page" $page }}
{{ $params := dict "post" . }}
{{ partial "post_li" $params }}
{{end}}

View file

@ -13,24 +13,8 @@
{{ $paginator := .Paginate .Data.Pages }}
{{ range $paginator.Pages }}
<div>
{{ if .Params.image }}
<a href="{{ .Permalink }}">
<img src="{{ $.Site.BaseURL }}img/{{ .Params.image }}" class="article-banner">
</a>
{{end}}
<h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
{{ partial "article_metadata" (dict "content" . "is_list" 1) }}
<div class="article-style"><p>
{{ if .Params.summary }}
{{ printf "%s" .Params.summary | markdownify }}
{{ else if .Truncated }}
{{ printf "%s" .Summary | markdownify }}
{{ else }}
{{ .Content }}
{{ end }}
</p></div>
</div>
{{ $params := dict "post" . }}
{{ partial "post_li" $params }}
{{ end }}
{{ partial "pagination" . }}