summaryrefslogtreecommitdiffstats
path: root/templates/base.html
blob: 48d7c729f1fc4e0283217c21e7d55abd2498d247 (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
68
69
70
71
72
73
74
75
76
77
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta name="robots" content="noindex" />
    <link rel="shortcut icon" href="/favicon.ico" />
    $for(author)$
        <meta name="author" content="$it.name$$if(it.email)$ <$it.email$>$endif$" />
    $endfor$
    $if(date-meta)$
        <meta name="dcterms.date" content="$date-meta$" />
    $endif$
    $if(keywords)$
        <meta name="keywords" content="$for(keywords)$$keywords$$sep$, $endfor$" />
    $endif$
    $if(feed.url.abs)$
        <link href="$feed.url.abs$" type="application/atom+xml" rel="alternate" title="$if(is_home)$$else$$title$ – $endif$$site.title$" />
    $endif$
    <title>$if(is_home)$$else$$title$ – $endif$$site.title$</title>
    <link rel="stylesheet" href="/style.css" />
    $if(section.id)$
        <style>
            .c-nav__item--$section.id$ {
                border-color: var(--nav--item--active--fg);
                color: var(--nav--item--active--fg);
                font-weight: bold;
            }
        </style>
    $endif$
</head>

<body>
    <nav class="c-nav">
        <div class="c-nav__items l-container">
            <a class="c-nav__logo" href="/" title="$site.title$">$site.logo$</a>
            $for(menus.main)$
                <a class="c-nav__item c-nav__item--$it.id$" href="$it.url$">$it.label$</a>
            $endfor$
        </div>
    </nav>
        
    <main class="c-page s-page l-container l-container--content l-container--pad-v">
        <div class="c-page__content">
            $if(is_home)$
                <header class="c-page-header u-hidden@sm-down" role="presentation">
${pageHeader()}
                </header>
            $endif$

$body$

            $if(section.is_blog)$
                ${categoriesById()}
                ${pagelistByYear()}
            $endif$
        </div>
    </main>

    $if(is_home)$
        <template id="header-sm">
${pageHeaderSm()}
        </template>

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

            headerEl.classList.remove("u-hidden@sm-down");
            headerEl.appendChild(headerSmEl);
        </script>
    $endif$
</body>

</html>