Add custom header image

Add support for configuring a custom header image from a page's front
matter, and use a new one for foundation.
This commit is contained in:
2022-07-02 17:07:23 +02:00
parent 7faf3602fd
commit 4f1d03ba5f
11 changed files with 17 additions and 9 deletions

File diff suppressed because one or more lines are too long

View File

@@ -1,7 +1,15 @@
{{ define "main" }}
<div class="w-full h-32 bg-[url('/img/lagoon-close-02.jpg')]
bg-[center_top_30rem] bg-cover">
</div>
{{ if .Params.HeaderImage }}
<!-- <div class="w&#45;full h&#45;32 bg&#45;[center_bottom_23rem] bg&#45;cover" -->
<!-- style="background&#45;image: url(/img/{{ .Params.HeaderImage }})"> -->
<div class="w-full h-32 bg-[center] bg-cover"
style="background-image: url(/img/{{ .Params.HeaderImage }})">
</div>
{{ else }}
<div class="w-full h-32 bg-[url('/img/lagoon-close-02.jpg')]
bg-[center_top_30rem] bg-cover">
</div>
{{ end }}
<div class="max-w-5xl mx-auto -mt-12 py-8 px-8 text-left bg-white">
<header class="mb-8">
<h1 class="text-2xl font-bold">{{ .Title }}</h1>