blob: 6299dcebbb84b19fe1575f42cd437cd863b885e9 (
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
81
82
83
84
85
86
87
88
|
{{define "head"}}<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{if eq .OutputPath "about/index.html"}}About & colophon{{else}}{{.Title}}{{end}} — tjp.lol</title>
{{with index .Meta "description"}}<meta name="description" content="{{.}}">
{{end}}<link rel="stylesheet" href="{{rel .OutputPath "style.css"}}">
{{if or (eq .OutputPath "weblog/index.html") (index .Meta "post_date")}}<link rel="alternate" type="application/atom+xml" title="tjp.lol" href="{{rel .OutputPath "feed.xml"}}">
{{end}}</head>
<body>
<div class="wrap">
{{end}}
{{define "header"}} <header class="site">
<h1 class="brand"><a href="{{rel .OutputPath "/"}}">~tjp<span class="cur"> $_</span></a></h1>
{{if eq .OutputPath "index.html"}}<p class="tag">Elder millennial in Salt Lake City, Utah.</p>
{{end}}<nav class="main">
<a href="{{rel .OutputPath "/about/"}}"{{if eq .OutputPath "about/index.html"}} aria-current="page"{{end}}>about</a>
<a href="{{rel .OutputPath "/weblog/"}}"{{if eq .OutputPath "weblog/index.html"}} aria-current="page"{{end}}>weblog</a>
<a href="{{rel .OutputPath "/notes/"}}"{{if eq .OutputPath "notes/index.html"}} aria-current="page"{{end}}>notes</a>
<a href="{{rel .OutputPath "/projects/"}}"{{if eq .OutputPath "projects/index.html"}} aria-current="page"{{end}}>projects</a>
<a href="{{rel .OutputPath "/feed.xml"}}">feed</a>
</nav>
</header>
{{end}}
{{define "footer"}} <footer>
<!-- <div class="ring">
<span>webring:</span>
<a href="#">← prev</a><a href="#">rand</a><a href="#">next →</a>
</div> -->
<p>©2026 tjp · content <a href="https://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a> unless noted · <a href="{{rel .OutputPath "feed.xml"}}">feed</a></p>
</footer>
</div>
</body>
</html>
{{end}}
{{define "page"}}{{template "head" .}}{{template "header" .}}
<main>
<article class="post">
<div class="post-head">
<h1>{{.Title}}</h1>
</div>
<div class="note-body">
{{joinSections .Sections}}
</div>
</article>
</main>
{{template "footer" .}}{{end}}
{{define "weblog"}}{{template "head" .}}{{template "header" .}}
<main>
<article class="post">
<div class="post-head">
<p class="meta"><a href="{{rel .OutputPath "weblog/index.html"}}" style="text-decoration:none;">← weblog</a> / <time datetime="{{date (index .Meta "post_date") "2006-01-02"}}">{{date (index .Meta "post_date") "2006-01-02"}}</time></p>
<h1>{{.Title}}</h1>
</div>
{{with .Sections}}{{with index . 0}}<div style="font-size:1.2em">{{.}}</div>{{end}}
{{joinSections (slice . 1)}}{{end}}
</article>
<nav class="post-nav">
<a href="{{rel .OutputPath "weblog/index.html"}}">All posts</a>
</nav>
</main>
{{template "footer" .}}{{end}}
{{define "notes"}}{{template "head" .}}{{template "header" .}}
<main>
<article class="post">
<div class="post-head">
<p class="meta"><a href="{{rel .OutputPath "notes/index.html"}}" style="text-decoration:none;">← notes</a></p>
<h1>{{.Title}}</h1>
</div>
<div class="note-body">
{{joinSections .Sections}}
</div>
</article>
</main>
{{template "footer" .}}{{end}}
|