single.html 1.32 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.html" . }}</span>
6 7 8

    {{ if not .Params.notoc }}
        {{ with .TableOfContents }}
9
            <div class="toc">
10
                {{ . }}
11
                <a href="#top" class="back-to-top">Back to top</a>
12 13
            </div>
        {{ end }}
14
        {{ partial "toc_on_side.html" . }}
15 16 17 18 19
    {{ end }}

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

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

{{ end }}

{{ define "after_main" }}

30
<div class="prev-next-navigator clear-float no-color-links">
31
    {{ partial "prev_next.html" . }}
32
</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
    <div class="comments clear-float">
        <h1>Comments</h1>
40
        {{ partial "isso.html" . }}
Kaushal Modi's avatar
Kaushal Modi committed
41
    </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
{{ else }}
    {{ with .Site.DisqusShortname }}
        <div class="comments clear-float">
            <h1>Comments</h1>
            {{/* template "_internal/disqus.html" . */}}
49
            {{ partial "disqus.html" . }}
50 51
        </div>
    {{ end }}
52
{{ end }}
Kaushal Modi's avatar
Kaushal Modi committed
53 54

{{ end }}