From 1e17ccb8012d9ff48ceba737e49ec5e5444247d6 Mon Sep 17 00:00:00 2001 From: Track3 Date: Tue, 1 Jan 2019 17:53:20 +0800 Subject: Remove inline style and script of bg-img * See #22 --- layouts/index.html | 22 ++++++++++++++++------ layouts/partials/header.html | 4 ++-- layouts/posts/single.html | 22 ++++++++++++++++------ 3 files changed, 34 insertions(+), 14 deletions(-) (limited to 'layouts') diff --git a/layouts/index.html b/layouts/index.html index 0535cbb..7927023 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,10 +1,20 @@ +{{ define "head" }} + +{{ end }} + {{ define "main" }} - {{- if .Site.Params.bgImg }} -
- {{- else if .Site.Params.images }} - {{- range first 1 .Site.Params.images }} -
- {{- end }} + {{- if (or .Site.Params.images .Site.Params.bgImg) }} +
{{- end }}
diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 47b04b7..f643337 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -12,10 +12,10 @@
{{ if (or .Params.images .Params.featuredImg) -}} - + {{- end }} {{- with .Params.toc -}} - + {{- end }} {{- with .Site.Params.social -}} {{ partialCached "social-icons.html" . }} diff --git a/layouts/posts/single.html b/layouts/posts/single.html index 026a626..dc70fd3 100644 --- a/layouts/posts/single.html +++ b/layouts/posts/single.html @@ -1,14 +1,24 @@ +{{ define "head" }} + +{{ end }} + {{ define "header" }} {{ partial "header.html" . }} {{ end }} {{ define "main" }} - {{- if .Params.featuredImg }} -
- {{- else if .Params.images }} - {{- range first 1 .Params.images }} -
- {{- end }} + {{- if (or .Params.images .Params.featuredImg) }} +
{{- end }}
-- cgit v1.2.3