feat(widget): add option to customize section spacing

Close #433
This commit is contained in:
George Cushen committed 2019-03-24 19:24:58 +00:00
1 parent 3fdddd7686
commit aa8b3f35ba
2 files changed
+10 -1

No files matched your search

+5 -1
View File
@@ -35,9 +35,13 @@ subtitle = ""
# Text color (true=light or false=dark).
text_color_light = true
[design.spacing]
# Customize the section spacing. Order is top, right, bottom, left.
padding = ["20px", "0", "20px", "0"]
[advanced]
# Custom CSS.
css_style = "padding-top: 20px; padding-bottom: 20px;"
css_style = ""
# CSS class.
css_class = ""
+5
View File
@@ -36,6 +36,11 @@
{{ $style = printf "%sbackground-image: %s url('%s');" $style $darken (printf "img/%s" $bg.image | absURL) }}
{{ end }}
{{ with $st.Params.design.spacing.padding }}
{{ $style_pad := printf "padding: %s;" (delimit . " ") }}
{{ $style = print $style $style_pad }}
{{ end }}
{{ with $st.Params.advanced.css_style }}
{{ $style = print $style . }}
{{ end }}