feat: Move to pageslist partial

main
earnest ma 2021-11-30 09:56:53 -05:00
parent 51b3d3fbec
commit 55e42857e8
Signed by: earnest ma
GPG Key ID: A343F43342EB6E2A
3 changed files with 18 additions and 20 deletions

View File

@ -10,15 +10,7 @@
{{ end }} {{ end }}
</ul> </ul>
{{ else }} {{ else }}
<h3>Subpages:</h3> {{ partial "pageslist.html" }}
<ul>
<li><a href="..">Go back</a></li>
{{ range .Pages }}
<li>
<a href="{{ .Permalink }}">{{ .Title }}</a> <br>
</li>
{{ end }}
</ul>
{{ end }} {{ end }}
<hr> <hr>
@ -31,4 +23,4 @@
{{ .Content }} {{ .Content }}
{{ end }} {{ end }}

View File

@ -1,13 +1,11 @@
{{ define "main" }} {{ define "main" }}
{{ partial "pageslist.html" }}
<h3>Subpages:</h3> <hr>
<ul> <h2>{{ .Title }}</h2>
{{ range .Pages }} {{ if $.Params.enabletoc }}
<li> <div class="toc">
<a href="{{ .Permalink }}">{{ .Title }}</a> <br> {{ .Page.TableOfContents }}
</li> </div>
{{ end }} {{ end }}
</ul>
{{ .Content }} {{ .Content }}
{{ end }} {{ end }}

View File

@ -0,0 +1,8 @@
<ul>
<li><a href="..">Go back</a></li>
{{ range .Pages }}
<li>
<a href="{{ .Permalink }}">{{ .Title }}</a>
</li>
{{ end }}
</ul>