diff options
| author | Anoduck, The Anonymous Duck <9925396+anoduck@users.noreply.github.com> | 2025-02-16 09:16:39 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-16 09:16:39 +0000 |
| commit | b5290138e1f73a7a56578f9975ba3b50829ca8d4 (patch) | |
| tree | b4d2d0d4a5b10754f0d075248f97f63f74bbb9aa /layouts/_default/baseof.html | |
| parent | 5354e537b7e02b96cf0b842adfc5faaae5d1a862 (diff) | |
| parent | 5086a041c02412f1a5f811325d4798c49acd328b (diff) | |
Merge pull request #77 from anoduck/develop
Regardless of failed style linting pulling this shit.
Diffstat (limited to 'layouts/_default/baseof.html')
| -rw-r--r-- | layouts/_default/baseof.html | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html new file mode 100644 index 0000000..ebf732c --- /dev/null +++ b/layouts/_default/baseof.html @@ -0,0 +1,80 @@ +{{- /* 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 section headings */ -}} +{{- $loading := "" -}} +{{- if $fullCover }}{{ $loading = .Site.Params.main.loading }}{{ end -}} +{{ $sections := partial "utilities/GetSections.html" (dict "page" . "loading" $loading) }} +{{- $.Scratch.Set "sections" $sections -}} + +{{- /* Define main breakpoint */ -}} +{{- $.Scratch.Set "breakpoint" (partialCached "utilities/GetBreakpoint.html" .) }} + +{{- /* 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") -}} + {{ block "head" . }}{{ end -}} + </head> + + <body> + <div class="d-flex flex-column min-vh-100"> + <div class="d-flex flex-column {{ if $fullCover }} fullscreen{{ end }}{{ if .IsHome }} {{ .Site.Params.home.style }}{{ end }}"> + {{- partial "assets/navbar.html" (dict + "page" . + "fixed" site.Params.navigation.fixed + "overlay" site.Params.navigation.overlay + "overlayMode" site.Params.navigation.overlayMode + "color" site.Params.navigation.color + "style" (default "light" site.Params.navigation.style) + "size" (default "md" site.Params.navigation.size)) + -}} + <div class="main-content"> + {{ block "featured" . }}{{ end -}} + </div> + {{ if .Site.Params.main.footerBelowFold }} + {{ block "main" . }}{{ end -}} + {{ end }} + </div> + + {{ if not .Site.Params.main.footerBelowFold }} + {{ block "main" . }}{{ end -}} + {{- partial "footer/social.html" . -}} + {{- partial "footer/footer.html" . -}} + {{ end }} + </div> + + {{ if .Site.Params.main.footerBelowFold }} + {{- partial "footer/social.html" . -}} + {{- partial "footer/footer.html" . -}} + {{ end }} + {{- partial "footer/popup.html" . -}} + {{- partial "footer/toast-container.html" . -}} + {{- partial "assets/symbols.html" . -}} + {{- partialCached "footer/scripts.html" (dict "page" .) -}} + {{- partial "footer/scripts.html" (dict "page" . "type" "optional") -}} + </body> +</html> |
