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

3
<!-- http://microformats.org/wiki/h-entry -->
Kaushal Modi's avatar
Kaushal Modi committed
4 5 6
<!-- h-entry validation: https://xray.p3k.io/ -->
<!-- authorship testing: https://sturdy-backbone.glitch.me/ -->

7 8 9
<div class="h-entry">
    <div class="post">
        <h1 class="post-title p-name">{{ .Title }}</h1>
10

11 12 13
        <!-- To complete the h-entry meta-data as per https://indiewebify.me/validate-h-entry/ -->
        <a class="u-url hide" href="{{ .Permalink }}"></a>

14
        {{ partial "date-maybe.html" . }}
Kaushal Modi's avatar
Kaushal Modi committed
15
        {{ partial "syndication.html" . }}
16

17 18 19 20 21 22 23 24
        {{ 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" . }}
25 26
        {{ end }}

27 28 29 30 31 32
        <div class="content">
            {{ with .Description }}
                <div class="description p-summary">
                    {{ . | markdownify }}
                </div>
            {{ end }}
33

34
            {{ partial "series.html" . }}
35

36
            {{ partial "author.html" . }}
Kaushal Modi's avatar
Kaushal Modi committed
37

38 39 40
            <div class="e-content">
                {{ partial "headline-hash.html" .Content }}
            </div>
41

42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
            <!-- 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>
57
    </div>
Kaushal Modi's avatar
Kaushal Modi committed
58

59 60
    <!-- Tags/categories -->
    {{ partial "post_taxo.html" . }}
Kaushal Modi's avatar
Kaushal Modi committed
61 62 63 64 65
</div>
{{ end }}

{{ define "after_main" }}

66
{{ partial "prev_next.html" . }}
Kaushal Modi's avatar
Kaushal Modi committed
67

68 69 70
{{/* printf "%#v" $.Site */}}
{{/* printf "%#v" $.Site.Params */}}

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

{{ end }}