2022-09-30 12:51:47 +00:00
|
|
|
{{ define "main" }}
|
|
|
|
<main class="page-container">
|
|
|
|
{{ $listtitle := .Title }}
|
|
|
|
{{ if or .Title .Content }}
|
|
|
|
<div>
|
|
|
|
{{ with .Title }}<h1>{{ . }}</h1>{{ end }}
|
|
|
|
{{ with .Content }}<div>{{ . }}</div>{{ end }}
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
<ul class="news-list">
|
|
|
|
{{ range .Paginator.Pages }}
|
|
|
|
<li class="news-item">
|
|
|
|
<a href="{{ .RelPermalink }}" class="news-item__image">
|
2024-04-02 08:41:44 +00:00
|
|
|
{{ $featuredImage := (resources.Get (.Site.Params.defaultCoverImage.src | safeURL)) }}
|
2022-09-30 12:51:47 +00:00
|
|
|
|
|
|
|
{{ if .Params.featured_image }}
|
|
|
|
{{ $featuredImage = .Resources.GetMatch (.Params.featured_image.src | safeURL) }}
|
|
|
|
{{ end }}
|
2024-03-15 22:27:14 +00:00
|
|
|
{{ $featuredImage := $featuredImage.Fill "465x348 Center" }}
|
2022-09-30 12:51:47 +00:00
|
|
|
<figure>
|
2024-03-31 15:55:04 +00:00
|
|
|
<img alt="{{ with .Params.featured_image.alt }}{{ . }}{{ end }}" src="{{ $featuredImage.RelPermalink }}" />
|
2022-09-30 12:51:47 +00:00
|
|
|
</figure>
|
|
|
|
</a>
|
|
|
|
<div class="news-item__content">
|
|
|
|
<h2
|
|
|
|
class="news-item__title"
|
|
|
|
>
|
|
|
|
<a
|
|
|
|
href="{{ .RelPermalink }}"
|
|
|
|
>
|
2024-03-15 22:27:14 +00:00
|
|
|
{{ .Title }}
|
2022-09-30 12:51:47 +00:00
|
|
|
</a>
|
|
|
|
</h2>
|
|
|
|
<p class="news-item__date">
|
|
|
|
{{ $date := .Date.Format "2006-01-02" }}
|
|
|
|
<time datetime="{{ $date }}">
|
|
|
|
{{ time.Format "2 January 2006" $date }}
|
|
|
|
</time>
|
|
|
|
</p>
|
|
|
|
<div class="news-item__summary">
|
2024-03-15 22:27:14 +00:00
|
|
|
{{ .Summary }}…
|
2022-09-30 12:51:47 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
{{ end }}
|
|
|
|
</ul>
|
|
|
|
{{ partial "pagination.html" . }}
|
|
|
|
</main>
|
|
|
|
{{ end }}
|