2020-08-24 01:48:03 -05:00
|
|
|
{{ define "main" }}
|
|
|
|
|
|
|
|
{{/* get all the pages that are regular posts and not pages */}}
|
2021-01-03 07:06:59 -06:00
|
|
|
{{ $postsDir := .Site.Params.Posts | default (slice "posts" "post") }}
|
2021-04-13 16:30:34 -05:00
|
|
|
{{ $allPostsList := where .Site.RegularPages "Section" "in" $postsDir }}
|
|
|
|
{{ $featuredPostsList := slice }}
|
|
|
|
{{ $postsList := $allPostsList }}
|
|
|
|
{{ if .Site.Params.enableFeatured | default false }}
|
|
|
|
{{ $featuredPostsList = where $allPostsList "Params.featured" true }}
|
|
|
|
{{ $postsList = union (where $allPostsList "Params.featured" false) (where $allPostsList "Params.featured" nil) }}
|
2021-04-14 00:23:25 -05:00
|
|
|
{{- partial "featured_articles.html" $featuredPostsList -}}
|
2021-04-13 16:30:34 -05:00
|
|
|
{{ end }}
|
|
|
|
|
2020-08-24 01:48:03 -05:00
|
|
|
{{/* pagination */}}
|
2021-04-13 03:19:17 -05:00
|
|
|
<div class="postlist {{ if .Site.Params.gridView }}gridView{{ end }}" id="postlist">
|
2020-08-24 01:48:03 -05:00
|
|
|
{{ range (.Paginate $postsList).Pages }}
|
2021-03-10 02:25:37 -06:00
|
|
|
<article class="card postlistitem {{ if .Site.Params.discreteCards }}discrete{{ end }}">
|
2021-03-11 06:19:00 -06:00
|
|
|
<div>
|
|
|
|
<h2>
|
|
|
|
<a href="{{ .Permalink }}">{{ .Title }}</a>
|
|
|
|
</h2>
|
|
|
|
<p class="date">
|
2021-01-03 06:15:46 -06:00
|
|
|
<span title="Date"> </span>
|
2020-08-24 01:48:03 -05:00
|
|
|
{{ .Date.Format "2006-01-02" }}
|
|
|
|
{{ if .Params.tags }}
|
2021-01-03 06:15:46 -06:00
|
|
|
| <!-- Pipe character as visual separator between date and tags-->
|
|
|
|
<span title="Tags"> </span>
|
|
|
|
{{ range .Params.tags }}
|
2021-01-03 07:06:59 -06:00
|
|
|
<a href="/tags/{{ . }}">#{{ . }}</a>
|
2021-01-03 06:15:46 -06:00
|
|
|
{{ end }}
|
2020-08-24 01:48:03 -05:00
|
|
|
{{ end }}
|
2021-03-11 06:19:00 -06:00
|
|
|
</p>
|
|
|
|
{{ if .Site.Params.imageInArticlePreview }}
|
|
|
|
{{ if .Params.Image }}
|
|
|
|
<img src="{{ .Params.Image }}" />
|
|
|
|
{{ end }}
|
|
|
|
{{end}}
|
|
|
|
<div class="articlePreview">
|
|
|
|
<p>{{ .Summary }}</p>
|
|
|
|
<p><a href="{{ .Permalink }}">Continue reading </a></p>
|
|
|
|
</div>
|
2020-08-24 01:48:03 -05:00
|
|
|
</div>
|
|
|
|
<hr />
|
2021-03-10 02:25:37 -06:00
|
|
|
</article>
|
2020-08-24 01:48:03 -05:00
|
|
|
{{ end }}
|
2021-04-12 16:07:16 -05:00
|
|
|
</div>
|
2021-04-13 03:19:17 -05:00
|
|
|
<div id="getNextBtnContainer"></div>
|
2021-01-04 06:20:55 -06:00
|
|
|
{{- partial "paginator.html" . -}}
|
2020-08-24 01:48:03 -05:00
|
|
|
|
|
|
|
{{ end }}
|