Use same page for homepage and list for factorization

master
Quentin Duchemin 2021-05-22 21:24:50 +02:00
parent e366ee7049
commit e51a2dc03d
Signed by: Chosto
GPG Key ID: 0547178FEEDE7D6B
3 changed files with 13 additions and 24 deletions

View File

@ -1,15 +1,15 @@
{{ define "main" }}
<main>
{{ with .Content }}
<article>
<!-- "{{.Content}}" pulls from the markdown content of the corresponding _index.md -->
{{ .Content }}
{{ . }}
</article>
<ul>
{{ range .Paginator.Pages }}
{{- partial "listitem.html" . -}}
{{- partial "postinfo.html" . -}}
{{ end }}
</ul>
{{ range .Paginator.Pages }}
<div class="box">
{{ .Render "summary" }}
</div>
{{ end }}
{{- partial "pagination.html" . -}}
</main>
{{ end }}

View File

@ -1,13 +0,0 @@
{{ define "main" }}
<main>
{{ with .Content }}
<div>
{{ . }}
</div>
{{ end }}
{{ range .Paginator.Pages }}
{{ .Render "summary" }}
{{ end }}
{{- partial "pagination.html" . -}}
</main>
{{ end }}

View File

@ -12,6 +12,7 @@
{{ end }}
</div>
{{ end }}
{{ if .IsPage }}
<aside>
<div>
<section>
@ -23,6 +24,7 @@
</section>
</div>
</aside>
{{ end }}
</div>
</section>
</header>