summaryrefslogtreecommitdiffstats
path: root/layouts/_default/single.html
blob: 72732ef5a7f88191a44279e31d41df39923c3f51 (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
{{ 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.pageTitle | 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) }}
        {{ partial "post-tags.html" . }}
    {{ end }}
</article>
{{ end }}