|
@@ -35,6 +35,14 @@
|
|
|
{{ end }}
|
|
|
{{/* See Hugo note on linking assets in styles: https://github.com/gohugoio/hugoThemes#common-permalink-issues */}}
|
|
|
{{ $style = printf "%sbackground-image: %s url('%s');" $style $darken (printf "img/%s" $bg.image | absURL) }}
|
|
|
+ {{ with $bg.image_size }}
|
|
|
+ {{/* Allow sizes: actual, cover, and contain. */}}
|
|
|
+ {{ $style = printf "%sbackground-size: %s;" $style (replace . "actual" "auto") }}
|
|
|
+ {{ end }}
|
|
|
+ {{ with $bg.image_position }}
|
|
|
+ {{/* Allow valid CSS positions including left, center, and right. */}}
|
|
|
+ {{ $style = printf "%sbackground-position: %s;" $style . }}
|
|
|
+ {{ end }}
|
|
|
{{ end }}
|
|
|
|
|
|
{{ with $st.Params.design.spacing.padding }}
|
|
@@ -66,7 +74,7 @@
|
|
|
{{ $use_container = false }}
|
|
|
{{ end }}
|
|
|
|
|
|
- <section id="{{$hash_id}}" class="home-section {{printf "wg-%s" (replace $widget "_" "-")}} {{if $bg.text_color_light}}dark{{end}} {{if $bg.image}}parallax{{end}} {{with $css_classes}}{{.}}{{end}}" {{with $style}}style="{{. | safeCSS}}"{{end}} {{print $extra_attributes | safeHTMLAttr}}>
|
|
|
+ <section id="{{$hash_id}}" class="home-section {{printf "wg-%s" (replace $widget "_" "-")}} {{if $bg.text_color_light}}dark{{end}} {{if $bg.image}} bg-image{{if ($bg.image_parallax | default true) }} parallax{{end}}{{end}} {{with $css_classes}}{{.}}{{end}}" {{with $style}}style="{{. | safeCSS}}"{{end}} {{print $extra_attributes | safeHTMLAttr}}>
|
|
|
{{if $use_container}}<div class="container">{{end}}
|
|
|
{{ partial $widget_path $widget_args }}
|
|
|
{{if $use_container}}</div>{{end}}
|