summaryrefslogtreecommitdiff
path: root/layouts/_default/baseof.html
blob: ac84d93f12b2ce08c6f2f116473f4e1417bec300 (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
<!DOCTYPE html>
<html lang="{{ or site.Language.LanguageCode }}">

<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width">
	<link rel="stylesheet" type="text/css" href="/style.css?v=1.0.3">
	<title>{{ if .IsHome }}{{ site.Title }}{{ else }}{{ .Title }}{{ end }}</title>
	<meta name="author" content="{{ .Site.Params.email }} ({{ .Site.Params.name }})">
	<meta name="description" content="{{- plainify (chomp .Summary) -}}">
	<meta property="og:title" content="{{ if .IsHome }}{{ site.Title }}{{ else }}{{ .Title }}{{ end }}" />
	<meta property="og:description" content="{{- plainify (chomp .Summary) -}}" />
	<meta property="og:url" content="{{ .Permalink}}" />
	{{ $images := .Page.Resources.ByType "image" }}
	{{ with index $images 0 }}
	{{ $processed := .Resize "600x" }}
	{{ $processed := $processed.Crop "512x512" }}
	<meta property="og:image" content="{{ $processed.RelPermalink }}" />
	{{ end }}
</head>

<body>
	<header>
		<h1>{{ if .IsHome }}{{ site.Title }}</h1>{{ else }}{{ .Title }}</h1>
		{{ end }}
	</header>
	<main>
		{{ block "main" . }}{{ end }}
	</main>
	<footer>
		<hr>
		{{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }}
		{{ if .IsHome }}
		<nav style="display: flex;justify-content: space-around;">
			<a href="/stuff">stuff</a>
			<a href="/contact">contact</a>
			<a href="https://git.mielota.com/mielota">git</a>
			<a href="https://dns.mielota.com">dns</a>
		</nav>
		{{ else }}
		<div style="display: flex;justify-content: space-between;align-items: center;">
			<p><a href="{{ path.Dir .Path }}">Return</a></p>
			{{ $isregular := (in .Site.RegularPages .Page) -}}
			{{ if $isregular }}
			<time datetime="{{ $dateMachine }}">{{ .Date.Format "02 January 2006" }}</time>
			{{ end }}
		</div>
		{{ end }}
	</footer>
</body>

</html>