Adding background_position option

This commit is contained in:
L Laniewski-Wollk 2020-08-18 11:31:12 +10:00
parent 5f48a5bacb
commit ed508759b2
2 changed files with 4 additions and 1 deletions

View file

@ -32,6 +32,8 @@ params:
# background image of the landing page
background: "images/background.jpg"
# optional alignment of the background image
#background-position: center
# Provide logos for your site. The inverted logo will be used in the initial
# transparent navbar and the main logo will be used in the non-transparent navbar.

View file

@ -1,7 +1,8 @@
<div class="container-fluid home" id="home">
<div
class="background container-fluid"
style="background-image: url('{{ if .Site.Params.background }}{{ .Site.Params.background }}{{ else }}/assets/images/default-background.jpg{{ end }}');"
style="background-image: url('{{ if .Site.Params.background }}{{ .Site.Params.background }}{{ else }}/assets/images/default-background.jpg{{ end }}');
{{ if .Site.Params.background_position }}background-position: {{ .Site.Params.background_position }};{{ end }}"
></div>
<div class="container content text-center">
<img src="{{ if .Site.Params.author.image }}{{ .Site.Params.author.image }}{{ else }}/assets/images/default-avatar.png{{ end }}"