style: run format once

This commit is contained in:
Jan Raasch 2020-09-11 18:28:34 +02:00
parent b86c9a50f2
commit edef9334bc

View file

@ -1,27 +1,37 @@
{{ define "main" }} {{ define "main" }}
{{ $headless := .Site.GetPage "/homepage" }} {{ $headless := .Site.GetPage "/homepage" }}
{{ $sections := $headless.Resources.ByType "page" }} {{ $sections := $headless.Resources.ByType "page" }}
<header id="site-head" {{ with .Params.header_image }}style="background-image: url({{ . }})"{{ end }}> <header
id="site-head"
{{ with .Params.header_image }}style="background-image: url({{ . }})"
{{ end }}
>
<div class="vertical"> <div class="vertical">
<div id="site-head-content" class="inner"> <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 }}
{{ 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 }} {{ range where $sections ".Params.header_menu" "eq" true }}
<a class='btn site-menu' data-title-anchor='{{ anchorize .Title }}'>{{ .Title }}</a> <a class="btn site-menu" data-title-anchor="{{ anchorize .Title }}"
>{{ .Title }}</a
>
{{ end }} {{ end }}
<i id='header-arrow' class="fa fa-angle-down"></i> <i id="header-arrow" class="fa fa-angle-down"></i>
</div> </div>
</div> </div>
</header> </header>
<main class="content" role="main"> <main class="content" role="main">
<div class="fixed-nav"></div>
<div class='fixed-nav'>
</div>
{{ range $index_val, $elem_val := $sections }} {{ range $index_val, $elem_val := $sections }}
<div class='post-holder'> <div class="post-holder">
<article id='{{ anchorize .Title }}' class='post {{ if eq $index_val 0 }}first{{ else }}{{ if eq (add $index_val 1) (len $sections) }}last{{ end }}{{ end }}'> <article
id="{{ anchorize .Title }}"
class="post {{ if eq $index_val 0 }}first{{ else }}{{ if eq (add $index_val 1) (len $sections) }}last{{ end }}{{ end }}"
>
<header class="post-header"> <header class="post-header">
<h2 class="post-title">{{ .Title }}</h2> <h2 class="post-title">{{ .Title }}</h2>
</header> </header>
@ -29,7 +39,7 @@
{{ .Content }} {{ .Content }}
</section> </section>
</article> </article>
<div class='post-after'></div> <div class="post-after"></div>
</div> </div>
{{ end }} {{ end }}
</main> </main>