Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/danielkvist/hugo-piercer-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordanielkvist <d94.zaragoza@gmail.com>2019-04-07 22:16:40 +0300
committerdanielkvist <d94.zaragoza@gmail.com>2019-04-07 22:16:40 +0300
commit13098c6ddcddfe7f38183979a1bd32660a2dbb96 (patch)
tree1d695773e9efb65447d26482498db62d740a4ba0
parentb043eba7d464bbc74674858396f8c2876e8b7bc9 (diff)
fix problem with background imagesv1.0
-rw-r--r--exampleSite/content/blog/emojis.md3
-rw-r--r--exampleSite/content/blog/markdown.md2
-rw-r--r--exampleSite/content/blog/placeholder.md2
-rw-r--r--exampleSite/content/blog/rich_content.md2
-rw-r--r--layouts/partials/hero.html3
5 files changed, 7 insertions, 5 deletions
diff --git a/exampleSite/content/blog/emojis.md b/exampleSite/content/blog/emojis.md
index d0a4509..7023688 100644
--- a/exampleSite/content/blog/emojis.md
+++ b/exampleSite/content/blog/emojis.md
@@ -1,10 +1,9 @@
---
title: "Emojis"
description: "Emoji can be enabled in a Hugo project in a number of ways."
-date: 2019-03-28T12:24:47+01:00
publishDate: 2019-03-28T12:24:47+01:00
author: "John Doe"
-draft: true
+draft: false
images: []
tags: ["emojis", "hugo"]
---
diff --git a/exampleSite/content/blog/markdown.md b/exampleSite/content/blog/markdown.md
index 02b367b..5dbcb03 100644
--- a/exampleSite/content/blog/markdown.md
+++ b/exampleSite/content/blog/markdown.md
@@ -4,7 +4,7 @@ description: ""
date: 2019-03-28T12:39:56+01:00
publishDate: 2019-03-28T12:39:56+01:00
author: ""
-draft: true
+draft: false
images: []
tags: ["markdown", "hugo"]
---
diff --git a/exampleSite/content/blog/placeholder.md b/exampleSite/content/blog/placeholder.md
index 9ab7450..390e792 100644
--- a/exampleSite/content/blog/placeholder.md
+++ b/exampleSite/content/blog/placeholder.md
@@ -4,7 +4,7 @@ description: ""
date: 2019-03-28T12:41:07+01:00
publishDate: 2019-03-28T12:41:07+01:00
author: ""
-draft: true
+draft: false
images: []
tags: ["placeholder", "hugo"]
---
diff --git a/exampleSite/content/blog/rich_content.md b/exampleSite/content/blog/rich_content.md
index d958f8d..53d7161 100644
--- a/exampleSite/content/blog/rich_content.md
+++ b/exampleSite/content/blog/rich_content.md
@@ -4,7 +4,7 @@ description: ""
date: 2019-03-28T12:42:22+01:00
publishDate: 2019-03-28T12:42:22+01:00
author: ""
-draft: true
+draft: false
images: []
tags: ["rich", "content", "hugo"]
---
diff --git a/layouts/partials/hero.html b/layouts/partials/hero.html
index fab00d2..9e64e5f 100644
--- a/layouts/partials/hero.html
+++ b/layouts/partials/hero.html
@@ -1,9 +1,12 @@
{{ $bkg := "" }}
+
+{{ if .Params.images }}
{{ if gt (len .Params.images) 0 }}
{{ $bkgImage := print (index .Params.images 0) }}
{{ $bkgURL := printf "%s%s" $.Site.BaseURL $bkgImage }}
{{ $bkg = printf "%s%s%s" "background-image: url('" $bkgURL "');"}}
{{ end }}
+{{ end }}
<section class="hero bkg-image" style="{{ safeCSS $bkg }}" id="hero">