mirror of
https://github.com/by-jp/www.byjp.me.git
synced 2025-08-23 06:33:10 +01:00
34 lines
1.2 KiB
HTML
34 lines
1.2 KiB
HTML
{{ define "main" }}
|
|
{{ $paginator := .Paginate .Data.Pages }}
|
|
|
|
<main class="posts instagram">
|
|
{{ partial "generic-list-header.html" . }}
|
|
|
|
<h1>
|
|
{{ with .Params.emoji }}<span data-emoji="{{.}}"></span>{{end}}
|
|
<a href="{{ .Permalink }}" class="noaccent u-url">{{ title (replace .Title "-" " ") }}</a>
|
|
</h1>
|
|
|
|
{{ if .Content }}
|
|
<div class="content" data-pagefind-body>{{ .Content }}</div>
|
|
{{ end }}
|
|
|
|
{{ range $paginator.Pages.GroupByDate "2006" }}
|
|
<div class="posts-group">
|
|
<div class="post-year">{{ .Key }}</div>
|
|
|
|
<ul class="posts-list">
|
|
{{ range .Pages }}
|
|
<li class="post-item">
|
|
<a href="{{.Permalink}}">
|
|
{{ $firstMedia := index .Params.Media 0 }}
|
|
<img src="{{.Permalink}}{{ $firstMedia }}{{if hasSuffix $firstMedia ".mp4"}}.jpg{{ end }}" />
|
|
</a>
|
|
</li>
|
|
{{ end }}
|
|
</ul>
|
|
</div>
|
|
{{ end }}
|
|
{{ partial "pagination-list.html" . }}
|
|
</main>
|
|
{{ end }}
|