voidcruiser.nl/layouts/_default/index.html
2023-03-23 11:31:53 +01:00

17 lines
954 B
HTML

{{ define "main" }}
{{ .Content -}}
<div class="posts">
{{ $isntDefault := not (or (eq (trim $.Site.Params.contentTypeName " ") "rambles") (eq (trim $.Site.Params.contentTypeName " ") "")) }} {{ $contentTypeName := cond $isntDefault (string $.Site.Params.contentTypeName) "rambles" }} {{ $PageContext := . }} {{ if .IsHome }} {{ $PageContext = .Site }} {{ end }} {{ $paginator := .Paginate (where $PageContext.RegularPages "Type" $contentTypeName) }}
<table class="post-entry-meta"> {{ range first 10 .Paginator.Pages }}
<tr>
<td><a href="{{ .RelPermalink }}">{{ .Title | markdownify}}</a></td>
<td>{{ .Params.Date.Format "2006-01-02" }}</td>
<td>{{ .Params.Author }}</td>
<td>{{ range .Params.tags }} #<a href="{{ (urlize (printf "tags/%s/" .)) | absLangURL }}">{{ . }}</a>{{ end }}</td>
</tr> {{ end }}
</table>
<p><a class="button" href="/rambles">Read more</a></p>
</div>
{{ partial "stickers.html" }}
{{ end }}