Compare commits

...

4 commits

Author SHA1 Message Date
Jan Raasch 2773d0534b style: run format again 2020-09-11 18:31:49 +02:00
Jan Raasch edef9334bc style: run format once 2020-09-11 18:31:49 +02:00
Jan Raasch b86c9a50f2 chore: do not prettierignore index.html 2020-09-11 18:31:49 +02:00
Jan Raasch 87b2623987 chore: update prettier-plugin-go-template 2020-09-11 18:31:49 +02:00
4 changed files with 44 additions and 33 deletions

View file

@ -3,4 +3,3 @@ resources
public
static/font-awesome
static/css/normalize.css
layouts/index.html

View file

@ -1,27 +1,39 @@
{{ define "main" }}
{{ $headless := .Site.GetPage "/homepage" }}
{{ $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({{ . }})"
<!--BPGTBPGT30EPGTEPGT--
>
>
<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 }}
{{ 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>
<a class="btn site-menu" data-title-anchor="{{ anchorize .Title }}"
>{{ .Title }}</a
>
{{ end }}
<i id='header-arrow' class="fa fa-angle-down"></i>
<i id="header-arrow" class="fa fa-angle-down"></i>
</div>
</div>
</header>
<main class="content" role="main">
<div class='fixed-nav'>
</div>
<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{{ else }}{{ if eq (add $index_val 1) (len $sections) }}last{{ end }}{{ end }}'>
<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 }}"
>
<header class="post-header">
<h2 class="post-title">{{ .Title }}</h2>
</header>
@ -29,7 +41,7 @@
{{ .Content }}
</section>
</article>
<div class='post-after'></div>
<div class="post-after"></div>
</div>
{{ end }}
</main>

6
package-lock.json generated
View file

@ -11,9 +11,9 @@
"dev": true
},
"prettier-plugin-go-template": {
"version": "0.0.10",
"resolved": "https://registry.npmjs.org/prettier-plugin-go-template/-/prettier-plugin-go-template-0.0.10.tgz",
"integrity": "sha512-TaHPqiMK/zfk+YhvKRf/1WZDgQ6ffnlxJZX5rwphqfxBOVEezZQtYistTB348MKrKnnwKpyXZWpMRo0/KCVB+A==",
"version": "0.0.11-beta.3",
"resolved": "https://registry.npmjs.org/prettier-plugin-go-template/-/prettier-plugin-go-template-0.0.11-beta.3.tgz",
"integrity": "sha512-/w+fLMvA3Ago10CRNtFe9V9DQekcfo+tB08U+3HF6FcMBnuLxHwVl04KGHhNqFUF017pTfua2Aq9cHGkT+QoFA==",
"dev": true
}
}

View file

@ -24,6 +24,6 @@
"homepage": "https://github.com/janraasch/hugo-scroll#readme",
"devDependencies": {
"prettier": "^2.1.1",
"prettier-plugin-go-template": "0.0.10"
"prettier-plugin-go-template": "0.0.11-beta.3"
}
}