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

home.html « sections « partials « layouts - github.com/2-REC/hugo-myportfolio-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 97557e983e18b9035294951f0c51dd2a87e71f78 (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
65
66
{{ $params := .Site.Params.home }}
{{ with .Site.Data.home }}
    <section id="home"
        {{ with .background }}
            style="background-image: url('{{ (printf "images/%s" .) | absURL }}');"
        {{ end }}
        >
        <div class="header-content"
            style="
            {{- with $params.width -}}
                --home-width: {{ . }}%;
            {{- end -}}
            {{- if isset $params "offset_h" -}}
                --home-offset-h: {{ $params.offset_h }}%;
            {{- end -}}
            {{- if isset $params "offset_v" -}}
                --home-offset-v: {{ $params.offset_v }}%;
            {{- end -}}
            {{- with $params.text_align -}}
                --home-text-align: {{ . }};
            {{- end -}}
            "
            >
            <div class="header-content-inner anim-wrapper">
                {{ with .title_logo }}
                    <img id="home_logo" src="{{ . }}" class="img-responsive">
                {{ end }}
                {{ with .title }}
                    {{/* TODO: use specific class for title? */}}
                    <h1 class="anim zoomIn">{{ . | markdownify  }}</h1>
                {{ end }}
                {{ with .subtitle }}
                    <h2>{{ . | markdownify }}</h2>
                {{ end }}
                {{ if or .title .subtitle }}
                    <hr class="primary anim zoomIn">
                {{ end }}
                {{ with .text }}
                    <p>{{ . | markdownify }}</p>
                {{ end }}
                <div class="anim zoomIn">
                    {{ if .button_image }}
                        <a href="#about" class="btn-image page-scroll">
                            <img src={{ .button_image }} />
                        </a>
                    {{ else if .button_text }}
                        <a href="#about" class="btn btn-primary page-scroll">
                            {{ .button_text }}<br>
                        </a>
                    {{ else if .button_icon }}
                        {{ with .button_icon }}
                            <a href="#about" class="btn-icon btn-primary page-scroll {{ .pack }} {{ .icon }} icon-x6">
                            </a>
                        {{ end }}
                    {{ end }}
                </div>
            </div>
        </div>
        {{/* Background video (if no 'background' image) */}}
        {{- if and .background_video (not .background)  -}}
        <video autoplay muted loop id="home_video">
            <source src="{{ printf "images/%s" .background_video }}" type="video/mp4">
        </video>
        {{- end -}}
    </section>
{{ end }}