summaryrefslogtreecommitdiffstats
path: root/templates/base.html
blob: 1f7613c20f89ce052f17c43caa33c976bf1946eb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    $for(author-meta)$
    <meta name="author" content="$author-meta$" />
    $endfor$
    $if(date-meta)$
    <meta name="dcterms.date" content="$date-meta$" />
    $endif$
    $if(keywords)$
    <meta name="keywords" content="$for(keywords)$$keywords$$sep$, $endfor$" />
    $endif$
    <title>$if(ismain)$$else$$title$ – $endif$$sitetitle$</title>
    <link rel="stylesheet" href="/style.css" />
    <style>
        @font-face {
            font-family: "Iosevka Term SS09";
            font-style: normal;
            font-weight: normal;
            src: url("/iosevka-term-ss09-regular.woff2") format("woff2");
        }

        @font-face {
            font-family: "Iosevka Term SS09";
            font-style: normal;
            font-weight: bold;
            src: url("/iosevka-term-ss09-bold.woff2") format("woff2");
        }
    </style>
</head>

<body>
    <main class="s-page">
        $if(ismain)$
        <header class="c-page-header" role="presentation">
${pageHeader()}
        </header>
        $else$
        <header class="c-page-header c-page-header--nohide" role="presentation">
${pageHeaderSm()}
        </header>
        $endif$

        $body$
    </main>

    $if(ismain)$
    <template id="header-sm">
        <header class="c-page-header c-page-header--sm" role="presentation">
${pageHeaderSm()}
        </header>
    </template>

    <script>
        var headerEl = document.querySelector(".s-page > header");
        var headerTemplateEl = document.getElementById("header-sm");
        var headerSmEl = headerTemplateEl.content.cloneNode("true");

        headerEl.parentElement.insertBefore(headerSmEl, headerEl.nextElementSibling);
    </script>
    $endif$
</body>

</html>