single.html 2.38 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
<article class="post h-entry">
    <header>
Kaushal Modi's avatar
Kaushal Modi committed
9 10 11 12
        {{ if .Params.draft }}
            <div class="draft right">Draft</div>
            <div class="clear-float"></div>
        {{ end }}
13
        <h1 class="post-title p-name">{{ .Title }}</h1>
14

15
        <!-- To complete the h-entry meta-data as per https://indiewebify.me/validate-h-entry/ -->
16
        <data class="u-url" value="{{ .Permalink }}"></data>
17

18 19 20 21
        <div class="date-syndication">
            {{ partial "date-maybe.html" . }}
            {{ partial "syndication.html" . }}
        </div>
22

23 24 25 26 27 28 29
        {{ if not .Params.notoc }}
            {{ with .TableOfContents }}
                <div class="toc">
                    {{ . }}
                    <a href="#top" class="back-to-top">Back to top</a>
                </div>
            {{ end }}
30
            {{ partialCached "toc_on_side.html" . }}
31
        {{ end }}
32
    </header>
33

34 35 36 37 38 39
    <div class="content">
        {{ with .Description }}
            <div class="description p-summary">
                {{ . | markdownify }}
            </div>
        {{ end }}
40

41
        {{ partial "series.html" . }}
42

43
        {{ partial "author.html" . }}
Kaushal Modi's avatar
Kaushal Modi committed
44

45 46
        <div class="e-content">
            {{ partial "headline-hash.html" .Content }}
47
        </div>
48
    </div>
49 50 51
</article>

{{ end }}
Kaushal Modi's avatar
Kaushal Modi committed
52

53 54 55 56 57 58 59 60 61 62 63
{{ define "footer" }}

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

72 73
<!-- Tags/categories -->
{{ partial "post_taxo.html" . }}
Kaushal Modi's avatar
Kaushal Modi committed
74

75
<!-- Prev/next post -->
76
{{ partial "prev_next.html" . }}
Kaushal Modi's avatar
Kaushal Modi committed
77

78
<!-- Send/receive Webmentions -->
Kaushal Modi's avatar
Kaushal Modi committed
79
{{ partial "webmention_send.html" . }}
Kaushal Modi's avatar
Kaushal Modi committed
80
{{ partial "webmention_rcv.html" . }}
81 82 83

<!-- Other Comments -->
{{ partial "comments.html" . }}
Kaushal Modi's avatar
Kaushal Modi committed
84 85

{{ end }}