@using RazorLight
@inherits TemplatePage<Elwig.Documents.Document>
@model Elwig.Documents.Document
<!DOCTYPE html>
<html lang="de-AT">
<head>
    <title>@Model.Title</title>
    <meta name="author" value="@Model.Author"/>
    <meta charset="UTF-8"/>
    <link rel="stylesheet" href="file:///@Raw(Model.DataPath)\resources\Document.css"/>
    <link rel="stylesheet" href="file:///@Raw(Model.DataPath)\resources\Document.Page.css"/>
    <link rel="stylesheet" href="file:///@Raw(Model.DataPath)\resources\Document.Table.css"/>
    @if (Model.DoublePaged) {
        <style>
            @@page :left {
                margin: 25mm 25mm 35mm 20mm;
                @@bottom-center {
                    content: element(page-footer-left);
                }
            }
        </style>
    }
</head>
<body>
    @if (Model.ShowFoldMarks) {
        <div class="m1"></div>
        <div class="m2"></div>
        <div class="m3"></div>
        <div class="m1 r"></div>
        <div class="m2 r"></div>
        <div class="m3 r"></div>
    }
    <div class="footer-wrapper">
        <div class="pre-footer">
            <span class="date">@($"{Model.Date:dddd, d. MMMM yyyy}")</span>
            <span class="doc-id">@Model.DocumentId</span>
            <span class="page"></span>
        </div>
        <footer>@Raw(Model.Footer)</footer>
    </div>
    @if (Model.DoublePaged) {
        <div class="footer-wrapper left">
            <div class="pre-footer">
                <span class="page"></span>
                <span class="doc-id">@Model.DocumentId</span>
                <span class="date">@($"{Model.Date:dddd, d. MMMM yyyy}")</span>
            </div>
            <footer>@Raw(Model.Footer)</footer>
        </div>
    }
    <header>@Raw(Model.Header)</header>
    <div class="spacing"></div>
    <div class="main-wrapper">
        @RenderBody()
    </div>
</body>
</html>
