File tree 3 files changed +43
-2
lines changed
3 files changed +43
-2
lines changed Original file line number Diff line number Diff line change 32
32
{{- $expander = true }}
33
33
{{- end }}
34
34
{{- end }}
35
+ {{- $params := .params | default dict }}
36
+ {{- $classes := split (index $params "class" | default "") " " }}
37
+ {{- $classes = $classes | append "box" }}
38
+ {{- $classes = $classes | append "cstyle" }}
39
+ {{- $classes = $classes | append $class }}
40
+ {{- $classes = $classes | append $style }}
41
+ {{- if $expander }}
42
+ {{- $classes = $classes | append "expand" }}
43
+ {{- else }}
44
+ {{- $expanded = true }}
45
+ {{- end }}
46
+ {{- $params = dict "class" (delimit $classes " ") | merge $params }}
47
+ {{- if $color }}
48
+ {{- $styles := split (index $params "style" | default "") ";" }}
49
+ {{- $styles = $styles | append "--VARIABLE-BOX-color: {{ $color }}" }}
50
+ {{- $params = dict "style" (delimit $styles ";") | merge $params }}
51
+ {{- end }}
52
+ {{ if $groupid }}
53
+ {{- $params = dict "name" $groupid | merge $params }}
54
+ {{- end }}
35
55
{{- with $page }}
36
56
{{- if or $icon $title $hasContent -}}
37
- < details class ="{{ if $expander }}expand {{ end }}box {{ $class }} cstyle {{ $style }} "{{ if $color }} style =" --VARIABLE-BOX-color: {{ $color }}; "{{ end }}{{ if $groupid }} name ="{{ $groupid }} " {{ end }}{{ if not $expander }} tabindex ="-1 " open{{ else if $expanded }} open{{ end }} >
57
+ < details
58
+ {{- if $expanded }} open{{ end }}
59
+ {{- range $k, $v : = $params }}
60
+ {{- if not (or (in (slice "open" "summary") $k) (strings.HasPrefix $k "on")) }}
61
+ {{- printf " %s=%q " $k $v | safeHTMLAttr }}
62
+ {{- end }}
63
+ {{- end }}>
38
64
< summary class ="box-label{{ if and (not $expander) (not $icon) (not $title) }} a11y-only{{ end }} "> {{ if $expander }}
39
65
< i class ="expander-icon fa-fw fas fa-chevron-right "> </ i > {{ end }}{{ if $icon }}
40
66
< i class ="{{ $icon }} "> </ i > {{ end }}{{ if $title }}
Original file line number Diff line number Diff line change 1
- 7.1.1+62b52bb8680225e7de2ff0442813709ae1e14bc0
1
+ 7.1.1+39fcbb328323656eda3acf6911adb446bd439fe5
Original file line number Diff line number Diff line change
1
+ {{- $summary := (.Get "summary") | default (T "Details") }}
2
+ {{- $open := false }}
3
+ {{- if in (slice "false" false 0) (.Get "open") }}
4
+ {{- $open = false }}
5
+ {{- else if in (slice "true" true 1) (.Get "open")}}
6
+ {{- $open = true }}
7
+ {{- end }}
8
+ {{- partial "shortcodes/notice.html" (dict
9
+ "page" .Page
10
+ "content" .Inner
11
+ "expanded" $open
12
+ "params" .Params
13
+ "style" "transparent"
14
+ "title" $summary
15
+ ) }}
You can’t perform that action at this time.
0 commit comments