single.html 2.93 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 9 10
        <!-- To complete the h-entry meta-data as per https://indiewebify.me/validate-h-entry/ -->
        <a class="u-url hide" href="{{ .Permalink }}"></a>

11
        {{ partial "date-maybe.html" . }}
Kaushal Modi's avatar
Kaushal Modi committed
12
        {{ partial "syndication.html" . }}
13

14 15 16 17 18 19 20 21
        {{ 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" . }}
22 23
        {{ end }}

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

31
            {{ partial "series.html" . }}
32

33
            {{ partial "author.html" . }}
Kaushal Modi's avatar
Kaushal Modi committed
34

35 36 37
            <div class="e-content">
                {{ partial "headline-hash.html" .Content }}
            </div>
38

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

56 57 58 59
    <div class="post-catlist right">
        {{ partial "post_categories.html" . }}
        {{ partial "post_tags.html" . }}
    </div>
Kaushal Modi's avatar
Kaushal Modi committed
60 61 62 63 64
</div>
{{ end }}

{{ define "after_main" }}

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

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

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

{{ end }}