From 4b9b865f2c37e9345c49ff381fda23533eb35416 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Sun, 25 Jun 2017 11:31:05 +0100 Subject: [PATCH] Move content to partial --- layouts/_default/list.html | 12 +----------- layouts/_default/single.html | 13 +------------ layouts/partials/content.html | 14 ++++++++++++++ layouts/projects/single.html | 13 +------------ 4 files changed, 17 insertions(+), 35 deletions(-) create mode 100644 layouts/partials/content.html diff --git a/layouts/_default/list.html b/layouts/_default/list.html index c1e055a..dfc4211 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,17 +1,7 @@ {{ partial "page_start.html" . }}
-
-

{{ title .Title }}

-
- {{ if .Content }} -
- {{ if .Params.image }} - - {{ end }} - {{ .Content }} -
- {{ end }} + {{ partial "content.html" . }} {{ if ne .Params.hide_pages "true" }}
{{ $parent := . }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index b6a79df..5fc58b8 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,18 +1,7 @@ {{ partial "page_start.html" . }}
-
-

{{ title .Title }}

- {{ if .Params.subtitle }} -

{{ markdownify .Params.subtitle }}

- {{ end }} -
-
- {{ if .Params.image }} - - {{ end }} - {{ .Content }} -
+ {{ partial "content.html" . }}
{{ partial "page_end.html" . }} diff --git a/layouts/partials/content.html b/layouts/partials/content.html new file mode 100644 index 0000000..248615e --- /dev/null +++ b/layouts/partials/content.html @@ -0,0 +1,14 @@ +
+

{{ title .Title }}

+ {{ if .Params.subtitle }} +

{{ markdownify .Params.subtitle }}

+ {{ end }} +
+{{ if .Content }} +
+ {{ if .Params.image }} + + {{ end }} + {{ .Content }} +
+{{ end }} diff --git a/layouts/projects/single.html b/layouts/projects/single.html index dfe3919..c3a29ef 100644 --- a/layouts/projects/single.html +++ b/layouts/projects/single.html @@ -1,18 +1,7 @@ {{ partial "page_start.html" . }}
-
-

{{ title .Title }}

- {{ if .Params.subtitle }} -

{{ markdownify .Params.subtitle }}

- {{ end }} -
-
- {{ if .Params.image }} - - {{ end }} - {{ .Content }} -
+ {{ partial "content.html" . }}
    {{ if .Params.download_url }}