hugo-theme-minima/layouts/index.html
2023-05-12 20:30:35 +08:00

25 lines
No EOL
899 B
HTML

{{ define "main" }}
<main class="container mx-auto">
<h2 class="mt-8 text-3xl font-bold">{{ .Site.Params.greet }}</h2>
<p class="mt-0 mb-0">{{ .Site.Author.status }}</p>
<p class="mt-3 mb-3 home-intro">{{ .Site.Author.description | markdownify | safeHTML }}</p>
{{ if eq .Paginator.PageNumber 1 }}
<h3 class="mt-6 mb-4 text-2xl font-bold">{{ T "recent" }}</h3>
{{ else }}
<h3 class="mt-6 mb-4 text-2xl font-bold">{{ T "older" }}</h3>
{{ end }}
<div>
{{ $paginator := .Paginate (where .Site.RegularPages "Kind" "page") }}
{{ range $paginator.Pages }}
{{ if ne .Page.Layout "search" }}
{{ partial "item.html" . }}
{{ end }}
{{ end }}
{{ partial "paginator.html" . }}
</div>
{{ if .Site.Params.friends.feeds }}
<h3 class="mt-6 mb-6 text-2xl font-semibold">{{ .Site.Params.friends.title }}</h3>
<div id="friends"></div>
{{ end }}
</main>
{{ end }}