diff options
author | Paul <paul@brainspark.nl> | 2020-03-10 22:55:49 +0300 |
---|---|---|
committer | Paul <paul@brainspark.nl> | 2020-03-10 22:55:49 +0300 |
commit | 74d27990cb1f4d5b4f98cc0dd1d15009068fc311 (patch) | |
tree | 8e4bdcaf419f5fc94eac4547fa7e1def01ffe52a | |
parent | 246a66ae57016d1831e4c5b60e4ee8731c6188f4 (diff) |
Made homeType flexible as well
-rw-r--r-- | layouts/index.html | 8 | ||||
-rw-r--r-- | layouts/partials/homes/no_row.html | 7 | ||||
-rw-r--r-- | layouts/partials/homes/simple.html | 11 |
3 files changed, 21 insertions, 5 deletions
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" }} - <div role="main" class="container"> - {{ with .Content }} - {{.}} - {{ end }} - </div> + {{- $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 @@ + <div role="main" class="container"> + <article> + {{ with .Content }} + {{.}} + {{ end }} + </article> + </div> 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 @@ + <div role="main" class="container"> + <article> + <div class="row justify-content-center"> + <div class="col-md-8"> + {{ with .Content }} + {{.}} + {{ end }} + </div> + </div> + </article> + </div> |