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

3 4 5 6
<!-- http://microformats.org/wiki/h-entry -->
<div class="post h-entry">
    <h1 class="post-title p-name">{{ .Title }}</h1>

Kaushal Modi's avatar
Kaushal Modi committed
7
    {{ partial "date-maybe.html" . }}
8 9 10

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

    <div class="content">
20
        {{ with .Description }}
21
            <div class="description p-summary">
22 23 24 25
                {{ . | markdownify }}
            </div>
        {{ end }}

26 27
        {{ partial "series.html" . }}

Kaushal Modi's avatar
Kaushal Modi committed
28 29
        {{ partial "author.html" . }}

30 31 32
        <div class="e-content">
             {{ partial "headline-hash.html" .Content }}
        </div>
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47

        <!-- Print versions at the end of the post, if specified. -->
        {{ with .Params.versions }}
            {{ $.Scratch.Set "__versions_len" (len .) }}
            {{ $.Scratch.Set "__versions_cnt" 0 }}
            <hr />
            <small>
                {{ printf "<span style=\"font-variant: small-caps;\">Versions used</span>:" | safeHTML }}
                {{ range $k, $v := . }}
                    {{ printf "<code>%s</code> %s" $k $v | safeHTML }}
                    {{ $.Scratch.Add "__versions_cnt" 1 }}
                    {{ cond (eq ($.Scratch.Get "__versions_cnt") ($.Scratch.Get "__versions_len")) "" ", " }}
                {{ end }}
            </small>
        {{ end }}
48
    </div>
49
</div>
Kaushal Modi's avatar
Kaushal Modi committed
50

51
<div class="post-catlist right">
52
    {{ partial "post_categories.html" . }}
53
    {{ partial "post_tags.html" . }}
Kaushal Modi's avatar
Kaushal Modi committed
54 55 56 57 58 59
</div>

{{ end }}

{{ define "after_main" }}

60
{{ partial "prev_next.html" . }}
Kaushal Modi's avatar
Kaushal Modi committed
61

62 63 64
{{/* printf "%#v" $.Site */}}
{{/* printf "%#v" $.Site.Params */}}

Kaushal Modi's avatar
Kaushal Modi committed
65
{{ partial "webmention_send.html" . }}
Kaushal Modi's avatar
Kaushal Modi committed
66
{{ partial "webmention_rcv.html" . }}
67
{{ with .Site.Params.remarkbox }}
Kaushal Modi's avatar
Kaushal Modi committed
68
    <div class="comments clear-float">
Kaushal Modi's avatar
Kaushal Modi committed
69
        <hr>
70
        <h2>Comments</h2>
71
        {{ partial "remarkbox.html" . }}
Kaushal Modi's avatar
Kaushal Modi committed
72
    </div>
73
{{ else }}
74
    {{ with .Site.Params.isso }}
75
        <div class="comments clear-float">
Kaushal Modi's avatar
Kaushal Modi committed
76
            <hr>
77
            <h2>Comments</h2>
78
            {{ partial "isso.html" . }}
79
        </div>
80 81 82 83 84 85 86 87
        {{/* 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">
                {{ partial "disqus.html" . }}
            </div>
        {{ end }}
88
    {{ end }}
89
{{ end }}
Kaushal Modi's avatar
Kaushal Modi committed
90 91

{{ end }}