shortcodes: fix whitespace issues #907

This commit is contained in:
Sören Weber 2024-09-05 20:02:38 +02:00
parent 50165ddc93
commit 33f9cb6e78
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D
15 changed files with 95 additions and 97 deletions

View file

@ -15,8 +15,7 @@
"title" $alerttitle "title" $alerttitle
"expanded" (cond (eq $alertsign "+") true (cond (eq $alertsign "-") false "")) "expanded" (cond (eq $alertsign "+") true (cond (eq $alertsign "-") false ""))
) }} ) }}
{{- else }} {{ else -}}
<blockquote> <blockquote>
{{- $text | safeHTML }} {{ $text | safeHTML }}</blockquote>
</blockquote> {{ end }}
{{- end }}

View file

@ -5,7 +5,6 @@
{{- warnf "%q: DEPRECATED parameter 'context' for shortcode 'attachments' found, use 'page' instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration#5180" $page.File.Filename }} {{- warnf "%q: DEPRECATED parameter 'context' for shortcode 'attachments' found, use 'page' instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration#5180" $page.File.Filename }}
{{- end }} {{- end }}
{{- $color := .color | default "" }} {{- $color := .color | default "" }}
{{- $content := .content }}
{{- $style := .style | default "default" }} {{- $style := .style | default "default" }}
{{- if and (not $color) (eq (len $color) 0) }} {{- if and (not $color) (eq (len $color) 0) }}
{{- $style = .style | default "transparent" }} {{- $style = .style | default "transparent" }}
@ -46,7 +45,7 @@
{{- with $page }} {{- with $page }}
{{- if ne .BundleType "leaf" }} {{- if ne .BundleType "leaf" }}
{{- warnf "%q: UNSUPPORTED usage of 'attachments' shortcode found while using Hugo >= 0.112.0, use a leaf bundle instead; see https://mcshelby.github.io/hugo-theme-relearn/shortcodes/attachments/index.html#single-language" $page.File.Filename }} {{- warnf "%q: UNSUPPORTED usage of 'attachments' shortcode found while using Hugo >= 0.112.0, use a leaf bundle instead; see https://mcshelby.github.io/hugo-theme-relearn/shortcodes/attachments/index.html#single-language" $page.File.Filename }}
{{- end }} {{- end -}}
<div class="box attachments cstyle {{ $style }}"{{ if $color }} style="--VARIABLE-BOX-color: {{ $color }};"{{ end }}> <div class="box attachments cstyle {{ $style }}"{{ if $color }} style="--VARIABLE-BOX-color: {{ $color }};"{{ end }}>
<div class="box-label">{{ if $icon }}<i class="{{ $icon }}"></i>{{ end }}{{ if and $icon $title }} {{ end }}{{ $title | .RenderString }}</div> <div class="box-label">{{ if $icon }}<i class="{{ $icon }}"></i>{{ end }}{{ if and $icon $title }} {{ end }}{{ $title | .RenderString }}</div>
<ul class="box-content attachments-files"> <ul class="box-content attachments-files">
@ -82,6 +81,5 @@
{{- end }} {{- end }}
{{- end }} {{- end }}
</ul> </ul>
{{- $content }}
</div> </div>
{{- end }} {{- end }}

View file

@ -19,7 +19,7 @@
{{- $containerstyle = "div" }} {{- $containerstyle = "div" }}
{{- end }} {{- end }}
{{- with $page }} {{- with $page -}}
{{ (printf "<%s class=\"children children-%s children-sort-%s\">" $containerstyle $style $sortTerm)|safeHTML }} {{ (printf "<%s class=\"children children-%s children-sort-%s\">" $containerstyle $style $sortTerm)|safeHTML }}
{{- $pages := partial "pageHelper/pagesBy.html" (dict "page" . "by" $sortTerm) }} {{- $pages := partial "pageHelper/pagesBy.html" (dict "page" . "by" $sortTerm) }}
{{- template "childs" dict "menu" $pages "containerstyle" $containerstyle "style" $style "showhidden" $showhidden "count" 1 "depth" $depth "pages" .Site.Pages "description" $withDescription "sortTerm" $sortTerm "page" . }} {{- template "childs" dict "menu" $pages "containerstyle" $containerstyle "style" $style "showhidden" $showhidden "count" 1 "depth" $depth "pages" .Site.Pages "description" $withDescription "sortTerm" $sortTerm "page" . }}
@ -27,7 +27,7 @@
{{- end }} {{- end }}
{{- define "childs" }} {{- define "childs" }}
{{ $page := .page }} {{- $page := .page }}
{{- range .menu }} {{- range .menu }}
{{- $hidden := and (or (.Params.hidden) (eq .Title "")) (not $.showhidden) }} {{- $hidden := and (or (.Params.hidden) (eq .Title "")) (not $.showhidden) }}
{{- if not $hidden }} {{- if not $hidden }}
@ -36,44 +36,27 @@
{{- $num := sub ( int (trim $.style "h") ) 1 }} {{- $num := sub ( int (trim $.style "h") ) 1 }}
{{- $numn := add $num $.count }} {{- $numn := add $num $.count }}
{{ (printf " <h%d>" $numn)|safeHTML }}{{ if .RelPermalink }}<a href="{{ partial "relLangPrettyUglyURL.hugo" (dict "to" .) }}">{{ .Title }}</a>{{ else }}<span>{{ .Title }}</span>{{ end }}{{ (printf "</h%d>" $numn)|safeHTML }} {{ (printf " <h%d>" $numn)|safeHTML }}{{ if .RelPermalink }}<a href="{{ partial "relLangPrettyUglyURL.hugo" (dict "to" .) }}">{{ .Title }}</a>{{ else }}<span>{{ .Title }}</span>{{ end }}{{ (printf "</h%d>" $numn)|safeHTML }}
{{- if $.description }}
{{- with or .Description .Summary -}}
<p>{{ . }}</p>
{{- end }}
{{- end }}
{{- else if eq $.style "li" }} {{- else if eq $.style "li" }}
{{ (printf " <%s>" $.style)|safeHTML }}{{ if .RelPermalink }}<a href="{{ partial "relLangPrettyUglyURL.hugo" (dict "to" .) }}">{{ .Title }}</a>{{ else }}<span>{{ .Title }}</span>{{ end }} {{ (printf " <%s>" $.style)|safeHTML }}{{ if .RelPermalink }}<a href="{{ partial "relLangPrettyUglyURL.hugo" (dict "to" .) }}">{{ .Title }}</a>{{ else }}<span>{{ .Title }}</span>{{ end }}
{{- if $.description }}
{{- with or .Description .Summary -}}
<p>{{ . }}</p>
{{- end }}
{{- end }}
{{- else }} {{- else }}
{{ (printf " <%s>" $.style)|safeHTML }}{{ if .RelPermalink }}<a href="{{ partial "relLangPrettyUglyURL.hugo" (dict "to" .) }}">{{ .Title }}</a>{{ else }}<span>{{ .Title }}</span>{{ end }}{{ (printf "</%s>" $.style)|safeHTML }} {{ (printf " <%s>" $.style)|safeHTML }}{{ if .RelPermalink }}<a href="{{ partial "relLangPrettyUglyURL.hugo" (dict "to" .) }}">{{ .Title }}</a>{{ else }}<span>{{ .Title }}</span>{{ end }}{{ (printf "</%s>" $.style)|safeHTML }}
{{- end }}
{{- if $.description }} {{- if $.description }}
{{- with or .Description .Summary -}} {{- with or .Description .Summary -}}
<p>{{ . }}</p> <p>{{ . }}</p>
{{- end }} {{- end }}
{{- end }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- if lt $.count $.depth }} {{- if lt $.count $.depth }}
{{- if eq $.style "li" }} {{- if eq $.style "li" }}
{{- (printf "<%s>" $.containerstyle)|safeHTML }} {{- (printf "<%s>" $.containerstyle)|safeHTML }}
{{- end }} {{- end }}
{{- $pages := partial "pageHelper/pagesBy.html" (dict "page" . "by" $.sortTerm) }} {{- $pages := partial "pageHelper/pagesBy.html" (dict "page" . "by" $.sortTerm) }}
{{- template "childs" dict "menu" $pages "containerstyle" $.containerstyle "style" $.style "showhidden" $.showhidden "count" (add $.count 1) "depth" $.depth "pages" $.pages "description" $.description "sortTerm" $.sortTerm "page" $page }} {{- template "childs" dict "menu" $pages "containerstyle" $.containerstyle "style" $.style "showhidden" $.showhidden "count" (add $.count 1) "depth" $.depth "pages" $.pages "description" $.description "sortTerm" $.sortTerm "page" $page }}
{{- if eq $.style "li" }} {{- if eq $.style "li" }}
{{- (printf "</%s>" $.containerstyle)|safeHTML }} {{- (printf "</%s>" $.containerstyle)|safeHTML }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- if not .IsHome }} {{- if not .IsHome }}
{{- if eq $.style "li" }} {{- if eq $.style "li" }}
{{- (printf "</%s>" $.style)|safeHTML -}} {{- (printf "</%s>" $.style)|safeHTML -}}

View file

@ -3,7 +3,11 @@
{{- $page = .context }} {{- $page = .context }}
{{- warnf "%q: DEPRECATED parameter 'context' for shortcode 'expand' found, use 'page' instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration#5180" $page.File.Filename }} {{- warnf "%q: DEPRECATED parameter 'context' for shortcode 'expand' found, use 'page' instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration#5180" $page.File.Filename }}
{{- end }} {{- end }}
{{- $content := .content }} {{- $content := trim .content "\n\r\t " }}
{{- $hasContent := ne (strings.TrimLeft "<p>" $content) "" }}
{{- if not (hasPrefix $content "<") }}
{{- $content = printf "<p>\n%s" $content }}
{{- end }}
{{- $title := .title | default (T "Expand-title") }} {{- $title := .title | default (T "Expand-title") }}
{{- $title = trim $title " " }} {{- $title = trim $title " " }}
{{- $expanded := .expanded | default false }} {{- $expanded := .expanded | default false }}
@ -16,6 +20,7 @@
{{- end }} {{- end }}
{{- $id := cond (or (eq .id nil) (eq .id "")) (partial "make-random-md5.hugo" $page) .id }} {{- $id := cond (or (eq .id nil) (eq .id "")) (partial "make-random-md5.hugo" $page) .id }}
{{- with $page }} {{- with $page }}
{{- if $hasContent -}}
<div class="expand"> <div class="expand">
<input type="checkbox" id="R-expand-{{ $id }}" aria-controls="R-expandcontent-{{ $id }}"{{ if $expanded }} checked{{ end }}> <input type="checkbox" id="R-expand-{{ $id }}" aria-controls="R-expandcontent-{{ $id }}"{{ if $expanded }} checked{{ end }}>
<label class="expand-label" for="R-expand-{{ $id }}"> <label class="expand-label" for="R-expand-{{ $id }}">
@ -23,7 +28,8 @@
<i class="expander-icon fa-fw fas fa-chevron-right"></i> {{ $title | .RenderString }} <i class="expander-icon fa-fw fas fa-chevron-right"></i> {{ $title | .RenderString }}
</label> </label>
<div id="R-expandcontent-{{ $id }}" class="expand-content"> <div id="R-expandcontent-{{ $id }}" class="expand-content">
{{ if ne "<" (substr (strings.TrimLeft "\n\r\t " $content) 0 1) }}<p>{{ end }}<!-- we add a DOM element here if there is none to make collapsing marings work --> {{ $content | safeHTML }}
{{ $content | safeHTML }}</div><!-- no line break allowed here because of awkward behavior of Hugo 110 or this theme when tag shortcode is called standalone outside of tags shortcode ? --> </div>
</div> </div>
{{- end }} {{- end }}
{{- end }}

View file

@ -106,4 +106,6 @@
)}} )}}
{{- else }} {{- else }}
{{- $content | safeHTML }} {{- $content | safeHTML }}
{{- if and (not $hl_inline) (not (hasSuffix $content "\n")) }}
{{ end }}
{{- end }} {{- end }}

View file

@ -21,7 +21,7 @@
{{- $attributes = merge $attributes (dict "class" (delimit (append (index $attributes "class" | default slice) "math" slice) " ")) }} {{- $attributes = merge $attributes (dict "class" (delimit (append (index $attributes "class" | default slice) "math" slice) " ")) }}
{{- $attributes = merge $attributes (dict "class" (delimit (append (index $attributes "class" | default slice) (printf "align-%s" $align) slice) " ")) }} {{- $attributes = merge $attributes (dict "class" (delimit (append (index $attributes "class" | default slice) (printf "align-%s" $align) slice) " ")) }}
{{- with $page }} {{- with $page -}}
<span <span
{{- range $k, $v := $attributes }} {{- range $k, $v := $attributes }}
{{- if $v }} {{- if $v }}

View file

@ -36,7 +36,7 @@
{{- $attributes = merge $attributes (dict "class" (delimit (append (index $attributes "class" | default slice) (printf "align-%s" $align) slice) " ")) }} {{- $attributes = merge $attributes (dict "class" (delimit (append (index $attributes "class" | default slice) (printf "align-%s" $align) slice) " ")) }}
{{- $attributes = merge $attributes (dict "class" (delimit (append (index $attributes "class" | default slice) (printf "%s" (cond $zoom "zoomable" "")) slice) " ")) }} {{- $attributes = merge $attributes (dict "class" (delimit (append (index $attributes "class" | default slice) (printf "%s" (cond $zoom "zoomable" "")) slice) " ")) }}
{{- with $page }} {{- with $page -}}
<pre <pre
{{- range $k, $v := $attributes }} {{- range $k, $v := $attributes }}
{{- if $v }} {{- if $v }}

View file

@ -4,8 +4,11 @@
{{- warnf "%q: DEPRECATED parameter 'context' for shortcode 'notice' found, use 'page' instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration#5180" $page.File.Filename }} {{- warnf "%q: DEPRECATED parameter 'context' for shortcode 'notice' found, use 'page' instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration#5180" $page.File.Filename }}
{{- end }} {{- end }}
{{- $color := .color | default "" }} {{- $color := .color | default "" }}
{{- $content := .content }} {{- $content := trim .content "\n\r\t " }}
{{- $hasContent := ne (strings.TrimLeft "<p>" (trim $content "\n\r\t ")) "" }} {{- $hasContent := ne (strings.TrimLeft "<p>" $content) "" }}
{{- if not (hasPrefix $content "<") }}
{{- $content = printf "<p>\n%s" $content }}
{{- end }}
{{- $style := .style | default "default" }} {{- $style := .style | default "default" }}
{{- $title := .title }} {{- $title := .title }}
{{- if not $title }} {{- if not $title }}
@ -44,7 +47,7 @@
{{- end }} {{- end }}
{{- $id := cond (or (eq .id nil) (eq .id "")) (partial "make-random-md5.hugo" $page) .id }} {{- $id := cond (or (eq .id nil) (eq .id "")) (partial "make-random-md5.hugo" $page) .id }}
{{- with $page }} {{- with $page }}
{{- if or $icon $title $hasContent }} {{- if or $icon $title $hasContent -}}
<div class="{{ if $expander }}expand {{ end }}box notices cstyle {{ $style }}"{{ if $color }} style="--VARIABLE-BOX-color: {{ $color }};"{{ end }}> <div class="{{ if $expander }}expand {{ end }}box notices cstyle {{ $style }}"{{ if $color }} style="--VARIABLE-BOX-color: {{ $color }};"{{ end }}>
{{- if $expander }} {{- if $expander }}
<input type="checkbox" id="R-expand-{{ $id }}" aria-controls="R-expandcontent-{{ $id }}"{{ if $expanded }} checked{{ end }}> <input type="checkbox" id="R-expand-{{ $id }}" aria-controls="R-expandcontent-{{ $id }}"{{ if $expanded }} checked{{ end }}>
@ -60,8 +63,8 @@
{{- end }} {{- end }}
{{- if $hasContent }} {{- if $hasContent }}
<div{{ if $expander }} id="R-expandcontent-{{ $id }}"{{ end }} class="{{ if $expander }}expand-content {{ end }}box-content"> <div{{ if $expander }} id="R-expandcontent-{{ $id }}"{{ end }} class="{{ if $expander }}expand-content {{ end }}box-content">
{{ if ne "<" (substr (strings.TrimLeft "\n\r\t " $content) 0 1) }}<p>{{ end }}<!-- we add a DOM element here if there is none to make collapsing marings work --> {{ $content | safeHTML }}
{{ $content | safeHTML }}</div><!-- no line break allowed here because of awkward behavior of Hugo 110 or this theme when tag shortcode is called standalone outside of tags shortcode ? --> </div>
{{- end }} {{- end }}
</div> </div>
{{- end }} {{- end }}

View file

@ -24,7 +24,7 @@
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- with $page }} {{- with $page -}}
<div class="sc-openapi-wrapper is-loading helper-loading-container"> <div class="sc-openapi-wrapper is-loading helper-loading-container">
<div <div
class="sc-openapi-container" class="sc-openapi-container"

View file

@ -4,7 +4,6 @@
{{- warnf "%q: DEPRECATED parameter 'context' for shortcode 'resources' found, use 'page' instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration#5180" $page.File.Filename }} {{- warnf "%q: DEPRECATED parameter 'context' for shortcode 'resources' found, use 'page' instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration#5180" $page.File.Filename }}
{{- end }} {{- end }}
{{- $color := .color | default "" }} {{- $color := .color | default "" }}
{{- $content := .content }}
{{- $style := .style | default "default" }} {{- $style := .style | default "default" }}
{{- if and (not $color) (eq (len $color) 0) }} {{- if and (not $color) (eq (len $color) 0) }}
{{- $style = .style | default "transparent" }} {{- $style = .style | default "transparent" }}
@ -38,7 +37,7 @@
{{- with $page }} {{- with $page }}
{{- if eq .BundleType "" }} {{- if eq .BundleType "" }}
{{- warnf "%q: UNSUPPORTED usage of 'resources' shortcode found, use a page bundle instead; see https://mcshelby.github.io/hugo-theme-relearn/shortcodes/resources" $page.File.Filename }} {{- warnf "%q: UNSUPPORTED usage of 'resources' shortcode found, use a page bundle instead; see https://mcshelby.github.io/hugo-theme-relearn/shortcodes/resources" $page.File.Filename }}
{{- end }} {{- end -}}
<div class="box attachments cstyle {{ $style }}"{{ if $color }} style="--VARIABLE-BOX-color: {{ $color }};"{{ end }}> <div class="box attachments cstyle {{ $style }}"{{ if $color }} style="--VARIABLE-BOX-color: {{ $color }};"{{ end }}>
<div class="box-label">{{ if $icon }}<i class="{{ $icon }}"></i>{{ end }}{{ if and $icon $title }} {{ end }}{{ $title | .RenderString }}</div> <div class="box-label">{{ if $icon }}<i class="{{ $icon }}"></i>{{ end }}{{ if and $icon $title }} {{ end }}{{ $title | .RenderString }}</div>
<ul class="box-content attachments-files"> <ul class="box-content attachments-files">
@ -59,6 +58,5 @@
{{- end }} {{- end }}
{{- end }} {{- end }}
</ul> </ul>
{{- $content }}
</div> </div>
{{- end }} {{- end }}

View file

@ -16,6 +16,11 @@
{{- end }} {{- end }}
{{- with $tab }} {{- with $tab }}
{{- $color := .color | default $color | default "" }} {{- $color := .color | default $color | default "" }}
{{- $content := trim .content "\n\r\t " }}
{{- $hasContent := ne (strings.TrimLeft "<p>" $content) "" }}
{{- if not (hasPrefix $content "<") }}
{{- $content = printf "<p>\n%s" $content }}
{{- end }}
{{- $style := .style | default $style | default (cond (ne $color "") "filled" "initial") }} {{- $style := .style | default $style | default (cond (ne $color "") "filled" "initial") }}
{{- $title := .title }} {{- $title := .title }}
{{- if not $title }} {{- if not $title }}
@ -40,9 +45,10 @@
{{- if and $icon (not (findRE ".*?\\bfa-\\w.*?" $icon)) }} {{- if and $icon (not (findRE ".*?\\bfa-\\w.*?" $icon)) }}
{{- $icon = printf "fa-fw fas fa-%s" $icon }} {{- $icon = printf "fa-fw fas fa-%s" $icon }}
{{- end }} {{- end }}
{{- if $hasContent }}
{{- $tabs = $tabs | append (dict {{- $tabs = $tabs | append (dict
"color" $color "color" $color
"content" .content "content" $content
"icon" $icon "icon" $icon
"itemid" (printf "%s%s" ($title | $page.RenderString | plainify | anchorize) ($icon | plainify | anchorize)) "itemid" (printf "%s%s" ($title | $page.RenderString | plainify | anchorize) ($icon | plainify | anchorize))
"style" $style "style" $style
@ -50,6 +56,7 @@
) }} ) }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- end }}
{{- $color = .color | default "" }} {{- $color = .color | default "" }}
{{- $style = .style | default (cond (ne $color "") "filled" "initial") }} {{- $style = .style | default (cond (ne $color "") "filled" "initial") }}
{{- $title = .title }} {{- $title = .title }}
@ -76,6 +83,7 @@
{{- $icon = printf "fa-fw fas fa-%s" $icon }} {{- $icon = printf "fa-fw fas fa-%s" $icon }}
{{- end }} {{- end }}
{{- with $page }} {{- with $page }}
{{- if len $tabs -}}
<div class="tab-panel" data-tab-group="{{ $groupid }}"> <div class="tab-panel" data-tab-group="{{ $groupid }}">
<div class="tab-nav"> <div class="tab-nav">
<div class="tab-nav-title">{{ if $icon }}<i class="{{ $icon }}"></i>{{ end }}{{ if and $icon $title }} {{ end }}{{ $title | $page.RenderString }}{{ if (not $title) }}&#8203;{{ end }}</div> <div class="tab-nav-title">{{ if $icon }}<i class="{{ $icon }}"></i>{{ end }}{{ if and $icon $title }} {{ end }}{{ $title | $page.RenderString }}{{ if (not $title) }}&#8203;{{ end }}</div>
@ -95,10 +103,11 @@
data-tab-item="{{ .itemid }}" data-tab-item="{{ .itemid }}"
class="tab-content tab-panel-style cstyle {{ .style }}{{ cond (eq $idx 0) " active" ""}}"{{ if .color }} style="--VARIABLE-BOX-color: {{ .color }};"{{ end }}> class="tab-content tab-panel-style cstyle {{ .style }}{{ cond (eq $idx 0) " active" ""}}"{{ if .color }} style="--VARIABLE-BOX-color: {{ .color }};"{{ end }}>
<div class="tab-content-text"> <div class="tab-content-text">
{{ if ne "<" (substr (strings.TrimLeft "\n\r\t " .content) 0 1) }}<p>{{ end }}<!-- we add a DOM element here if there is none to make collapsing marings work --> {{ .content | safeHTML }}
{{ .content | safeHTML }}</div><!-- no line break allowed here because of awkward behavior of Hugo 110 or this theme when tag shortcode is called standalone outside of tags shortcode ? --> </div>
</div> </div>
{{- end }} {{- end }}
</div> </div>
</div> </div>
{{- end }} {{- end }}
{{- end }}

View file

@ -1,8 +1,8 @@
{{- $_hugo_config := `{ "version": 1 }` }} {{- $_hugo_config := `{ "version": 1 }` }}
{{- $unused := .Inner }}
{{- partial "shortcodes/attachments.html" (dict {{- partial "shortcodes/attachments.html" (dict
"page" .Page "page" .Page
"color" (.Get "color") "color" (.Get "color")
"content" .Inner
"icon" (.Get "icon") "icon" (.Get "icon")
"pattern" (.Get "pattern") "pattern" (.Get "pattern")
"style" (.Get "style") "style" (.Get "style")

View file

@ -1,8 +1,8 @@
{{- $_hugo_config := `{ "version": 1 }` }} {{- $_hugo_config := `{ "version": 1 }` }}
{{- $unused := .Inner }}
{{- partial "shortcodes/resources.html" (dict {{- partial "shortcodes/resources.html" (dict
"page" .Page "page" .Page
"color" (.Get "color") "color" (.Get "color")
"content" .Inner
"icon" (.Get "icon") "icon" (.Get "icon")
"pattern" (.Get "pattern") "pattern" (.Get "pattern")
"style" (.Get "style") "style" (.Get "style")