From 82832c1244f2d536c754efb98fbdb02b1844f4c7 Mon Sep 17 00:00:00 2001 From: digitalcraftsman Date: Thu, 7 Sep 2017 21:41:16 +0200 Subject: Make use of the base template --- layouts/404.html | 16 ++++------------ layouts/_default/baseof.html | 8 ++++++++ layouts/_default/list.html | 25 +++++++++---------------- layouts/_default/single.html | 29 +++++++++++------------------ layouts/index.html | 33 ++++++++++----------------------- 5 files changed, 42 insertions(+), 69 deletions(-) create mode 100644 layouts/_default/baseof.html (limited to 'layouts') diff --git a/layouts/404.html b/layouts/404.html index 8fa1a59..a919514 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -1,12 +1,4 @@ -{{ partial "head.html" . }} - - -{{ partial "sidebar.html" . }} - -
-

404: Page not found

-

Sorry, we've misplaced that URL or it's pointing to something that doesn't exist. Head back home to try finding it again.

-
- - - +{{ define "main" -}} +

404: Page not found

+

Sorry, we've misplaced that URL or it's pointing to something that doesn't exist. Head back home to try finding it again.

+{{- end }} \ No newline at end of file diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html new file mode 100644 index 0000000..a45cf37 --- /dev/null +++ b/layouts/_default/baseof.html @@ -0,0 +1,8 @@ +{{ partial "head.html" . }} + + {{ partial "sidebar.html" . }} +
+ {{ block "main" . -}}{{- end }} +
+ + \ No newline at end of file diff --git a/layouts/_default/list.html b/layouts/_default/list.html index c362b25..c6d3b69 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,16 +1,9 @@ -{{ partial "head.html" . }} - - - {{ partial "sidebar.html" . }} - -
- -
- - +{{ define "main" -}} + +{{- end }} \ No newline at end of file diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 26149e7..2317495 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,19 +1,12 @@ -{{ partial "head.html" . }} - - {{ partial "sidebar.html" . }} +{{ define "main" -}} +
+

{{ .Title }}

+ {{ .Date.Format "Mon, Jan 2, 2006" }} + {{ .Content }} +
-
-
-

{{ .Title }}

- - {{ .Content }} -
- - {{ if .Site.Params.disqusShortname }} -

Comments

- {{ partial "disqus" . }} - {{ end }} -
- - - \ No newline at end of file +{{ if .Site.Params.disqusShortname -}} +

Comments

+{{ partial "disqus" . }} +{{- end }} +{{- end }} \ No newline at end of file diff --git a/layouts/index.html b/layouts/index.html index 36f3ac2..3fed5be 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,26 +1,13 @@ -{{ partial "head.html" . }} - - -{{ partial "sidebar.html" . }} - -
+{{ define "main" -}}
- - {{ range .Data.Pages }} -
-

- - {{ .Title }} - -

- - - - {{ .Content }} -
- {{ end }} +{{ range .Data.Pages -}} +
+

+ {{ .Title }} +

+ + {{ .Content }}
+{{- end }}
- - - +{{- end }} \ No newline at end of file -- cgit 1.4.1