mirror of
https://github.com/davegallant/davegallant.github.io.git
synced 2025-08-06 00:33:39 +00:00
Simplify posts list
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
title: "davegallant.ca — Blog"
|
title: Blog
|
||||||
---
|
---
|
||||||
|
|
||||||
[RSS Feed](https://davegallant.ca/index.xml)
|
Subscribe via [RSS](https://davegallant.ca/index.xml).
|
||||||
|
@@ -1,24 +1,12 @@
|
|||||||
{{ range $pageIndex, $page := .Pages }}
|
{{ range $pageIndex, $page := .Pages }}
|
||||||
<article class="post">
|
<article class="post">
|
||||||
<div class="post-header">
|
<div class="post-header">
|
||||||
<h2>
|
|
||||||
<a href="{{ .RelPermalink }}">{{ .Title | markdownify }}</a>
|
<a href="{{ .RelPermalink }}">{{ .Title | markdownify }}</a>
|
||||||
</h2>
|
|
||||||
{{ partial "post-meta.html" (dict "page" . "pageIndex" $pageIndex) }}
|
{{ partial "post-meta.html" (dict "page" . "pageIndex" $pageIndex) }}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="post-content">
|
|
||||||
{{ with .Description }}
|
|
||||||
{{ . }}
|
|
||||||
{{ else }}
|
|
||||||
{{ .Summary }}
|
|
||||||
{{ if .Truncated }}
|
|
||||||
<div class="post-content__read-more">
|
|
||||||
<a href="{{ .RelPermalink }}">Read more ></a>
|
|
||||||
</div>
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
</div>
|
|
||||||
</article>
|
</article>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
@@ -2,26 +2,4 @@
|
|||||||
{{- with .page.Date -}}
|
{{- with .page.Date -}}
|
||||||
<span>{{ .Format "2006-01-02" }}</span>
|
<span>{{ .Format "2006-01-02" }}</span>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- with .page.Params.Author -}}
|
|
||||||
<span> by </span><span class="post-meta__author">{{ . }}</span>
|
|
||||||
{{- end -}}
|
|
||||||
{{ with .page.Params.tags }}
|
|
||||||
<div class="post-tags">
|
|
||||||
{{ range . -}}
|
|
||||||
<a class="post-tag" href="{{ urlize (printf "tags/%s" . ) | absURL }}">
|
|
||||||
{{- /* Replace hyphen with non-breaking hyphen */ -}}
|
|
||||||
{{- replace (urlize .) "-" "‑" | safeHTML -}}
|
|
||||||
</a>
|
|
||||||
{{- end }}
|
|
||||||
</div>
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ if .page.Params.cover }}
|
|
||||||
<!--
|
|
||||||
Only lazy-load images below-the-fold. For post lists, start loading
|
|
||||||
covers from the third post and onwards.
|
|
||||||
-->
|
|
||||||
{{ $lazy := ge .pageIndex 2 }}
|
|
||||||
{{ partial "image.html" (dict "src" .page.Params.cover.src "alt" .page.Params.cover.alt "caption" .page.Params.cover.caption "page" .page "lazy" $lazy) }}
|
|
||||||
{{ end }}
|
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user