single.html 1.26 KB
Newer Older
Kaushal Modi's avatar
Kaushal Modi committed
1 2 3 4
{{ define "main" }}

<div class="post">
    <h1 class="post-title">{{ .Title }}</h1>
5
    <span class="post-date">{{ partial "publishdate-maybe" . }}</span>
6 7 8

    {{ if not .Params.notoc }}
        {{ with .TableOfContents }}
9
            <div class="toc">
10 11 12 13 14 15 16 17 18 19
                <h3>Contents</h3>
                {{ . }}
            </div>
        {{ end }}
        {{ partial "toc_on_side" . }}
    {{ end }}

    <div class="content">
        {{ .Content }}
    </div>
20
</div>
Kaushal Modi's avatar
Kaushal Modi committed
21

22
<div class="post-catlist right">
Kaushal Modi's avatar
Kaushal Modi committed
23 24 25 26 27 28 29
    {{ partial "post_categories" . }}
</div>

{{ end }}

{{ define "after_main" }}

30
<div class="prev-next-navigator clear-float no-color-links">
31 32
    {{ partial "prev_next" . }}
</div>
Kaushal Modi's avatar
Kaushal Modi committed
33

34 35 36
{{/* printf "%#v" $.Site */}}
{{/* printf "%#v" $.Site.Params */}}

37
{{ with .Site.Params.isso }}
Kaushal Modi's avatar
Kaushal Modi committed
38 39 40 41
    <div class="comments clear-float">
        <h1>Comments</h1>
        {{ partial "isso" . }}
    </div>
42 43
    {{/* else if not (eq .Site.DisqusShortname "") */}}
    <!-- Below works the same way as the above empty-string equality check -->
44 45 46 47 48 49 50 51
{{ else }}
    {{ with .Site.DisqusShortname }}
        <div class="comments clear-float">
            <h1>Comments</h1>
            {{/* template "_internal/disqus.html" . */}}
            {{ partial "disqus" . }}
        </div>
    {{ end }}
52
{{ end }}
Kaushal Modi's avatar
Kaushal Modi committed
53 54

{{ end }}