diff --git a/wowchemy/assets/scss/wowchemy/widgets/_hero.scss b/wowchemy/assets/scss/wowchemy/widgets/_hero.scss
index 382d9abd..11a6a386 100644
--- a/wowchemy/assets/scss/wowchemy/widgets/_hero.scss
+++ b/wowchemy/assets/scss/wowchemy/widgets/_hero.scss
@@ -28,6 +28,11 @@
/* Uncomment to standout on complicated backgrounds. */
}
+// Prevent `.home-section.light a` setting text to same color as button bg (the primary color)
+.wg-hero.light a.btn {
+ color: #fff;
+}
+
.wg-hero.dark a:not(.wg-hero .btn) {
color: #fff;
}
diff --git a/wowchemy/layouts/partials/widgets/hero.html b/wowchemy/layouts/partials/widgets/hero.html
index 4a7f0321..3cf72473 100644
--- a/wowchemy/layouts/partials/widgets/hero.html
+++ b/wowchemy/layouts/partials/widgets/hero.html
@@ -64,21 +64,29 @@
{{- $image = resources.Get (path.Join "media" $page.Params.hero_media) -}}
{{- end -}}
{{ if $image }}
- {{ $legacy_img := $image.Resize "400x" }}
- {{ $img_src := "" }}
- {{ $img_src_set := slice }}
- {{ $widths := slice 1200 800 400 }}
+ {{ $isSVG := eq $image.MediaType.SubType "svg" }}
+ {{ if $isSVG -}}
- {{ range $widths }}
- {{ $src_link := ($image.Resize (printf "%dx" .)).RelPermalink }}
- {{ if eq $img_src "" }}
- {{ $img_src = $src_link }}
+
+
+ {{- else }}
+
+ {{ $legacy_img := $image.Resize "400x" }}
+ {{ $img_src := "" }}
+ {{ $img_src_set := slice }}
+ {{ $widths := slice 1200 800 400 }}
+
+ {{ range $widths }}
+ {{ $src_link := ($image.Resize (printf "%dx" .)).RelPermalink }}
+ {{ if eq $img_src "" }}
+ {{ $img_src = $src_link }}
+ {{ end }}
+ {{ $img_src_set = $img_src_set | append (printf "%s %dw" $src_link .) }}
{{ end }}
- {{ $img_src_set = $img_src_set | append (printf "%s %dw" $src_link .) }}
- {{ end }}
- {{ $img_src_set = delimit $img_src_set "," }}
+ {{ $img_src_set = delimit $img_src_set "," }}
-
+
+ {{ end }}
{{ end }}