Files
hinode/layouts/baseof.html
2025-10-04 10:26:49 +02:00

68 lines
2.9 KiB
HTML

{{- /* Set version-aware sidebar menu */ -}}
{{- $version := partial "utilities/GetVersion.html" (dict "page" . "base" true) -}}
{{- $.Scratch.Set "version" $version -}}
{{ with partial "utilities/GetMenu" (dict "page" . "version" $version) }}{{ $.Scratch.Set "sidebar" . }}{{ end }}
{{- /* Validate if current version is latest */ -}}
{{- if and site.Params.docs.checkVersion $version -}}
{{- if ne $version "latest" -}}
{{- if partial "utilities/IsOlder" (dict "current" $version) -}}
{{- $.Scratch.Set "pageAlertMsg" (T "newerVersionAlert" site.Title) -}}
{{- $.Scratch.Set "pageAlertURL" (or site.Params.docs.latestURL site.baseURL) -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- /* Initialize module configuration */ -}}
{{- $modules := partialCached "utilities/InitModules.html" . -}}
{{- $.Scratch.Set "modules" $modules -}}
{{- $fullCover := or (or (and .IsHome .Site.Params.home.fullCover) .Page.Params.fullCover) .Site.Params.main.footerBelowFold }}
{{- $.Scratch.Set "fullCover" $fullCover -}}
{{- /* Define main breakpoint */ -}}
{{- $.Scratch.Set "breakpoint" (partialCached "utilities/GetBreakpoint.html" .) }}
{{- /* Prepare content blocks and establish overlay mode */ -}}
{{ $blocks := partial "utilities/RenderContentBlocks.html" (dict "page" . "blocks" .Params.content_blocks) }}
{{ $.Scratch.Set "blocks" $blocks }}
{{ $overlayMode := $.Scratch.Get "overlayMode" }}
{{- /* Define base URL */ -}}
{{ $lang := site.LanguageCode | default site.Language.Lang }}
{{ $.Scratch.Set "baseURL" (strings.TrimSuffix (printf "%s/" $lang) site.Home.RelPermalink) }}
<!doctype html>
<html lang="{{ .Site.Language.Lang }}" class="no-js">
<head>
{{- partial "footer/scripts.html" (dict "page" . "type" "critical") -}}
{{- partial "footer/scripts.html" (dict "page" . "type" "functional") -}}
{{ block "head" . }}{{ end -}}
</head>
<body>
{{- partial "assets/navbar.html" (dict
"page" .
"fixed" site.Params.navigation.fixed
"overlay" site.Params.navigation.overlay
"overlayMode" site.Params.navigation.overlayMode
"transparent" site.Params.navigation.transparent
"color" site.Params.navigation.color
"style" (default "light" site.Params.navigation.style)
"breakpoint" (default "md" site.Params.navigation.size))
-}}
<main id="container" class="main">
{{ block "main" . }}{{ end -}}
</main>
{{- partial "footer/social.html" . -}}
{{- partial "footer/footer.html" . -}}
{{- partial "footer/toast-container.html" . -}}
{{- partial "assets/symbols.html" . -}}
{{- partial "assets/modals.html" . -}}
{{- partialCached "footer/scripts.html" (dict "page" .) -}}
{{- partial "footer/scripts.html" (dict "page" . "type" "optional") -}}
</body>
</html>