Add content to top of list templates if there are any.

This commit is contained in:
Fredrik Jonsson 2022-05-24 22:45:04 +02:00
commit d806a8de65
2 changed files with 13 additions and 0 deletions

View file

@ -1,6 +1,13 @@
{{ define "main" -}}
<main class="main layout__main">
<h1 class="title">{{ .Title }}</h1>
{{ with .Content }}
<div class="content">
{{ . }}
</div>
{{ end }}
{{ $paginator := .Paginate (.Pages) -}}
{{ range $paginator.Pages -}}
{{ .Render "summary"}}

View file

@ -3,6 +3,12 @@
<h1 class="title">Micro posts</h1>
<p class="micro__follow"><a href="https://micro.blog/{{ with $.Param "microusername" }}{{ . }}{{ end }}">{{ i18n "string_follow" }} @{{ with $.Param "microusername" }}{{ . }}{{ end }}</a></p>
{{ with .Content }}
<div class="content">
{{ . }}
</div>
{{ end }}
{{ $paginator := .Paginate (.Pages) -}}
{{ range $paginator.Pages -}}
{{ .Render "summary"}}