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 public
static/font-awesome static/font-awesome
static/css/normalize.css static/css/normalize.css
layouts/index.html

View file

@ -1,36 +1,48 @@
{{ 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({{ . }})"
<!--BPGTBPGT30EPGTEPGT--
>
>
<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_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 }} {{ with .Params.header_subheadline }}
<a class='btn site-menu' data-title-anchor='{{ anchorize .Title }}'>{{ .Title }}</a> <h2 class="blog-description">{{ . }}</h2>{{ end }}
{{ end }}
<i id='header-arrow' class="fa fa-angle-down"></i>
</div> {{ range where $sections ".Params.header_menu" "eq" true }}
</div> <a class="btn site-menu" data-title-anchor="{{ anchorize .Title }}"
</header> >{{ .Title }}</a
<main class="content" role="main"> >
{{ end }}
<div class='fixed-nav'> <i id="header-arrow" class="fa fa-angle-down"></i>
</div>
</div> </div>
</header>
<main class="content" role="main">
<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
<header class="post-header"> id="{{ anchorize .Title }}"
<h2 class="post-title">{{ .Title }}</h2> class="post {{ if eq $index_val 0 }}first{{ else }}{{ if eq (add $index_val 1) (len $sections) }}last{{ end }}{{ end }}"
</header> >
<section class="post-content"> <header class="post-header">
{{ .Content }} <h2 class="post-title">{{ .Title }}</h2>
</section> </header>
</article> <section class="post-content">
<div class='post-after'></div> {{ .Content }}
</div> </section>
</article>
<div class="post-after"></div>
</div>
{{ end }} {{ end }}
</main> </main>
{{ end }} {{ end }}

6
package-lock.json generated
View file

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

View file

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