aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/partials/styles-image-gradient.html
blob: 794ea8bd7f72be5952a2374c273f05c472aec049 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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 -}}