mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-13 04:14:41 +00:00
fix(widgets): fix hero image path when canonifyurls=true
This commit is contained in:
1 parent
eb5c91f8f1
commit
c084f016ae
1 file changed
+2
-2
@@ -5,7 +5,7 @@
|
||||
{{/* Compute image path outside of HTML style element due to Hugo limitation. */}}
|
||||
{{ $overlay_img := "" }}
|
||||
{{ if $header.overlay_img }}
|
||||
{{ $overlay_img = (printf "img/%s" $header.overlay_img) | relURL }}
|
||||
{{ $overlay_img = (printf "img/%s" $header.overlay_img) }}
|
||||
{{end}}
|
||||
|
||||
<section id="{{ $page.File.TranslationBaseName }}" class="hero-overlay" style="
|
||||
@@ -15,7 +15,7 @@ background-color: {{ $header.overlay_color | default "transparent" }};
|
||||
{{ if $header.overlay_img }}
|
||||
background-image:
|
||||
{{ if $header.overlay_filter }}linear-gradient(rgba(0, 0, 0, {{ $header.overlay_filter }}), rgba(0, 0, 0, {{ $header.overlay_filter }})), {{ end }}
|
||||
url('{{ $overlay_img }}');
|
||||
url('{{ $overlay_img }}')
|
||||
{{ end }}
|
||||
;">
|
||||
|
||||
|
||||
Reference in new issue
Block a user