Assign template context to var
This commit is contained in:
@@ -1,35 +1,37 @@
|
||||
{{ $page := . }}
|
||||
|
||||
<!doctype html>
|
||||
{{ $rtl := eq .Language.LanguageDirection "rtl" }}
|
||||
{{ $lang := .Site.LanguageCode | default .Site.Language.Lang }}
|
||||
<html {{ if eq .Site.Params.paige.color_scheme `dark` }} data-bs-theme="dark" {{ end }} {{ if $rtl }} dir="rtl" {{ end }} {{ with $lang }} lang="{{ . }}" {{ end }}>
|
||||
{{ partial "paige/head.html" . }}
|
||||
{{ partial "paige/body.html" . }}
|
||||
{{ $rtl := eq $page.Language.LanguageDirection "rtl" }}
|
||||
{{ $lang := $page.Site.LanguageCode | default $page.Site.Language.Lang }}
|
||||
<html {{ if eq $page.Site.Params.paige.color_scheme `dark` }} data-bs-theme="dark" {{ end }} {{ if $rtl }} dir="rtl" {{ end }} {{ with $lang }} lang="{{ . }}" {{ end }}>
|
||||
{{ partial "paige/head.html" $page }}
|
||||
{{ partial "paige/body.html" $page }}
|
||||
{{ if templates.Exists "partials/paige/body-first.html" }}
|
||||
{{ partial "paige/body-first.html" . }}
|
||||
{{ partial "paige/body-first.html" $page }}
|
||||
{{ end }}
|
||||
<div class="container flex-fill">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
{{ partial "paige/header.html" . }}
|
||||
{{ partial "paige/header.html" $page }}
|
||||
<main>
|
||||
{{ if templates.Exists "partials/paige/main-first.html" }}
|
||||
{{ partial "paige/main-first.html" . }}
|
||||
{{ partial "paige/main-first.html" $page }}
|
||||
{{ end }}
|
||||
{{ block "main" . }}{{ end }}
|
||||
{{ block "main" $page }}{{ end }}
|
||||
{{ if templates.Exists "partials/paige/main-last.html" }}
|
||||
{{ partial "paige/main-last.html" . }}
|
||||
{{ partial "paige/main-last.html" $page }}
|
||||
{{ end }}
|
||||
</main>
|
||||
{{ partial "paige/footer.html" . }}
|
||||
{{ partial "paige/footer.html" $page }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ partial "paige/scripts.html" . }}
|
||||
{{ partial "paige/scripts.html" $page }}
|
||||
{{ if templates.Exists "partials/paige/body-last.html" }}
|
||||
{{ partial "paige/body-last.html" . }}
|
||||
{{ partial "paige/body-last.html" $page }}
|
||||
{{ end }}
|
||||
</body>
|
||||
</html>
|
||||
{{ if not .Site.Params.paige.hide_theme_comment }}
|
||||
{{ if not $page.Site.Params.paige.hide_theme_comment }}
|
||||
{{ printf "<!-- Paige theme from https://github.com/willfaught/paige -->" | safeHTML }}
|
||||
{{ end }}
|
||||
|
Reference in New Issue
Block a user