mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2025-04-28 19:43:31 +08:00
style(widgets): default
no pipes required
This commit is contained in:
parent
fe72738d8f
commit
ee4a7b483b
@ -4,8 +4,8 @@
|
|||||||
<aside class="sidebar right-sidebar sticky">
|
<aside class="sidebar right-sidebar sticky">
|
||||||
{{ range $widget := . }}
|
{{ range $widget := . }}
|
||||||
{{ if templates.Exists (printf "partials/widget/%s.html" .type) }}
|
{{ if templates.Exists (printf "partials/widget/%s.html" .type) }}
|
||||||
<!-- Ensure that the params always exist -->
|
<!-- Ensure that the `params` is not nil -->
|
||||||
{{- $params := .params | default (dict) -}}
|
{{- $params := default dict .params -}}
|
||||||
|
|
||||||
{{ partial (printf "widget/%s" .type) (dict "Context" $context "Params" $params) }}
|
{{ partial (printf "widget/%s" .type) (dict "Context" $context "Params" $params) }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
|
Loading…
Reference in New Issue
Block a user