Welcome to mirror list, hosted at ThFree Co, Russian Federation.

single.html « _default « layouts - github.com/calintat/minimal.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: cc4aa299b26b9af1e345acc9ebfa6a3cfe2ca1c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{{ partial "header" . }}

<main>

    {{ .Date.Format (.Site.Params.dateFormat | default "January 2, 2006") | $.Scratch.Set "subtitle" }}
    {{ with .Description }} {{ $.Scratch.Set "subtitle" . }} {{ end }}

    <div class="item">
        <h2>{{ .Title }}</h2>
        <h5>{{ $.Scratch.Get "subtitle" }}</h5>
        {{ range .Params.tags }}
        <a href="{{ $.Site.BaseURL }}tags/{{ . | urlize }}"><kbd class="item-tag">{{ . }}</kbd></a>
        {{ end }}
    </div>

    <br> <div class="text-justify">{{ .Content }}</div>

    <!-- related posts with the same tags -->
    {{ $related := first 3 (where (where (where .Site.Pages.ByDate.Reverse ".Type" "==" "post") ".Params.tags" "intersect" .Params.tags) "Permalink" "!=" .Permalink) }}

    {{ if $related }}

        <h4 class="page-header">Related</h4>

        {{ range $related }} {{ partial "list-item" . }} {{ end }}

    {{ end }}

    {{ if and .Site.DisqusShortname (not .Params.disableComments) }}

        <h4 class="page-header">Comments</h4>

        {{ template "_internal/disqus.html" . }}

    {{ end }}

</main>

{{ partial "footer.html" . }}