From b3c260bccf48f6ff7634a2ec554953fca6be665b Mon Sep 17 00:00:00 2001 From: loikein Date: Mon, 24 Apr 2023 02:16:28 +0100 Subject: [PATCH] add new layers --- layouts/book/all.html | 35 +++++++++++++++++++++++++++++++++++ layouts/book/chapters.html | 25 +++++++++++++++++++++++++ layouts/book/volumes.html | 25 +++++++++++++++++++++++++ 3 files changed, 85 insertions(+) create mode 100644 layouts/book/all.html create mode 100644 layouts/book/chapters.html create mode 100644 layouts/book/volumes.html diff --git a/layouts/book/all.html b/layouts/book/all.html new file mode 100644 index 0000000..2e81a33 --- /dev/null +++ b/layouts/book/all.html @@ -0,0 +1,35 @@ +{{ define "main" }} +
+
+ +{{ partial "brand.html" . }} +{{ partial "content.header.html" . }} + + +{{ with .Content }} +
+{{ . }} +
+{{ end }} + +
+{{ $indexScratch := .Scratch }} +{{ range .Sections }} +{{ $indexScratch.Add "sections" (slice . ) }} +{{ end }} + +{{- range ($indexScratch.Get "sections").ByTitle -}} +

{{ .Title }}

+
    + {{- range .Pages.ByTitle -}} +
  • {{ .Title }}
  • + {{- end -}} +
+{{- end -}} +
+ +{{ partial "footer.html" . }} + +
+
+{{ end }} diff --git a/layouts/book/chapters.html b/layouts/book/chapters.html new file mode 100644 index 0000000..7a74400 --- /dev/null +++ b/layouts/book/chapters.html @@ -0,0 +1,25 @@ +{{ define "main" }} + +
+
+ +{{ partial "brand.html" . }} + +{{ partial "content.header.html" . }} + +
+
    +{{ range .Pages.ByTitle }} +{{ if .IsPage }} +
  • {{.Title}}
  • +{{ end }} +{{ end }} +
+
+ +{{ partial "footer.html" . }} + +
+
+ +{{ end }} diff --git a/layouts/book/volumes.html b/layouts/book/volumes.html new file mode 100644 index 0000000..a401f27 --- /dev/null +++ b/layouts/book/volumes.html @@ -0,0 +1,25 @@ +{{ define "main" }} + +
+
+ +{{ partial "brand.html" . }} + +{{ partial "content.header.html" . }} + +
+
    +{{ range .Pages.ByTitle }} +{{ if .IsSection }} +
  • {{.Title}}
  • +{{ end }} +{{ end }} +
+
+ +{{ partial "footer.html" . }} + +
+
+ +{{ end }}