summaryrefslogtreecommitdiff
path: root/htdocs/template/root.tmpl
blob: 52734bb945392b2a30d37aaa2c75f7d328055809 (plain)
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
78
79
80
{{/* This template is combined with other templates to render blog pages. */}}

{{define "root" -}}
<!DOCTYPE html>
<html lang="en">
<head>
	<title>{{template "title" .}}</title>

	<meta charset="utf-8">
	<meta name="google-site-verification" content="3cwuN4OwVfNZEGTw5Q9UotI2AJCTzr8F7QB8uhtfAWo">
	<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

	<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
	<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=IBM+Plex+Sans|IBM+Plex+Serif|IBM+Plex+Mono">
	<link rel="stylesheet" href="/static/style.css">
	<link rel="alternate" type="application/atom+xml" title="Atom Feed" href="/feed.atom">

	<!-- Global site tag (gtag.js) - Google Analytics -->
	<script async src="https://www.googletagmanager.com/gtag/js?id=UA-22272807-1"></script>
	<script>
	  window.dataLayer = window.dataLayer || [];
	  function gtag(){dataLayer.push(arguments);}
	  gtag('js', new Date());
	  gtag('config', 'UA-22272807-1');
	</script>
</head>
<body>
	<nav class="navbar navbar-expand-sm">
		<div class="container-fluid">
			<a class="navbar-brand" href="{{.BasePath}}/">dim13·blog</a>
			<ul class="navbar-nav">
				<li class="nav-item"><a class="nav-link" href="{{.BasePath}}/Who-am-I">Who am I</a></li>
				<li class="nav-item"><a class="nav-link" href="//github.com/dim13">GitHub</a></li>
				<li class="nav-item"><a class="nav-link" href="//git.dim13.org">Local Git</a></li>
				<li class="nav-item"><a class="nav-link" href="//ftp.dim13.org">Public FTP</a></li>
				<li class="nav-item"><a class="nav-link" href="{{.BasePath}}/index">Blog Index</a></li>
			</ul>
		</div>
	</nav>

	<div class="container">
	{{template "content" .}}
	</div>

	{{with .Doc}}
	<nav class="navbar navbar-expand-sm">
		<div class="container-fluid">
			<ul class="navbar-nav">
			{{with .Older}}
				<li class="nav-item"><a class="nav-link" href="{{.Path}}">&larr; {{.Title}}</a></li>
			{{end}}
			</ul>
			<ul class="navbar-nav">
			{{with .Newer}}
				<li class="nav-item"><a class="nav-link" href="{{.Path}}">{{.Title}} &rarr;</a></li>
			{{end}}
			</ul>
		</div>
	</nav>
	{{end}}
</body>
</html>
{{end}}

{{define "doc"}}
	<article>
	<header>
		<h2><a href="{{.Path}}">{{.Title}}</a></h2>
		{{template "time" .Time}}
	</header>
	{{.HTML}}
	<footer>
		{{with .Authors}}<address>By {{authors .}}</address>{{end}}
	</footer>
	</article>
{{end}}

{{define "time" -}}
<time datetime="{{.Format "2006-01-02T15:04:05Z07:00"}}">{{.Format "2 January 2006"}}</time>
{{- end}}