<!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" . }}
        <div class="container flex-fill">
            <div class="row">
                <div class="col">
                    {{ partial "paige/header.html" . }}
                    <main>
                        {{ block "main" . }}{{ end }}
                    </main>
                    {{ partial "paige/footer.html" . }}
                </div>
            </div>
        </div>
        {{ partial "paige/scripts.html" . }}
        {{ if templates.Exists "partials/paige-body-last.html" }}
        {{ partial "paige/body-last.html" . }}
        {{ end }}
    </body>
</html>
{{ if not .Site.Params.paige.hide_theme_comment }}
{{ printf "<!-- Paige theme from https://github.com/willfaught/paige -->" | safeHTML }}
{{ end }}
