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

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

8
        {{ partial "date-maybe.html" . }}
9

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

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

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

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

31 32 33
            <div class="e-content">
                {{ partial "headline-hash.html" .Content }}
            </div>
34

35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
            <!-- 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 }}
        </div>
50
    </div>
Kaushal Modi's avatar
Kaushal Modi committed
51

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

{{ define "after_main" }}

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

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

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

{{ end }}