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

single.html « post « layouts - github.com/puresyntax71/hugo-theme-chunky-poster.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 87a9a77d5114c364558f348617d95cf3fc2eaf35 (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
{{ define "main" }}
<main class="content-page container pt-7 pb-5">
    {{ $page := . }}
    <div class="row">
        <div class="col">
            <article>
                <div class="row justify-content-center">
                    <div class="col-lg-8">
                        <div class="meta text-muted mb-3">
                            <p class="created text-muted text-uppercase font-weight-bold mb-1">{{ $page.Date.Format "January 2, 2006" }}</p>
                            <span class="mr-2"><i class="fas fa-book-open mr-2"></i>{{ T "wordCount" $page.WordCount }}</span>
                            <span><i class="fas fa-clock mr-2"></i>{{ T "readingTime" $page.ReadingTime }}</span>
                        </div>

                        <h1>{{ $page.Title }}</h1>

                        {{ partial "authors.html" $page }}
                    </div>
                </div>

                {{- with $page.Params.images -}}
                    {{- $images := . -}}
                    {{- with $page.Site.GetPage "section" "images" -}}
                        {{- with .Resources.GetMatch (strings.TrimPrefix "/images/" (index $images 0)) -}}
                            {{- $image := .Fill "900x500" -}}
                            <div class="row justify-content-center mb-3">
                                <div class="col-lg-10">
                                    <img data-src="{{ $image.RelPermalink }}" class="img-fluid rounded" alt="{{ $page.Title }}">
                                </div>
                            </div>
                        {{- end -}}
                    {{- end -}}
                {{- end -}}

                <div class="row justify-content-center">
                    <div class="col-lg-8">
                        <div class="content">
                            {{ $page.Content }}
                        </div>

                        {{- with $page.Params.tags -}}
                            <div class="tags my-3">
                            {{- range . -}}
                                <a class="badge badge-pill badge-light border mr-2" href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">
                                    <i class="fas fa-tag mr-2"></i>{{ . }}
                                </a>
                            {{- end -}}
                            </div>
                        {{- end -}}
                    </div>
                </div>

                <div class="row justify-content-center">
                    <div class="col-lg-8">
                        {{ template "_internal/disqus.html" . }}
                    </div>
                </div>
            </article>
        </div>
    </div>

    {{ partial "related.html" $page }}
</main>
{{ end }}