diff options
Diffstat (limited to 'templates/base.html')
-rw-r--r-- | templates/base.html | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/templates/base.html b/templates/base.html index 25232dc..cc05840 100644 --- a/templates/base.html +++ b/templates/base.html | |||
@@ -1,5 +1,5 @@ | |||
1 | <!DOCTYPE html> | 1 | <!DOCTYPE html> |
2 | <html> | 2 | <html lang="en"> |
3 | 3 | ||
4 | <head> | 4 | <head> |
5 | <meta charset="utf-8" /> | 5 | <meta charset="utf-8" /> |
@@ -17,28 +17,38 @@ | |||
17 | $endif$ | 17 | $endif$ |
18 | <title>$if(ismain)$$else$$title$ – $endif$$sitetitle$</title> | 18 | <title>$if(ismain)$$else$$title$ – $endif$$sitetitle$</title> |
19 | <link rel="stylesheet" href="/style.css" /> | 19 | <link rel="stylesheet" href="/style.css" /> |
20 | $if(id)$ | ||
21 | <style> | ||
22 | .c-nav__item--$id$ { | ||
23 | font-weight: bold; | ||
24 | color: var(--fg-plus); | ||
25 | } | ||
26 | </style> | ||
27 | $endif$ | ||
20 | </head> | 28 | </head> |
21 | 29 | ||
22 | <body> | 30 | <body> |
23 | <main class="s-page"> | 31 | <main class="s-page"> |
24 | $if(ismain)$ | 32 | <nav class="c-nav"> |
33 | $for(menus.main)$ | ||
34 | <a class="c-nav__item c-nav__item--$it.id$" href="$it.url$">$it.label$</a> | ||
35 | $endfor$ | ||
36 | </nav> | ||
37 | |||
25 | <header class="c-page-header" role="presentation"> | 38 | <header class="c-page-header" role="presentation"> |
39 | $if(ismain)$ | ||
26 | ${pageHeader()} | 40 | ${pageHeader()} |
27 | </header> | 41 | $else$ |
28 | $else$ | ||
29 | <header class="c-page-header c-page-header--nohide" role="presentation"> | ||
30 | ${pageHeaderSm()} | 42 | ${pageHeaderSm()} |
43 | $endif$ | ||
31 | </header> | 44 | </header> |
32 | $endif$ | ||
33 | 45 | ||
34 | $body$ | 46 | $body$ |
35 | </main> | 47 | </main> |
36 | 48 | ||
37 | $if(ismain)$ | 49 | $if(ismain)$ |
38 | <template id="header-sm"> | 50 | <template id="header-sm"> |
39 | <header class="c-page-header c-page-header--sm" role="presentation"> | ||
40 | ${pageHeaderSm()} | 51 | ${pageHeaderSm()} |
41 | </header> | ||
42 | </template> | 52 | </template> |
43 | 53 | ||
44 | <script> | 54 | <script> |
@@ -46,7 +56,7 @@ ${pageHeaderSm()} | |||
46 | var headerTemplateEl = document.getElementById("header-sm"); | 56 | var headerTemplateEl = document.getElementById("header-sm"); |
47 | var headerSmEl = headerTemplateEl.content.cloneNode("true"); | 57 | var headerSmEl = headerTemplateEl.content.cloneNode("true"); |
48 | 58 | ||
49 | headerEl.parentElement.insertBefore(headerSmEl, headerEl.nextElementSibling); | 59 | headerEl.appendChild(headerSmEl); |
50 | </script> | 60 | </script> |
51 | $endif$ | 61 | $endif$ |
52 | </body> | 62 | </body> |