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

single.html « projects « layouts - github.com/vickylaixy/hugo-theme-introduction.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 819f8f3875c596e150d723c8ccea35e050b6e00d (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
{{ define "main" }}
    <div class="container markdown top-pad">
        {{ with .Resources.ByType "image" }}
        <div class="has-text-centered">
            {{ $moreThanOneImage := gt (len .) 1 }}
            {{ if $moreThanOneImage }}
            <div class="owl-carousel owl-theme">
            {{ end }}
                {{ range sort . "Params.weight" }}
                    {{ $image := .Resize "1000x" }}
                    {{ if $moreThanOneImage }}
                    <div class="item owl-height">
                    {{ end }}
                        <img src="{{ $image.RelPermalink }}" class="img-responsive" alt="{{ $image.Name }}">
                    {{ if $moreThanOneImage }}
                    </div>
                    {{ end }}
                {{ end }}
            {{ if $moreThanOneImage }}
            </div>
            {{ end }}
        </div>
        {{ end }}
        {{ .Content }}
    </div>
    <!-- End post content -->
    {{ partial "comments.html" . }}
{{ end }}

{{ define "customCSS" }}
{{ partial "css/owlCarousel.html" . }}
{{ end }}

{{ define "customScripts" }}
{{ partial "js/owlCarousel.html" . }}
{{ end }}