aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/partials/styles-image-gradient.html
diff options
context:
space:
mode:
authortdro <tdro@noreply.example.com>2022-12-15 22:04:15 -0500
committertdro <tdro@noreply.example.com>2022-12-15 22:04:15 -0500
commitcd957ee5699b7c6d8cfcbad9b64d9d5298e56ccc (patch)
treebd807e7bbf73245f0758411e2c6eac2ecc6d4f82 /themes/default/layouts/partials/styles-image-gradient.html
parent54470dc7ccefa2e9dae974ac18f90db09a6bc992 (diff)
downloadcanory-cd957ee5699b7c6d8cfcbad9b64d9d5298e56ccc.tar.gz
canory-cd957ee5699b7c6d8cfcbad9b64d9d5298e56ccc.tar.bz2
canory-cd957ee5699b7c6d8cfcbad9b64d9d5298e56ccc.zip
themes/default/layouts/partials/styles-image-gradient: Extend to gallery
Diffstat (limited to 'themes/default/layouts/partials/styles-image-gradient.html')
-rw-r--r--themes/default/layouts/partials/styles-image-gradient.html18
1 files changed, 18 insertions, 0 deletions
diff --git a/themes/default/layouts/partials/styles-image-gradient.html b/themes/default/layouts/partials/styles-image-gradient.html
new file mode 100644
index 0000000..794ea8b
--- /dev/null
+++ b/themes/default/layouts/partials/styles-image-gradient.html
@@ -0,0 +1,18 @@
+{{- $colors := . -}}
+
+{{- with $colors -}}
+ background:
+ {{- range $key, $color := $colors -}}
+ {{- $last := sub (len $colors) 1 -}}
+ {{- $separator := "," -}}
+ {{- $color = $color -}}
+ {{- $position := "top" -}}
+ {{- if eq $last $key -}}
+ {{- $separator = ";" -}}
+ {{- end -}}
+ {{- if gt $key 0 -}}
+ {{- $position = "bottom" -}}
+ {{- end -}}
+ radial-gradient(ellipse at {{ $position }}, {{ $color }}, transparent){{ $separator }}
+ {{- end -}}
+{{- end -}}