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

index.html « layouts - github.com/janraasch/hugo-scroll.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d66bf9eb24df5f8b698b2b85bd99b545329a4a74 (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
{{ define "main" }}
{{ $headless := .Site.GetPage "/homepage" }}
{{ $sections := $headless.Resources.ByType "page" }}
{{ $sections := cond .Site.BuildDrafts $sections (where $sections "Draft" "==" false) }}
<header id="site-head" {{ with .Params.header_image }}style="background-image: url({{ . }})"{{ end }}>
    <div class="vertical">
        <div id="site-head-content" class="inner">

            {{ with .Params.header_headline }}<h1 class="blog-title">{{ . }}</h1>{{ end }}
            {{ with .Params.header_subheadline }}<h2 class="blog-description">{{ . }}</h2>{{ end }}

            {{ range where $sections ".Params.header_menu" "eq" true }}
                 <a class='btn site-menu' data-title-anchor='{{ anchorize .Title }}'>{{ .Title }}</a>
            {{ end }}
            <i id='header-arrow' class="fa fa-angle-down"></i>
        </div>
    </div>
</header>
<main class="content" role="main">

    <div class='fixed-nav'>
    </div>
    {{ range $index_val, $elem_val := $sections }}
        <div class='post-holder'>
            <article id='{{ anchorize .Title }}' class='post {{ if eq $index_val 0 }}first{{ end }} {{ if eq (add $index_val 1) (len $sections) }}last{{ end }}'>
                <header class="post-header">
                    <h2 class="post-title">{{ .Title }}</h2>
                </header>
                <section class="post-content">
                    {{ .Content }}
                </section>
            </article>
            <div class='post-after'></div>
        </div>
    {{ end }}
</main>
{{ end }}