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

github.com/schmanat/hugo-highlights-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManuel Schneider <manuel.schneider@schman.at>2016-11-25 09:48:46 +0300
committerManuel Schneider <manuel.schneider@schman.at>2016-11-25 09:48:46 +0300
commitbf264f2cfd07d7c2b15288bf74292b07187411b2 (patch)
tree5d18d09678b70370738dc3b5884e671a2d0c5632
parent2389fdeae8f294248dd56a2141e1e30a1b77da76 (diff)
add feature to disable background (images) per section
-rw-r--r--exampleSite/config.toml5
-rw-r--r--layouts/partials/about.html4
-rw-r--r--layouts/partials/infos.html4
-rw-r--r--layouts/partials/skills.html4
4 files changed, 14 insertions, 3 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index 077e080..2771375 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -32,6 +32,11 @@ googleAnalytics = ""
# - That's all. Enjoy mailing!
email = "your@mail.com"
+ # If this param is set to true, every section gets an own background image (located at static/images)
+ # to change the image you could use the param picture on every section.
+ # If it's disabled you could change the background to overwrite the bg.png and overlay.png to set the background.
+ backgroundpersection = true
+
# Hero Section
[params.hero]
title = "Highlights"
diff --git a/layouts/partials/about.html b/layouts/partials/about.html
index 5729706..0cc1b83 100644
--- a/layouts/partials/about.html
+++ b/layouts/partials/about.html
@@ -2,7 +2,9 @@
{{ "<!-- about -->" | safeHTML }}
<section id="about" class="main special">
<div class="container">
- <span class="image fit primary"><img src="images/{{ with .Site.Params.about.picture }}{{ . }}{{end}} " alt="" /></span>
+ {{ if eq .Site.Params.backgroundpersection true }}
+ <span class="image fit primary"><img src="images/{{ with .Site.Params.infos.picture }}{{ . }}{{ end }}" alt="" /></span>
+ {{ end }}
<div class="content">
<header class="major">
<h2>{{ with .Site.Params.about.title }}{{ . | markdownify }}{{ end }}</h2>
diff --git a/layouts/partials/infos.html b/layouts/partials/infos.html
index 7b0523b..d8750d5 100644
--- a/layouts/partials/infos.html
+++ b/layouts/partials/infos.html
@@ -1,7 +1,9 @@
{{ "<!-- Infos -->" | safeHTML }}
<section id="infos" class="main special">
<div class="container">
- <span class="image fit primary"><img src="images/{{ with .Site.Params.infos.picture }}{{ . }}{{ end }}" alt="" /></span>
+ {{ if eq .Site.Params.backgroundpersection true }}
+ <span class="image fit primary"><img src="images/{{ with .Site.Params.infos.picture }}{{ . }}{{ end }}" alt="" /></span>
+ {{ end }}
<div class="content">
<header class="major">
<h2>{{ with .Site.Params.infos.title}}{{ . | markdownify }}{{ end }}</h2>
diff --git a/layouts/partials/skills.html b/layouts/partials/skills.html
index 8c0f081..795c599 100644
--- a/layouts/partials/skills.html
+++ b/layouts/partials/skills.html
@@ -1,7 +1,9 @@
{{ "<!-- Services -->" | safeHTML }}
<section id="skills" class="main special">
<div class="container">
- <span class="image fit primary"><img src="images/{{ with .Params.Sites.skill_list.picture }}{{ . }}{{ end }}" alt="" /></span>
+ {{ if eq .Site.Params.backgroundpersection true }}
+ <span class="image fit primary"><img src="images/{{ with .Site.Params.infos.picture }}{{ . }}{{ end }}" alt="" /></span>
+ {{ end }}
<div class="content">
<header class="major">
<h2>{{ with .Site.Params.skill_list.title}}{{ . | markdownify }}{{ end }}</h2>