{{ $page := . }}

<!doctype html>
{{ partial "paige/html.html" $page }}
    {{ partial "paige/head.html" $page }}
    {{ partial "paige/body.html" $page }}
        {{ if templates.Exists "partials/paige/body-first.html" }}
            {{ partial "paige/body-first.html" $page }}
        {{ end }}

        <div class="container flex-fill" id="paige-root">
            <div class="row">
                <div class="col">
                    {{ partial "paige/header.html" $page }}

                    <main id="paige-main">
                        {{ if templates.Exists "partials/paige/main-first.html" }}
                            {{ partial "paige/main-first.html" $page }}
                        {{ end }}

                        {{ block "main" $page }}{{ end }}

                        {{ if templates.Exists "partials/paige/main-last.html" }}
                            {{ partial "paige/main-last.html" $page }}
                        {{ end }}
                    </main>

                    {{ partial "paige/footer.html" $page }}
                </div>
            </div>
        </div>

        {{ partial "paige/scripts.html" $page }}

        {{ if templates.Exists "partials/paige/body-last.html" }}
            {{ partial "paige/body-last.html" $page }}
        {{ end }}
    </body>
</html>
