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

index.html « layouts - github.com/puresyntax71/hugo-theme-chunky-poster.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e048e7ca1f7d456f71919f3e7bbc0ffbdf749678 (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
{{ define "main" }}
<main class="homepage container py-6">
    <!-- Hero -->
    <div class="hero row">
        <div class="col position-relative py-lg-7{{ if not .Site.Params.homepageImage }} py-7{{ else }} pb-5{{ end }}">
            {{- with .Site.Params.homepageImage -}}
                <div class="homepage-image">
                    <img src="{{ . | relURL }}" class="img-fluid">
                </div>
            {{- end -}}

            <h1 class="display-4">{{ .Site.Title }}</h1>
            {{- with .Site.Params.description -}}
                <h3 class="font-weight-normal">{{ . | safeHTML }}</h3>
            {{- end -}}
        </div>
    </div>

    <!-- Latest article -->
    {{- range first 1 (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) -}}
        {{ $page := . }}
        <div class="latest row py-lg-5">
            <div class="col-lg-6 mb-3">
                {{- with $page.Params.images -}}
                    {{- $images := . -}}
                    {{- with $page.Site.GetPage "section" "images" -}}
                        {{- with .Resources.GetMatch (strings.TrimPrefix "/images/" (index $images 0)) -}}
                            {{- $image := .Fill "700x450" -}}
                            <a href="{{ $page.RelPermalink }}" class="d-block">
                                <img data-src="{{ $image.RelPermalink }}" class="img-fluid rounded" alt="{{ $page.Title }}">
                            </a>
                        {{- end -}}
                    {{- end -}}
                {{- end -}}
            </div>
            <div class="col-lg-6 mb-3">
                <h5 class="created text-muted text-uppercase font-weight-bold">{{ $page.Date.Format "January 2, 2006" }}</h5>
                <h2><a href="{{ $page.RelPermalink }}">{{ $page.Title }}</a></h2>

                <div class="content">
                    {{ $page.Summary }}
                </div>
            </div>
        </div>
    {{- end -}}

    <!-- Articles -->
    <div class="articles row row-cols-1 row-cols-lg-3">
        {{ range after 1 (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) }}
            <div class="col mb-3">
                {{ .Render "card" }}
            </div>
        {{ end }}
    </div>
</main>
{{ end }}