23 lines
1.0 KiB
HTML
23 lines
1.0 KiB
HTML
{{ define "main" }}
|
|
<section id="home-post-list">
|
|
<h1 class="sr-only">Latest posts</h1>
|
|
<ul class="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4" id="home-post-items">
|
|
{{ $posts := where .Site.RegularPages "Section" "posts" }}
|
|
{{ range sort $posts "Date" "desc" }}
|
|
<li class="home-post-item hidden border border-ctp-surface1 rounded-xl bg-ctp-base/70 shadow-sm hover:shadow-xl hover:-translate-y-1 transition px-4 py-3">
|
|
<a class="grid gap-1 no-underline text-inherit" href="{{ .RelPermalink }}">
|
|
<span>
|
|
<span class="font-semibold">{{ .Title }}</span>
|
|
{{ $subtitle := or .Params.subtitle (or .Params.summary .Summary) }}
|
|
{{ with $subtitle }}<span class="block text-ctp-subtext0 text-sm">{{ . | plainify }}</span>{{ end }}
|
|
</span>
|
|
<time class="justify-self-end text-sm text-ctp-subtext0" datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "2006-01-02" }}</time>
|
|
</a>
|
|
</li>
|
|
{{ end }}
|
|
</ul>
|
|
</section>
|
|
{{ end }}
|
|
|
|
|