abdullahtarawneh.com/layouts/_default/list.html
2024-03-14 18:29:33 -05:00

32 lines
No EOL
793 B
HTML

{{ define "main" }}
<main>
<header class="section page-header">
<div class="container">
<h1 class="page-title">{{ .Title }}</h1>
</div>
</header>
{{ with .Content }}
<section>
<div class="container">
{{.}}
</div>
</section>
{{ end }}
<section class="section list">
<div class="container">
{{ range .Pages }}
<article class="list-item">
<a class="list-item__link" href="{{ .RelPermalink }}">
{{- $cover := ($.Resources.ByType "image").GetMatch "{*cover*,*thumbnail*,*featured*}" -}}
{{ with $cover }}
<img class="list-item__image" src="{{.RelPermalink}}">
{{end}}
<h2 class="list-item__title">{{ .Title }}</h2>
</a>
<p class="list-item__summary">{{.Summary}}</p>
</article>
{{ end }}
</div>
</section>
</main>
{{ end }}