From 4c9597ef7e450a694701d0803ed5422558b11c1c Mon Sep 17 00:00:00 2001 From: Tiger Oakes Date: Sat, 5 Sep 2020 22:30:58 -0700 Subject: [PATCH] Add baseof layout --- site/layouts/_default/404.html | 24 ++------ site/layouts/_default/baseof.html | 20 +++++++ site/layouts/_default/docs.html | 95 ++++++++++++++----------------- site/layouts/_default/home.html | 27 +++------ site/layouts/_default/single.html | 83 ++++++++++++--------------- 5 files changed, 110 insertions(+), 139 deletions(-) create mode 100644 site/layouts/_default/baseof.html diff --git a/site/layouts/_default/404.html b/site/layouts/_default/404.html index 744865cd4f..c9eecff003 100644 --- a/site/layouts/_default/404.html +++ b/site/layouts/_default/404.html @@ -1,18 +1,6 @@ - - - - {{ partial "header" . }} - - - {{ partial "skippy" . }} - - {{ partial "docs-navbar" . }} - -
- {{ .Content }} -
- - {{ partial "footer" . }} - {{ partial "scripts" . }} - - +{{ define "body_override" }}{{ end }} +{{ define "main" }} +
+ {{ .Content }} +
+{{ end }} diff --git a/site/layouts/_default/baseof.html b/site/layouts/_default/baseof.html new file mode 100644 index 0000000000..713ab2864a --- /dev/null +++ b/site/layouts/_default/baseof.html @@ -0,0 +1,20 @@ + + + + {{ partial "header" . }} + + {{ block "body_override" . }}{{ end }} + {{ partial "skippy" . }} + + {{ partial "docs-navbar" . }} + + {{ block "main" . }} + {{ end }} + + {{ partial "footer" . }} + {{ partial "scripts" . }} + + {{ block "footer" . }} + {{ end }} + + diff --git a/site/layouts/_default/docs.html b/site/layouts/_default/docs.html index cf237dd7b8..078c0c327c 100644 --- a/site/layouts/_default/docs.html +++ b/site/layouts/_default/docs.html @@ -1,60 +1,49 @@ - - - - {{ partial "header" . }} - - - {{ partial "skippy" . }} +{{ define "main" }} + {{ partial "docs-subnav" . }} - {{ partial "docs-navbar" . }} - {{ partial "docs-subnav" . }} +
+ -
- - -
-
-
- View on GitHub -

{{ .Title | markdownify }}

-
-

{{ .Page.Params.Description | markdownify }}

- {{ partial "ads" . }} +
+
+
+ View on GitHub +

{{ .Title | markdownify }}

+

{{ .Page.Params.Description | markdownify }}

+ {{ partial "ads" . }} +
- {{ if (eq .Page.Params.toc true) }} -
- On this page - {{ .TableOfContents }} + {{ if (eq .Page.Params.toc true) }} +
+ On this page + {{ .TableOfContents }} +
+ {{ end }} + +
+ {{ if .Page.Params.sections }} +
+ {{ range .Page.Params.sections }} + + {{ end }}
{{ end }} -
- {{ if .Page.Params.sections }} -
- {{ range .Page.Params.sections }} - - {{ end }} -
- {{ end }} - - {{ .Content }} -
-
-
- - {{ partial "footer" . }} - {{ partial "scripts" . }} - - {{ range .Page.Params.extra_js -}} - - {{- end -}} - - + {{ .Content }} +
+ +
+{{ end }} +{{ define "footer" }} + {{ range .Page.Params.extra_js -}} + + {{- end -}} +{{ end }} diff --git a/site/layouts/_default/home.html b/site/layouts/_default/home.html index 105c86b54b..28bcf0c64d 100644 --- a/site/layouts/_default/home.html +++ b/site/layouts/_default/home.html @@ -1,21 +1,8 @@ - - - - {{ partial "header" . }} - - - {{ partial "skippy" . }} +{{ define "main" }} +
+ {{ partial "home/masthead" . }} + {{ partial "home/masthead-followup" . }} +
- {{ partial "docs-navbar" . }} - -
- {{ partial "home/masthead" . }} - {{ partial "home/masthead-followup" . }} -
- - {{ .Content }} - - {{ partial "footer" . }} - {{ partial "scripts" . }} - - + {{ .Content }} +{{ end }} diff --git a/site/layouts/_default/single.html b/site/layouts/_default/single.html index 2afde6ec1a..408ee5cb36 100644 --- a/site/layouts/_default/single.html +++ b/site/layouts/_default/single.html @@ -1,54 +1,41 @@ - - - - {{ partial "header" . }} - - - {{ partial "skippy" . }} - - {{ partial "docs-navbar" . }} - -
-
-

{{ .Title | markdownify }}

-

{{ .Page.Params.Description | markdownify }}

- {{ if eq .Title "Examples" }} - - {{ end }} - {{ partial "ads" . }} +{{ define "main" }} +
+
+

{{ .Title | markdownify }}

+

{{ .Page.Params.Description | markdownify }}

+ {{ if eq .Title "Examples" }} + -
+ {{ end }} + {{ partial "ads" . }} +
+
-
-
- {{ .Content }} +
+
+ {{ .Content }} - {{ if eq .Title "Examples" }} -
-
-
-
- {{ partial "icons/droplet-fill.svg" (dict "width" "32" "height" "32") }} -
-

Go further with Bootstrap Themes

-

- Need something more than these examples? Take Bootstrap to the next level with premium themes from the official Bootstrap Themes marketplace. They’re built as their own extended frameworks, rich with new components and plugins, documentation, and powerful build tools. -

- Browse themes + {{ if eq .Title "Examples" }} +
+
+
+
+ {{ partial "icons/droplet-fill.svg" (dict "width" "32" "height" "32") }}
- Go further with Bootstrap Themes +

+ Need something more than these examples? Take Bootstrap to the next level with premium themes from the official Bootstrap Themes marketplace. They’re built as their own extended frameworks, rich with new components and plugins, documentation, and powerful build tools. +

+ Browse themes +
+ Bootstrap Themes -
- {{ end }} -
-
- - {{ partial "footer" . }} - {{ partial "scripts" . }} - - +
+ {{ end }} + +
+{{ end }}