Denys Konovalov 70fab84ecd
All checks were successful
website / prod-build (push) Successful in 6s
remove fixed nav
2023-08-10 10:43:14 +02:00

35 lines
1.5 KiB
HTML

{{ 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({{ . }});background-position-y:0;"{{ end }}>
<div class="vertical">
<div id="site-head-content" class="inner">
{{ with .Params.header_headline }}<h2 class="blog-title">{{ . | markdownify | safeHTML }}</h2>{{ end }}
{{ with .Params.header_subheadline }}<h3 class="blog-description">{{ . }}</h3>{{ 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">
{{ 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 }}