From 74d27990cb1f4d5b4f98cc0dd1d15009068fc311 Mon Sep 17 00:00:00 2001 From: Paul Date: Tue, 10 Mar 2020 20:55:49 +0100 Subject: Made homeType flexible as well --- layouts/index.html | 8 +++----- layouts/partials/homes/no_row.html | 7 +++++++ layouts/partials/homes/simple.html | 11 +++++++++++ 3 files changed, 21 insertions(+), 5 deletions(-) create mode 100644 layouts/partials/homes/no_row.html create mode 100644 layouts/partials/homes/simple.html diff --git a/layouts/index.html b/layouts/index.html index 9e50639..24116eb 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,7 +1,5 @@ {{ define "main" }} -
- {{ with .Content }} - {{.}} - {{ end }} -
+ {{- $home_type := .Params.homeType | default .Site.Params.homeType | default "simple" }} + {{- $home_file := printf "homes/%s.html" $home_type }} + {{- partial $home_file . }} {{ end }} diff --git a/layouts/partials/homes/no_row.html b/layouts/partials/homes/no_row.html new file mode 100644 index 0000000..271c214 --- /dev/null +++ b/layouts/partials/homes/no_row.html @@ -0,0 +1,7 @@ +
+
+ {{ with .Content }} + {{.}} + {{ end }} +
+
diff --git a/layouts/partials/homes/simple.html b/layouts/partials/homes/simple.html new file mode 100644 index 0000000..b0843fe --- /dev/null +++ b/layouts/partials/homes/simple.html @@ -0,0 +1,11 @@ +
+
+
+
+ {{ with .Content }} + {{.}} + {{ end }} +
+
+
+
-- cgit v1.2.3