aboutsummaryrefslogtreecommitdiff
path: root/themes/terrassa/layouts/_default/single.html
blob: 9f108f77f0a1f5d2477b64cec6772a713cff69bf (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
{{ 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>

    {{ if ne .Type "page" }}
    <main class="post__body">
        {{ .Content }}
    </main>
    {{ else }}
    <main class="post__body" style="margin-bottom: 3rem;">
        {{ .Content }}
    </main>
    {{ end }}

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