mirror of
https://github.com/loikein/hugo-tufte.git
synced 2024-12-23 05:54:47 +01:00
add new layers
This commit is contained in:
parent
947a89b641
commit
b3c260bccf
3 changed files with 85 additions and 0 deletions
35
layouts/book/all.html
Normal file
35
layouts/book/all.html
Normal file
|
@ -0,0 +1,35 @@
|
|||
{{ define "main" }}
|
||||
<div id="layout">
|
||||
<article>
|
||||
|
||||
{{ partial "brand.html" . }}
|
||||
{{ partial "content.header.html" . }}
|
||||
|
||||
<!-- https://discourse.gohugo.io/t/how-to-build-one-collection-for-all-nested-sections/27950/5 -->
|
||||
{{ with .Content }}
|
||||
<section>
|
||||
{{ . }}
|
||||
</section>
|
||||
{{ end }}
|
||||
|
||||
<section class="list-page">
|
||||
{{ $indexScratch := .Scratch }}
|
||||
{{ range .Sections }}
|
||||
{{ $indexScratch.Add "sections" (slice . ) }}
|
||||
{{ end }}
|
||||
|
||||
{{- range ($indexScratch.Get "sections").ByTitle -}}
|
||||
<p><a href="{{ .RelPermalink }}">{{ .Title }}</a></p>
|
||||
<ul>
|
||||
{{- range .Pages.ByTitle -}}
|
||||
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
|
||||
{{- end -}}
|
||||
</ul>
|
||||
{{- end -}}
|
||||
</section>
|
||||
|
||||
{{ partial "footer.html" . }}
|
||||
|
||||
</article>
|
||||
</div>
|
||||
{{ end }}
|
25
layouts/book/chapters.html
Normal file
25
layouts/book/chapters.html
Normal file
|
@ -0,0 +1,25 @@
|
|||
{{ define "main" }}
|
||||
|
||||
<div id="layout">
|
||||
<article>
|
||||
|
||||
{{ partial "brand.html" . }}
|
||||
|
||||
{{ partial "content.header.html" . }}
|
||||
|
||||
<section class="list-page">
|
||||
<ul>
|
||||
{{ range .Pages.ByTitle }}
|
||||
{{ if .IsPage }}
|
||||
<li><a href="{{ .RelPermalink }}">{{.Title}}</a></li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
{{ partial "footer.html" . }}
|
||||
|
||||
</article>
|
||||
</div>
|
||||
|
||||
{{ end }}
|
25
layouts/book/volumes.html
Normal file
25
layouts/book/volumes.html
Normal file
|
@ -0,0 +1,25 @@
|
|||
{{ define "main" }}
|
||||
|
||||
<div id="layout">
|
||||
<article>
|
||||
|
||||
{{ partial "brand.html" . }}
|
||||
|
||||
{{ partial "content.header.html" . }}
|
||||
|
||||
<section class="list-page">
|
||||
<ul>
|
||||
{{ range .Pages.ByTitle }}
|
||||
{{ if .IsSection }}
|
||||
<li><a href="{{ .RelPermalink }}">{{.Title}}</a></li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
{{ partial "footer.html" . }}
|
||||
|
||||
</article>
|
||||
</div>
|
||||
|
||||
{{ end }}
|
Loading…
Reference in a new issue