Skip to content

Commit a529268

Browse files
authored
Merge pull request #1600 from gethinode/develop
Develop
2 parents 34d9716 + 9f88e77 commit a529268

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

layouts/_partials/assets/featured-illustration.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
{{ partial "assets/icon.html" (dict "icon" $icon "wrapper" $wrapper) -}}
4545
{{- end -}}
4646
{{- else if $image -}}
47-
{{- if not (hasSuffix $image "svg") }}{{ $class = printf "%s rounded" $class }}{{ end -}}
47+
{{- if not (hasSuffix $image "svg") }}{{ $class = strings.TrimSpace (printf "%s rounded" (or $class "")) }}{{ end -}}
4848
{{- partial "assets/live-image.html" (dict
4949
"src" $image
5050
"anchor" $args.anchor

layouts/_partials/assets/hero-image.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
{{ end }}
1818

1919
{{ if and (not $args.err) (or $args.image $args.icon) }}
20-
<div class="hero-image-container {{ if $args.image }}{{ with $args.justify }}d-flex justify-content-center justify-content-md-{{ . }}{{ end }}{{ end }}">
20+
<div class="hero-image-container {{ if $args.image }}d-flex justify-content-center {{ with $args.justify }} justify-content-md-{{ . }}{{ end }}{{ end }}">
2121
{{ partial "assets/featured-illustration.html" (dict
2222
"page" $args.page
2323
"icon" $args.icon

layouts/_partials/assets/hero.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
{{ $justify := $args.illustration.justify }}
3232

3333
{{ if and $args.illustration.image $scale }}
34-
{{ $class = trim (printf "%s col-%d text-center text-md-%s" $class $scale $justify) " " }}
34+
{{ $class = trim (printf "%s col-%d text-center text-md-%s" $class $scale (or $justify "center")) " " }}
3535
{{ else }}
3636
{{ $scale = 12 }}
3737
{{ end }}
@@ -68,7 +68,7 @@
6868
</div>
6969
{{ end }}
7070

71-
{{ $imageWrapper := printf "mx-md-0 text-center text-md-%s %s" $justify $class }}
71+
{{ $imageWrapper := printf "mx-md-0 text-center text-md-%s %s" (or $justify "center") $class }}
7272
{{ $imageJustify := "" }}
7373
{{ if eq $args.orientation "stacked" }}
7474
{{ $imageWrapper = printf "pt-%d text-center %s" $padding.y $class }}
@@ -96,7 +96,7 @@
9696
{{ end }}
9797

9898
{{ $illustration := "" }}
99-
{{ if or $args.illustration.image $args.illustration.icon }}
99+
{{ if or $args.illustration.image $args.illustration.icon }}
100100
{{ $illustration = partial $args.hook (dict
101101
"page" $args.page
102102
"image" $args.illustration.image
@@ -107,7 +107,7 @@
107107
"sizes" $sizes
108108
"title" (T "heroImage")
109109
"wrapper" $imageWrapper
110-
"class" (printf "hero-image %s" $args.illustration.class)
110+
"class" (strings.TrimSpace (printf "hero-image %s" (or $args.illustration.class "")))
111111
"image-overlay" $args.imageOverlay
112112
"justify" $imageJustify
113113
) }}

0 commit comments

Comments
 (0)