From 1147a663e70aadb2578cbe601bc723d7cd939c5a Mon Sep 17 00:00:00 2001 From: aethrvmn Date: Sat, 30 Aug 2025 15:17:32 +0200 Subject: added non-content --- themes/hugo-book/layouts/partials/docs/brand.html | 8 ++++ .../hugo-book/layouts/partials/docs/comments.html | 2 + themes/hugo-book/layouts/partials/docs/date.html | 6 +++ themes/hugo-book/layouts/partials/docs/footer.html | 27 +++++++++++ themes/hugo-book/layouts/partials/docs/header.html | 13 +++++ .../layouts/partials/docs/html-head-favicon.html | 1 + .../layouts/partials/docs/html-head-title.html | 1 + .../hugo-book/layouts/partials/docs/html-head.html | 56 ++++++++++++++++++++++ .../layouts/partials/docs/inject/body.html | 0 .../partials/docs/inject/content-after.html | 0 .../partials/docs/inject/content-before.html | 0 .../layouts/partials/docs/inject/footer.html | 0 .../layouts/partials/docs/inject/head.html | 0 .../layouts/partials/docs/inject/menu-after.html | 0 .../layouts/partials/docs/inject/menu-before.html | 0 .../layouts/partials/docs/inject/toc-after.html | 0 .../layouts/partials/docs/inject/toc-before.html | 0 .../hugo-book/layouts/partials/docs/languages.html | 33 +++++++++++++ .../layouts/partials/docs/links/commit.html | 2 + .../layouts/partials/docs/links/edit.html | 2 + .../layouts/partials/docs/menu-filetree.html | 49 +++++++++++++++++++ .../hugo-book/layouts/partials/docs/menu-hugo.html | 28 +++++++++++ themes/hugo-book/layouts/partials/docs/menu.html | 21 ++++++++ .../hugo-book/layouts/partials/docs/post-meta.html | 16 +++++++ themes/hugo-book/layouts/partials/docs/search.html | 8 ++++ .../hugo-book/layouts/partials/docs/taxonomy.html | 19 ++++++++ themes/hugo-book/layouts/partials/docs/title.html | 17 +++++++ themes/hugo-book/layouts/partials/docs/toc.html | 3 ++ 28 files changed, 312 insertions(+) create mode 100644 themes/hugo-book/layouts/partials/docs/brand.html create mode 100644 themes/hugo-book/layouts/partials/docs/comments.html create mode 100644 themes/hugo-book/layouts/partials/docs/date.html create mode 100644 themes/hugo-book/layouts/partials/docs/footer.html create mode 100644 themes/hugo-book/layouts/partials/docs/header.html create mode 100644 themes/hugo-book/layouts/partials/docs/html-head-favicon.html create mode 100644 themes/hugo-book/layouts/partials/docs/html-head-title.html create mode 100644 themes/hugo-book/layouts/partials/docs/html-head.html create mode 100644 themes/hugo-book/layouts/partials/docs/inject/body.html create mode 100644 themes/hugo-book/layouts/partials/docs/inject/content-after.html create mode 100644 themes/hugo-book/layouts/partials/docs/inject/content-before.html create mode 100644 themes/hugo-book/layouts/partials/docs/inject/footer.html create mode 100644 themes/hugo-book/layouts/partials/docs/inject/head.html create mode 100644 themes/hugo-book/layouts/partials/docs/inject/menu-after.html create mode 100644 themes/hugo-book/layouts/partials/docs/inject/menu-before.html create mode 100644 themes/hugo-book/layouts/partials/docs/inject/toc-after.html create mode 100644 themes/hugo-book/layouts/partials/docs/inject/toc-before.html create mode 100644 themes/hugo-book/layouts/partials/docs/languages.html create mode 100644 themes/hugo-book/layouts/partials/docs/links/commit.html create mode 100644 themes/hugo-book/layouts/partials/docs/links/edit.html create mode 100644 themes/hugo-book/layouts/partials/docs/menu-filetree.html create mode 100644 themes/hugo-book/layouts/partials/docs/menu-hugo.html create mode 100644 themes/hugo-book/layouts/partials/docs/menu.html create mode 100644 themes/hugo-book/layouts/partials/docs/post-meta.html create mode 100644 themes/hugo-book/layouts/partials/docs/search.html create mode 100644 themes/hugo-book/layouts/partials/docs/taxonomy.html create mode 100644 themes/hugo-book/layouts/partials/docs/title.html create mode 100644 themes/hugo-book/layouts/partials/docs/toc.html (limited to 'themes/hugo-book/layouts/partials/docs') diff --git a/themes/hugo-book/layouts/partials/docs/brand.html b/themes/hugo-book/layouts/partials/docs/brand.html new file mode 100644 index 0000000..fa7f415 --- /dev/null +++ b/themes/hugo-book/layouts/partials/docs/brand.html @@ -0,0 +1,8 @@ +

+ + {{- with .Site.Params.BookLogo -}} + Logo + {{- end -}} + {{ .Site.Title }} + +

diff --git a/themes/hugo-book/layouts/partials/docs/comments.html b/themes/hugo-book/layouts/partials/docs/comments.html new file mode 100644 index 0000000..59c5f22 --- /dev/null +++ b/themes/hugo-book/layouts/partials/docs/comments.html @@ -0,0 +1,2 @@ + +{{ template "_internal/disqus.html" . }} diff --git a/themes/hugo-book/layouts/partials/docs/date.html b/themes/hugo-book/layouts/partials/docs/date.html new file mode 100644 index 0000000..8c75361 --- /dev/null +++ b/themes/hugo-book/layouts/partials/docs/date.html @@ -0,0 +1,6 @@ + +{{- $format := default "January 2, 2006" .Format -}} +{{- return (time.Format $format .Date) -}} diff --git a/themes/hugo-book/layouts/partials/docs/footer.html b/themes/hugo-book/layouts/partials/docs/footer.html new file mode 100644 index 0000000..77e96d8 --- /dev/null +++ b/themes/hugo-book/layouts/partials/docs/footer.html @@ -0,0 +1,27 @@ +
+ +{{ if and .GitInfo .Site.Params.BookRepo }} +
+ {{- $date := partial "docs/date" (dict "Date" .GitInfo.AuthorDate.Local "Format" .Site.Params.BookDateFormat) -}} + + + {{ $date }} + +
+{{ end }} + +{{ if and .File .Site.Params.BookRepo .Site.Params.BookEditPath }} +
+ + + {{ i18n "Edit this page" }} + +
+{{ end }} + +
+ +{{ $script := resources.Get "clipboard.js" | resources.Minify }} +{{ with $script.Content }} + +{{ end }} diff --git a/themes/hugo-book/layouts/partials/docs/header.html b/themes/hugo-book/layouts/partials/docs/header.html new file mode 100644 index 0000000..646b8ff --- /dev/null +++ b/themes/hugo-book/layouts/partials/docs/header.html @@ -0,0 +1,13 @@ +
+ + +

{{ partial "docs/title" . }}

+ + +
diff --git a/themes/hugo-book/layouts/partials/docs/html-head-favicon.html b/themes/hugo-book/layouts/partials/docs/html-head-favicon.html new file mode 100644 index 0000000..8278050 --- /dev/null +++ b/themes/hugo-book/layouts/partials/docs/html-head-favicon.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/themes/hugo-book/layouts/partials/docs/html-head-title.html b/themes/hugo-book/layouts/partials/docs/html-head-title.html new file mode 100644 index 0000000..49a109d --- /dev/null +++ b/themes/hugo-book/layouts/partials/docs/html-head-title.html @@ -0,0 +1 @@ +{{ partial "docs/title" . }} | {{ .Site.Title -}} diff --git a/themes/hugo-book/layouts/partials/docs/html-head.html b/themes/hugo-book/layouts/partials/docs/html-head.html new file mode 100644 index 0000000..6a6d0ec --- /dev/null +++ b/themes/hugo-book/layouts/partials/docs/html-head.html @@ -0,0 +1,56 @@ + + + + + + + +{{- with .Page.Params.BookHref -}} + +{{- end -}} + +{{- template "_internal/opengraph.html" . -}} + +{{ partial "docs/html-head-title" . }} +{{ partial "docs/html-head-favicon" . }} + +{{- $manifest := resources.Get "manifest.json" | resources.ExecuteAsTemplate "manifest.json" . }} + + + +{{- range .Translations }} + +{{- end -}} + + +{{- $styles := resources.Get "book.scss" | resources.ExecuteAsTemplate "book.scss" . | css.Sass | resources.Minify | resources.Fingerprint }} + +{{- if default true .Site.Params.BookSearch -}} + {{- $searchJSFile := printf "%s.search.js" .Language.Lang }} + {{- $searchJS := resources.Get "search.js" | resources.ExecuteAsTemplate $searchJSFile . | resources.Minify | resources.Fingerprint }} + + +{{ end -}} + +{{- if .Site.Params.BookServiceWorker -}} + {{- $swJS := resources.Get "sw-register.js" | resources.ExecuteAsTemplate "sw.js" . | resources.Minify | resources.Fingerprint }} + +{{ end -}} + +{{- template "_internal/google_analytics.html" . -}} + + +{{- with .OutputFormats.Get "rss" -}} + {{ printf `` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} +{{ end -}} + +{{ "" | safeHTML }} + +{{- define "integrity" -}} + {{- if (urls.Parse .Permalink).Host -}} + integrity="{{ .Data.Integrity }}" crossorigin="anonymous" + {{- end -}} +{{- end -}} diff --git a/themes/hugo-book/layouts/partials/docs/inject/body.html b/themes/hugo-book/layouts/partials/docs/inject/body.html new file mode 100644 index 0000000..e69de29 diff --git a/themes/hugo-book/layouts/partials/docs/inject/content-after.html b/themes/hugo-book/layouts/partials/docs/inject/content-after.html new file mode 100644 index 0000000..e69de29 diff --git a/themes/hugo-book/layouts/partials/docs/inject/content-before.html b/themes/hugo-book/layouts/partials/docs/inject/content-before.html new file mode 100644 index 0000000..e69de29 diff --git a/themes/hugo-book/layouts/partials/docs/inject/footer.html b/themes/hugo-book/layouts/partials/docs/inject/footer.html new file mode 100644 index 0000000..e69de29 diff --git a/themes/hugo-book/layouts/partials/docs/inject/head.html b/themes/hugo-book/layouts/partials/docs/inject/head.html new file mode 100644 index 0000000..e69de29 diff --git a/themes/hugo-book/layouts/partials/docs/inject/menu-after.html b/themes/hugo-book/layouts/partials/docs/inject/menu-after.html new file mode 100644 index 0000000..e69de29 diff --git a/themes/hugo-book/layouts/partials/docs/inject/menu-before.html b/themes/hugo-book/layouts/partials/docs/inject/menu-before.html new file mode 100644 index 0000000..e69de29 diff --git a/themes/hugo-book/layouts/partials/docs/inject/toc-after.html b/themes/hugo-book/layouts/partials/docs/inject/toc-after.html new file mode 100644 index 0000000..e69de29 diff --git a/themes/hugo-book/layouts/partials/docs/inject/toc-before.html b/themes/hugo-book/layouts/partials/docs/inject/toc-before.html new file mode 100644 index 0000000..e69de29 diff --git a/themes/hugo-book/layouts/partials/docs/languages.html b/themes/hugo-book/layouts/partials/docs/languages.html new file mode 100644 index 0000000..51aabdd --- /dev/null +++ b/themes/hugo-book/layouts/partials/docs/languages.html @@ -0,0 +1,33 @@ + +{{ $bookTranslatedOnly := default false .Site.Params.BookTranslatedOnly }} +{{ $translations := dict }} +{{ if (eq $bookTranslatedOnly false ) }} + {{ range .Site.Home.Translations }} + {{ $translations = merge $translations (dict .Language.Lang .) }} + {{ end }} +{{ end }} +{{ range .Translations }} + {{ $translations = merge $translations (dict .Language.Lang .) }} +{{ end }} + + diff --git a/themes/hugo-book/layouts/partials/docs/links/commit.html b/themes/hugo-book/layouts/partials/docs/links/commit.html new file mode 100644 index 0000000..8ab9334 --- /dev/null +++ b/themes/hugo-book/layouts/partials/docs/links/commit.html @@ -0,0 +1,2 @@ +{{- $commitPath := default "commit" .Site.Params.BookCommitPath -}} +{{- .Site.Params.BookRepo }}/{{ $commitPath }}/{{ .GitInfo.Hash -}} \ No newline at end of file diff --git a/themes/hugo-book/layouts/partials/docs/links/edit.html b/themes/hugo-book/layouts/partials/docs/links/edit.html new file mode 100644 index 0000000..920affa --- /dev/null +++ b/themes/hugo-book/layouts/partials/docs/links/edit.html @@ -0,0 +1,2 @@ +{{- $bookFilePath := (strings.TrimPrefix hugo.WorkingDir .Page.File.Filename | path.Join) -}} +{{- .Site.Params.BookRepo }}/{{ .Site.Params.BookEditPath }}{{ ($bookFilePath) -}} \ No newline at end of file diff --git a/themes/hugo-book/layouts/partials/docs/menu-filetree.html b/themes/hugo-book/layouts/partials/docs/menu-filetree.html new file mode 100644 index 0000000..1494588 --- /dev/null +++ b/themes/hugo-book/layouts/partials/docs/menu-filetree.html @@ -0,0 +1,49 @@ +{{ $bookSection := default "docs" .Site.Params.BookSection }} +{{ if eq $bookSection "*" }} + {{ $bookSection = "/" }}{{/* Backward compatibility */}} +{{ end }} + +{{ with .Site.GetPage $bookSection }} + {{ template "book-section-children" (dict "Section" . "CurrentPage" $) }} +{{ end }} + +{{ define "book-section-children" }}{{/* (dict "Section" .Section "CurrentPage" .CurrentPage) */}} + +{{ end }} + +{{ define "book-page-link" }}{{/* (dict "Page" .Page "CurrentPage" .CurrentPage) */}} + {{ $current := eq .CurrentPage .Page }} + {{ $ancestor := .Page.IsAncestor .CurrentPage }} + + {{ if .Page.Params.BookCollapseSection }} + + + {{ else if .Page.Params.BookHref }} + + {{- partial "docs/title" .Page -}} + + {{ else if .Page.Content }} + + {{- partial "docs/title" .Page -}} + + {{ else }} + {{- partial "docs/title" .Page -}} + {{ end }} +{{ end }} diff --git a/themes/hugo-book/layouts/partials/docs/menu-hugo.html b/themes/hugo-book/layouts/partials/docs/menu-hugo.html new file mode 100644 index 0000000..5f01be0 --- /dev/null +++ b/themes/hugo-book/layouts/partials/docs/menu-hugo.html @@ -0,0 +1,28 @@ + +{{ if . }} + {{ template "book-menu-hugo" . }} +{{ end }} + +{{ define "book-menu-hugo" }} + +{{ end }} diff --git a/themes/hugo-book/layouts/partials/docs/menu.html b/themes/hugo-book/layouts/partials/docs/menu.html new file mode 100644 index 0000000..dbb2e49 --- /dev/null +++ b/themes/hugo-book/layouts/partials/docs/menu.html @@ -0,0 +1,21 @@ + + + +{{ $script := resources.Get "menu-reset.js" | resources.Minify }} +{{ with $script.Content }} + +{{ end }} diff --git a/themes/hugo-book/layouts/partials/docs/post-meta.html b/themes/hugo-book/layouts/partials/docs/post-meta.html new file mode 100644 index 0000000..457e2c0 --- /dev/null +++ b/themes/hugo-book/layouts/partials/docs/post-meta.html @@ -0,0 +1,16 @@ +{{ with .Date }} +
+ + {{ partial "docs/date" (dict "Date" . "Format" $.Site.Params.BookDateFormat) }} +
+{{ end }} + +{{ range $taxonomy, $_ := .Site.Taxonomies }} + {{ with $terms := $.GetTerms $taxonomy }} +
+ {{ range $n, $term := $terms }}{{ if $n }}, {{ end }} + {{ $term.Title }} + {{- end }} +
+ {{ end }} +{{ end }} diff --git a/themes/hugo-book/layouts/partials/docs/search.html b/themes/hugo-book/layouts/partials/docs/search.html new file mode 100644 index 0000000..937f595 --- /dev/null +++ b/themes/hugo-book/layouts/partials/docs/search.html @@ -0,0 +1,8 @@ +{{ if default true .Site.Params.BookSearch }} + + +{{ end }} diff --git a/themes/hugo-book/layouts/partials/docs/taxonomy.html b/themes/hugo-book/layouts/partials/docs/taxonomy.html new file mode 100644 index 0000000..63ef315 --- /dev/null +++ b/themes/hugo-book/layouts/partials/docs/taxonomy.html @@ -0,0 +1,19 @@ + diff --git a/themes/hugo-book/layouts/partials/docs/title.html b/themes/hugo-book/layouts/partials/docs/title.html new file mode 100644 index 0000000..83df5b6 --- /dev/null +++ b/themes/hugo-book/layouts/partials/docs/title.html @@ -0,0 +1,17 @@ + +{{ $title := "" }} + +{{ if .LinkTitle }} + {{ $title = .LinkTitle }} +{{ else if .Title }} + {{ $title = .Title }} +{{ else if and .IsSection .File }} + {{ $title = path.Base .File.Dir | humanize | title }} +{{ else if and .IsPage .File }} + {{ $title = .File.BaseFileName | humanize | title }} +{{ end }} + +{{ return $title }} diff --git a/themes/hugo-book/layouts/partials/docs/toc.html b/themes/hugo-book/layouts/partials/docs/toc.html new file mode 100644 index 0000000..64697a4 --- /dev/null +++ b/themes/hugo-book/layouts/partials/docs/toc.html @@ -0,0 +1,3 @@ +{{ partial "docs/inject/toc-before" . }} +{{ .TableOfContents }} +{{ partial "docs/inject/toc-after" . }} -- cgit v1.2.3