aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/_default/_markup/render-image.html
diff options
context:
space:
mode:
Diffstat (limited to 'themes/default/layouts/_default/_markup/render-image.html')
-rw-r--r--themes/default/layouts/_default/_markup/render-image.html19
1 files changed, 2 insertions, 17 deletions
diff --git a/themes/default/layouts/_default/_markup/render-image.html b/themes/default/layouts/_default/_markup/render-image.html
index 9481e9d..3767cb8 100644
--- a/themes/default/layouts/_default/_markup/render-image.html
+++ b/themes/default/layouts/_default/_markup/render-image.html
@@ -100,23 +100,8 @@
title="{{ $.Text | htmlUnescape }}"
width="{{ $width }}"
height="{{ $height }}"
- {{- printf `style="` | safeHTMLAttr }}
- {{- with $colors -}}
- background:
- {{- range $key, $color := $colors }}
- {{- $last := sub (len $colors) 1 -}}
- {{- $separator := "," | safeHTMLAttr -}}
- {{- $color = $color | safeHTMLAttr -}}
- {{- $position := "top" -}}
- {{- if eq $last $key -}}
- {{- $separator = ";" | safeHTMLAttr -}}
- {{- end -}}
- {{- if gt $key 0 -}}
- {{- $position = "bottom" -}}
- {{- end -}}
- radial-gradient(ellipse at {{ $position }}, {{ $color }}, transparent){{ $separator }}
- {{- end -}}
- {{- end -}}
+ {{ printf `style="` | safeHTMLAttr -}}
+ {{- partial "styles-image-gradient.html" $colors | safeHTMLAttr -}}
{{- printf `"` | safeHTMLAttr }}
/>
</picture>