From 773e2d43f339e9216d7d71d0a21f38f1e36c3f44 Mon Sep 17 00:00:00 2001
From: Alan Pearce
Date: Mon, 6 Jan 2020 20:38:53 +0100
Subject: Convert to block-based templates
---
layouts/404.html | 4 ++--
layouts/_default/baseof.html | 29 +++++++++++++++++++++++++++++
layouts/_default/list.html | 2 +-
layouts/_default/single.html | 4 ++--
layouts/_default/terms.html | 4 ++--
5 files changed, 36 insertions(+), 7 deletions(-)
create mode 100644 layouts/_default/baseof.html
(limited to 'layouts')
diff --git a/layouts/404.html b/layouts/404.html
index c2e4e40..24a9633 100644
--- a/layouts/404.html
+++ b/layouts/404.html
@@ -1,5 +1,5 @@
-{{ partial "header.html" . }}
+{{ define "main" }}
404 NOT FOUND
-{{ partial "footer.html" . }}
+{{- end }}
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
new file mode 100644
index 0000000..100293c
--- /dev/null
+++ b/layouts/_default/baseof.html
@@ -0,0 +1,29 @@
+
+
+
+
+
+ {{ .Title }} | {{ .Site.Title }}
+
+
+
+
+
+
+ {{ block "main" . }}{{ end }}
+
+
+
+
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index 7ccfef6..bf0af50 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -1,4 +1,4 @@
-{{ partial "header.html" . }}
+{{ define "main" }}
{{if not .IsHome }}
{{ .Title | markdownify }}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 0372f1d..bde04ef 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -1,4 +1,4 @@
-{{ partial "header.html" . }}
+{{ define "main" }}
{{ .Title | markdownify }}
{{ with .Params.author }}{{ . }}
{{ end }}
@@ -9,4 +9,4 @@
{{ .Content }}
-{{ partial "footer.html" . }}
+{{- end }}
diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html
index 71f47e7..15de7a9 100644
--- a/layouts/_default/terms.html
+++ b/layouts/_default/terms.html
@@ -1,4 +1,4 @@
-{{ partial "header.html" . }}
+{{ define "main" }}
{{ .Title }}
@@ -10,4 +10,4 @@
{{ end }}
-{{ partial "footer.html" . }}
+{{- end }}
--
cgit 1.4.1