summaryrefslogtreecommitdiff
path: root/templates/root.html
blob: abc66bf70421f58db246b9a8c615a909d8ca9e8f (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
{{- define "article_meta"}}
    <dl class="meta">
        <div>
            <dt>Published</dt>
            <dd><time datetime="2006-01-02T15:04:05-0700">{{.Published.Format "Mon, Jan 2 2006, 15:04"}}</time></dd>
        </div>
        {{with .Tags}}
        <div>
            <dt>Tags</dt>
            <dd><ul class="article-tags">{{range .}}
                <li><a href="/blog/tags/{{.}}">{{.}}</a></li>
            {{end}}</ul></dd>
        </div>
        {{end}}
    </dl>
{{end -}}
{{- define "article_list"}}
    {{range .}}
        {{- $year := .Published.Format "2006" -}}
        {{- $month := .Published.Format "01" -}}
        {{- $day := .Published.Format "02" -}}
        <article>
            <h2><a href="/blog/{{$year}}/{{$month}}/{{$day}}/{{.Slug}}">{{.Title}}</a></h2>
            {{template "article_meta" .}}
            <div class="content">{{.Content}}</div>
            {{if .ReadMore -}}
                <p class="readmore-outer"><a href="/blog/{{$year}}/{{$month}}/{{$day}}/{{.Slug}}">Read more ...</a></p>
            {{- end}}
        </article>
    {{end}}
{{end -}}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>{{with .Title}}{{.}} - {{end}}laria.me</title>
    <link rel="stylesheet" type="text/css" href="/static/style.css">
    <link rel="stylesheet" type="text/css" href="/static/syntax.css">
    <link rel="alternate" type="application/atom+xml" href="/blog/feed.xml" title="Atom-Feed of the blog">
    <link rel="author" href="/about-me" />
    <meta name="author" content="Laria Carolin Chabowski" />
    <meta name="description" content="Laria's website. They mainly write about adventures in programming but will also occasionally write about other things that interest them." />
    <meta name="keywords" content="programming,blog,golang,php,music,links,gsrm,lgbt,lgbtq,genderqueer,trans,technology,web,opensource" />
</head>
<body>
    <a href="#maincontent" class="skip-to-main-content">Skip to main content</a>
    <header>
        <a href="/" class="logolink">laria.me</a>
        <nav>
        {{ range .Menu }}
            <!-- TODO: Label menus for screenreaders -->
            <ul class="menu-level">{{ range . }}
                <li {{ if .Active }}class="cur"{{ end }}><a href="{{ .Url }}">{{ .Title }}</a></li>
            {{ end }}</ul>
        {{ end }}
        </nav>
    </header>
    <main id="maincontent">{{ template "main" .Main }}</main>
    <footer>
        <p>Contents of this page is copyrighted under the [WTFPL](http://www.wtfpl.net), unless noted otherwise. The content of the linked pages is © of their respective owners. You can contact me via email: <code>laria (minus) blog (at) laria (dot) me</code>.</p>
        <p>If you really need more info, use the <a href="/impressum">Impressum</a>.</p>
    </footer>
</body>
</html>