diff --git a/layouts/partials/shortcodes/notice.html b/layouts/partials/shortcodes/notice.html index d0629a2589..988e137e1c 100644 --- a/layouts/partials/shortcodes/notice.html +++ b/layouts/partials/shortcodes/notice.html @@ -32,9 +32,35 @@ {{- $expander = true }} {{- end }} {{- end }} +{{- $params := .params | default dict }} +{{- $classes := split (index $params "class" | default "") " " }} +{{- $classes = $classes | append "box" }} +{{- $classes = $classes | append "cstyle" }} +{{- $classes = $classes | append $class }} +{{- $classes = $classes | append $style }} +{{- if $expander }} + {{- $classes = $classes | append "expand" }} +{{- else }} + {{- $expanded = true }} +{{- end }} +{{- $params = dict "class" (delimit $classes " ") | merge $params }} +{{- if $color }} + {{- $styles := split (index $params "style" | default "") ";" }} + {{- $styles = $styles | append "--VARIABLE-BOX-color: {{ $color }}" }} + {{- $params = dict "style" (delimit $styles ";") | merge $params }} +{{- end }} +{{ if $groupid }} + {{- $params = dict "name" $groupid | merge $params }} +{{- end }} {{- with $page }} {{- if or $icon $title $hasContent -}} -
+
{{ if $expander }} {{ end }}{{ if $icon }} {{ end }}{{ if $title }} diff --git a/layouts/partials/version.txt b/layouts/partials/version.txt index a5afd129f5..c226a1d993 100644 --- a/layouts/partials/version.txt +++ b/layouts/partials/version.txt @@ -1 +1 @@ -7.1.1+62b52bb8680225e7de2ff0442813709ae1e14bc0 \ No newline at end of file +7.1.1+39fcbb328323656eda3acf6911adb446bd439fe5 \ No newline at end of file diff --git a/layouts/shortcodes/details.html b/layouts/shortcodes/details.html new file mode 100644 index 0000000000..516f8f3f53 --- /dev/null +++ b/layouts/shortcodes/details.html @@ -0,0 +1,15 @@ +{{- $summary := (.Get "summary") | default (T "Details") }} +{{- $open := false }} +{{- if in (slice "false" false 0) (.Get "open") }} + {{- $open = false }} +{{- else if in (slice "true" true 1) (.Get "open")}} + {{- $open = true }} +{{- end }} +{{- partial "shortcodes/notice.html" (dict + "page" .Page + "content" .Inner + "expanded" $open + "params" .Params + "style" "transparent" + "title" $summary +) }} \ No newline at end of file