hugo-theme-relearn/layouts/shortcodes/details.html
Sören Weber 66f4fbf5f0
Some checks failed
docs-build-deployment / Run deploy (push) Has been cancelled
docs-build / Run build (push) Has been cancelled
details: add shortcode #957
2024-12-15 15:35:13 +01:00

23 lines
No EOL
651 B
HTML

{{- $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 }}
{{- $params := dict }}
{{- with (.Get "class") }}
{{- $params = $params | merge (dict "class" .) }}
{{- end }}
{{- with (.Get "title") }}
{{- $params = $params | merge (dict "title" .) }}
{{- end }}
{{- partial "shortcodes/notice.html" (dict
"page" .Page
"content" .Inner
"expanded" $open
"groupid" (.Get "name")
"params" $params
"style" "transparent"
"title" $summary
) }}