Website-Redesign/layouts/index.html

34 lines
1.2 KiB
HTML
Raw Normal View History

2020-08-24 01:48:03 -05:00
{{ define "main" }}
{{/* get all the pages that are regular posts and not pages */}}
{{ $postsDir := .Site.Params.Posts | default (slice "posts" "post") }}
2020-08-24 01:48:03 -05:00
{{ $postsList := where .Site.RegularPages "Section" "in" $postsDir }}
{{/* pagination */}}
{{ range (.Paginate $postsList).Pages }}
2021-01-05 02:38:10 -06:00
<div class="card {{ if .Site.Params.discreteCards }}discrete{{ end }}">
<h2>
2020-08-24 01:48:03 -05:00
<a href="{{ .Permalink }}">{{ .Title }}</a>
</h2>
2020-08-24 01:48:03 -05:00
<p class="date">
<span title="Date"></span>
2020-08-24 01:48:03 -05:00
{{ .Date.Format "2006-01-02" }}
{{ if .Params.tags }}
| <!-- Pipe character as visual separator between date and tags-->
<span title="Tags"></span>
{{ range .Params.tags }}
<a href="/tags/{{ . }}">#{{ . }}</a>
{{ end }}
2020-08-24 01:48:03 -05:00
{{ end }}
</p>
<div class="articlePreview">
{{ .Summary }}
<a href="{{ .Permalink }}">Continue reading </a>
2020-08-24 01:48:03 -05:00
</div>
<hr />
</div>
{{ end }}
{{- partial "paginator.html" . -}}
2020-08-24 01:48:03 -05:00
{{ end }}