hugo-theme-relearn/layouts/partials/shortcodes/expand.html

22 lines
1 KiB
HTML
Raw Normal View History

{{- $page := .page }}
{{- if and (not $page) .context }}
{{- $page = .context }}
2024-09-29 21:54:17 +00:00
{{- warnf "%q: DEPRECATED parameter 'context' for shortcode 'expand' found, use 'page' instead; see https://mcshelby.github.io/hugo-theme-relearn/introduction/releasenotes/5/#5-18-0" $page.File.Filename }}
{{- end }}
{{- $title := .title | default (T "Expand-title") }}
2022-12-01 00:37:09 +00:00
{{- $title = trim $title " " }}
{{- $expanded := .expanded | default false }}
{{- if and (isset . "open") (or (ne (printf "%T" .open) "string") (ne (trim .open " " ) "")) }}
2024-09-29 21:54:17 +00:00
{{- warnf "%q: DEPRECATED parameter 'open' for shortcode 'expand' found, use 'expanded' instead; see https://mcshelby.github.io/hugo-theme-relearn/introduction/releasenotes/6/#6-3-0" $page.File.Filename }}
{{- $expanded = .open }}
{{- end }}
{{- if eq (printf "%T" $expanded) "string" }}
{{- $expanded = (eq $expanded "true") }}
{{- end }}
2024-11-29 21:41:13 +00:00
{{- partial "shortcodes/notice.html" (dict
"page" .page
"content" .content
"expanded" $expanded
"style" "transparent"
"title" $title
) }}