summaryrefslogtreecommitdiffstats
path: root/layouts/_default/single.html
blob: f327cbc958d158d248527252139d3b97f8234d76 (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
{{ define "main" }}
{{- $postType := .Type | lower | singularize -}}
<article class="{{ partial "post-class.html" . }}" role="document"{{ with .Params.lang }} lang="{{ . }}"{{ end }}>
    <header>
        <h1 class="text-title">
            {{ .Params.caption | default .Title }}
        </h1>
        <p class="byline">
            {{ if in (slice "drama" "narrative" "poem") $postType }}
                {{ partial "post-meta/author.html" . }}
            {{ else }}
                {{ partial "post-meta/date.html" . }}
            {{ end }}
        </p>
    </header>

    <div class="{{ $postType }}-body">
        {{ .Content }}
    </div>

    {{/* Post tags are not allowed for drama, narratives and poems */}}
    {{ if not (in (slice "drama" "narrative" "poem") $postType) }}
        <div class="tags-wrapper">
            {{ partial "post-tags.html" . }}
        </div>
    {{ end }}
</article>
{{ end }}