Add basic scaffolding for site.

This commit is contained in:
2023-08-30 23:00:53 +00:00
commit d95126dca8
109 changed files with 10750 additions and 0 deletions

View File

@ -0,0 +1,30 @@
{{- $sidebar := false }}
{{- if eq .Kind "home" -}}
{{ $sidebar = (default .Site.Params.sidebar.home .Params.sidebar) }}
{{- else if eq .Kind "page" -}}
{{ $sidebar = (default .Site.Params.sidebar.single .Params.sidebar) }}
{{- else -}}
{{ $sidebar = (default .Site.Params.sidebar.list .Params.sidebar) }}
{{ end }}
{{- if $sidebar -}}
<aside class="sidebar{{ if eq $sidebar "left" }} sidebar--left{{ end }}">
{{- $root := . }}
{{- with (default .Site.Params.sidebar.widgets .Params.widgets) -}}
{{- range $widget := . }}
{{- $widgetPath := printf "widgets/%s.html" $widget }}
{{- $widgetCached := false }}
{{- if isset $.Site.Params "widgets" }}
{{- $widgetCached = (index $.Site.Params.widgets $widget).cached }}
{{- end }}
{{- if eq $widgetCached true }}
{{- partialCached $widgetPath $root }}
{{- else }}
{{- partial $widgetPath $root }}
{{- end }}
{{- end }}
{{- else }}
<p class="sidebar__warning"><strong>{{ T "sidebar_warning" }}:</strong><br>{{ T "sidebar_recommendation" }}</p>
{{- end }}
</aside>
{{- end }}