Welcome to mirror list, hosted at ThFree Co, Russian Federation.

right.html « sidebar « partials « layouts - github.com/CaiJimmy/hugo-theme-stack.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d2a6ae804ffb49246d5866d6abe70d574182982f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
{{- $scope := default "homepage" .Scope -}}
{{- $context := .Context -}}
{{- with (index .Context.Site.Params.widgets $scope) -}}
    <aside class="sidebar right-sidebar sticky">
        {{ range $widget := . }}
            {{ if templates.Exists (printf "partials/widget/%s.html" .type) }}
                {{ partial (printf "widget/%s" .type) (dict "Context" $context "Params" .params) }}
            {{ else }}
                {{ warnf "Widget %s not found" .type }}
            {{ end }}
        {{ end }}
    </aside>
{{ end }}