single.html 1.59 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" . }}
24
    {{ partial "post_tags.html" . }}
Kaushal Modi's avatar
Kaushal Modi committed
25 26 27 28 29 30
</div>

{{ end }}

{{ define "after_main" }}

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

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

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

{{ end }}