mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-12-04 13:13:07 +00:00
22 lines
No EOL
1 KiB
HTML
22 lines
No EOL
1 KiB
HTML
{{- $page := .page }}
|
|
{{- if and (not $page) .context }}
|
|
{{- $page = .context }}
|
|
{{- 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") }}
|
|
{{- $title = trim $title " " }}
|
|
{{- $expanded := .expanded | default false }}
|
|
{{- if and (isset . "open") (or (ne (printf "%T" .open) "string") (ne (trim .open " " ) "")) }}
|
|
{{- 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 }}
|
|
{{- partial "shortcodes/notice.html" (dict
|
|
"page" .page
|
|
"content" .content
|
|
"expanded" $expanded
|
|
"style" "transparent"
|
|
"title" $title
|
|
) }} |