~bfiedler/website

ref: a32c9ebf50f8399c34e5712ada692b52926644eb website/layouts/blog/single.html -rw-r--r-- 1.2 KiB
a32c9ebf — Ben Fiedler minor improvements 2 months ago
                                                                                
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
{{ define "main" }}
{{ partial "header.html" (dict "context" .  "IsDetailed" false) }}
<main class="blogpost">
    <article>
        <header>
            <h1 class="post-title">{{ .Title }}</h1>
            <span class="post-metadata">
                <time class="post-time" datetime="{{ .Date.Format "2006-01-02T15:04:05Z0700" }}">{{ .Date.Format "2006-01-02" }}</time>
                on <a href="/blog/">this blog</a>
                {{ partial "feed-icon.html" }}
            </span>
        </header>
        {{- if in .Params.tags "math" }}
        <section>{{ replace .Content "$" "<span class=\"inline-math\">$</span>" | safeHTML }}</section>
        {{- else }}
        <section>{{ .Content }}</section>
        {{- end }}
        {{- if .Params.tags -}}
        <footer class="post-metadata">
            tags: [
            <ul class="post-tags">
                {{- range .Params.tags }}
                <li>
                    <a href="/tags/{{ . }}">{{ . }}</a>
                </li>
                {{- end }}
            </ul>
            ]
        </footer>
        {{- end -}}
    </article>
</main>
{{ partial "openring.html" . }}
{{ partial "footer.html" . }}
{{ end }}