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" }} {{ define "main" }}
<main> <main>
<article> {{ with .Content }}
<!-- "{{.Content}}" pulls from the markdown content of the corresponding _index.md --> <article>
{{ .Content }} {{ . }}
</article> </article>
<ul> {{ end }}
{{ range .Paginator.Pages }} {{ range .Paginator.Pages }}
{{- partial "listitem.html" . -}} <div class="box">
{{- partial "postinfo.html" . -}} {{ .Render "summary" }}
{{ end }} </div>
</ul> {{ end }}
{{- partial "pagination.html" . -}} {{- partial "pagination.html" . -}}
</main> </main>
{{ end }} {{ 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 }} {{ end }}
</div> </div>
{{ end }} {{ end }}
{{ if .IsPage }}
<aside> <aside>
<div> <div>
<section> <section>
@ -23,6 +24,7 @@
</section> </section>
</div> </div>
</aside> </aside>
{{ end }}
</div> </div>
</section> </section>
</header> </header>