mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-14 14:17:07 +00:00
perf: optimise size and format of section backgrounds
This commit is contained in:
1 parent
42d1cf0063
commit
a9189fd7c7
1 file changed
+1
@@ -53,6 +53,7 @@
|
||||
{{ if $bg.image }}
|
||||
{{/* See Hugo note on linking assets in styles: https://github.com/gohugoio/hugoThemes#common-permalink-issues */}}
|
||||
{{ $bg_img := resources.Get (printf "media/%s" $bg.image) }}
|
||||
{{ $bg_img = $bg_img.Fit "1920x1920 webp" }}
|
||||
{{ if $bg_img }}
|
||||
{{ $style_bg = printf "%sbackground-image: url('%s');" $style_bg $bg_img.Permalink }}
|
||||
{{ else }}
|
||||
|
||||
Reference in new issue
Block a user