From ba5d38ad4427bcda21a4cc57689464ed58d8b9a0 Mon Sep 17 00:00:00 2001 From: Alex Shpak Date: Fri, 24 Jan 2020 00:07:47 +0100 Subject: Rework of main template, adds options for more fine customisation --- layouts/_default/baseof.html | 61 +++++++++++++++++++++++++++----- layouts/partials/docs/brand.html | 2 +- layouts/partials/docs/footer.html | 29 ++++++--------- layouts/partials/docs/header.html | 11 ++++++ layouts/partials/docs/menu.html | 6 ++-- layouts/partials/docs/mobile-header.html | 8 ----- layouts/partials/docs/post-meta.html | 6 ++-- layouts/partials/docs/taxonomy.html | 2 -- layouts/partials/docs/toc.html | 11 +----- layouts/shortcodes/expand.html | 2 +- 10 files changed, 83 insertions(+), 55 deletions(-) create mode 100644 layouts/partials/docs/header.html delete mode 100644 layouts/partials/docs/mobile-header.html (limited to 'layouts') diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index a2eb80e..a9c4da1 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -7,24 +7,69 @@ - -
- {{ template "toc" . }} +
+
- {{ partial "docs/mobile-header" . }} - {{ template "main" . }} - {{ partial "docs/footer" . }} +
+ {{ template "header" . }} +
+ + {{ template "main" . }} + +
+ {{ template "footer" . }} + {{ template "comments" . }} +
{{ partial "docs/inject/footer" . }}
-
{{ partial "docs/inject/body" . }} + +{{ define "menu" }} + {{ partial "docs/menu" . }} +{{ end }} + +{{ define "header" }} + {{ partial "docs/header" . }} + + {{ if default true (default .Site.Params.BookToC .Params.BookToC) }} + + + {{ end }} +{{ end }} + +{{ define "footer" }} + {{ partial "docs/footer" . }} +{{ end }} + +{{ define "comments" }} + {{ if and .Content (default true (default .Site.Params.BookComments .Params.BookComments)) }} +
+ {{- partial "docs/comments" . -}} +
+ {{ end }} +{{ end }} + +{{ define "main" }} + {{ .Content }} +{{ end }} + +{{ define "toc" }} + {{ .TableOfContents }} +{{ end }} diff --git a/layouts/partials/docs/brand.html b/layouts/partials/docs/brand.html index 7d3ca3a..3fab74b 100644 --- a/layouts/partials/docs/brand.html +++ b/layouts/partials/docs/brand.html @@ -1,5 +1,5 @@

- + {{- with .Site.Params.BookLogo -}} Logo {{- end -}} diff --git a/layouts/partials/docs/footer.html b/layouts/partials/docs/footer.html index 0665f86..f9ca80d 100644 --- a/layouts/partials/docs/footer.html +++ b/layouts/partials/docs/footer.html @@ -1,33 +1,24 @@ - diff --git a/layouts/partials/docs/header.html b/layouts/partials/docs/header.html new file mode 100644 index 0000000..23834df --- /dev/null +++ b/layouts/partials/docs/header.html @@ -0,0 +1,11 @@ +
+ + + {{ partial "docs/title" . }} + + +
diff --git a/layouts/partials/docs/menu.html b/layouts/partials/docs/menu.html index 6e41096..0db676f 100644 --- a/layouts/partials/docs/menu.html +++ b/layouts/partials/docs/menu.html @@ -1,12 +1,12 @@ -