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

github.com/danielkvist/hugo-terrassa-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordanielkvist <d94.zaragoza@gmail.com>2019-01-13 20:06:19 +0300
committerdanielkvist <d94.zaragoza@gmail.com>2019-01-13 20:06:19 +0300
commitccf672d5f3ba4158eb10cd21b6f9f9fd2c47f678 (patch)
treeadbc85ce8ac6a2015bf09db2e0b0e139affab445
parent0fb7aece1e7c64f223ecc9b3bdc54be9a9ce4812 (diff)
fix issue #2v1.6.2
-rw-r--r--README.md2
-rw-r--r--layouts/partials/hero.html5
2 files changed, 2 insertions, 5 deletions
diff --git a/README.md b/README.md
index 71a91b8..0f793cc 100644
--- a/README.md
+++ b/README.md
@@ -91,8 +91,6 @@ Some properties are used as follows:
* *images*: in the case of the home page the first image is used as the background image for the hero and to share on social networks (with [Twitter Cards](https://developer.twitter.com/en/docs/tweets/optimize-with-cards/overview/abouts-cards.html) and [Facebook Graph](https://developers.facebook.com/docs/graph-api/)). In every other page or post is used only for share on social networks.
* *weight*: sets the order of the items in the menu.
-> At the moment you need to add an entry *images: []* on the front matter of your *_index.md* (According to the front matter format you have chosen). This option is used as background for the hero and can be left as an empty array if you do not want to use any background image.
-
## Home page Sections
To create a new section in your Home page follow the next steps:
diff --git a/layouts/partials/hero.html b/layouts/partials/hero.html
index 942781b..313831f 100644
--- a/layouts/partials/hero.html
+++ b/layouts/partials/hero.html
@@ -1,6 +1,5 @@
-{{ $bkg := index $.Params.images 0 }}
-
-<main class="hero" style="background-image: url('{{ $.Site.BaseURL }}images/{{ print $bkg }}');">
+<main class="hero" {{ if $.Params.images }} style="background-image: url('{{ $.Site.BaseURL }}images/{{ print (index $.Params.images 0) }}');"
+ {{ end }}>
<div class="hero__caption">
{{ .Content }}
{{ if .Site.Params.cta.show }}