aboutsummaryrefslogtreecommitdiff
path: root/themes/terrassa/layouts/_default/single.html
blob: f6b15aee528f79045deaba51c4dfe21a54b46625 (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
{{ define "main" }}
<article class="post">
    <header class="post__header">
        <h1 class="post__title">{{ .Title }}</h1>
        {{ if .Description }}
        <p class="post__subtitle">{{ .Description }}</p>
        {{ end }}
        {{ if ne .Type "page" }}
        {{ if and $.Site.Params.posts.showDate $.Site.Params.posts.showAuthor }}
        <p class="post__date date">
            {{ dateFormat $.Site.Params.posts.dateFormat .Date }} By {{ $.Params.author }}.
        </p>
        {{ else if $.Site.Params.posts.showDate }}
        <p class="post__date date">{{ dateFormat $.Site.Params.posts.dateFormat .Date }}</p>
        {{ else if $.Site.Params.posts.showAuthor }}
        <p class="post__author author">By {{ $.Params.author }}.</p>
        {{ end }}
        {{ end }}
    </header>

    <main class="post__body">
        {{ .Content }}
    </main>

    {{ if ne .Type "page" }}
    <footer class="post__footer">
        {{ .Render "tags" }}
    </footer>
    {{ end }}
</article>
{{ end }}