summaryrefslogtreecommitdiff
path: root/layouts/_default/baseof.html
blob: 6f55b5758e70a396ed3a86263054f4dc6b1b9b2a (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

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1" />
		<title>{{ block "title" . }}{{ .Site.Title }}{{ end }}</title>
		{{ $style := resources.Get "style.css" | resources.Minify | resources.Fingerprint }}
       		<link rel="stylesheet" href="{{ $style.RelPermalink }}" />
	</head>
	<body>
		<aside id="sidebar">
			<p style="text-align: center; font-weight: bold;">
				<a href="/">{{ .Site.Title }}</a>
			</p>
			{{ $currentSection := .CurrentSection }}
			<ul>
				{{ range .Site.Sections }}
					{{ if eq $currentSection . }}
						<li class="nav-current"><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
					{{ else }}
						<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
					{{ end }}
					{{ if or (eq $currentSection .) ($currentSection.IsDescendant .) }}
						<ul>
							{{ range .Pages }}
								{{ if eq $currentSection . }}
									<li class="nav-current"><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
								{{ else }}
									<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
								{{ end }}
							{{ end }}
						</ul>
					{{ end }}
				{{ end }}
			</ul>	
		</aside>
		<div id="main-and-footer">
			<main>
				{{ block "main" . }}
				{{ end }}
			</main>
			<footer>
				{{ block "footer" . }}
				{{ end }}
			</footer>
		</div>
	</body>
</html>