blob: 53f71a32b006673b108a62a1467c3b782c29e38c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
{{ $style := (index .context.Site.Data.styles (.context.Site.Params.style | default "default")) }}
{{ $result := $style.colors }}
{{ if $result }}
{{ range .path }}
{{ if $result }}
{{ $result = index $result . }}
{{ else }}
{{ errorf "Param %s is undefined in style %s" (delimit $.path ".") $.context.Site.Params.style }}
{{ end }}
{{ end }}
{{ if $result }}
{{ return $result }}
{{ else }}
{{ errorf "Param %s is undefined in style %s" (delimit $.path ".") $.context.Site.Params.style }}
{{ end }}
{{ else }}
{{ errorf "Could not find colors section in style %s." .context.Site.Params.style }}
{{ end }}
|