Rework banner

Make banner a headless leaf bundle
This commit is contained in:
Jens M. Sauer 2024-07-23 22:42:26 +02:00
parent 6db6178928
commit 40a6c29e5b
5 changed files with 35 additions and 13 deletions

BIN
content/banner/banner.jpeg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 274 KiB

14
content/banner/index.md Normal file
View File

@ -0,0 +1,14 @@
---
build:
list: never
publishResources: false
render: never
title: Banner
params:
subtitle: Ein kleines bisschen italienisches Flair für Ihre Veranstalung in und um Oldenburg.
style: style2 orient-left content-align-left image-position-center fullscreen onload-image-fade-in onload-content-fade-right
button:
label: Los gehts
link: ape
---
Buchen Sie uns für Ihre Hochzeit, Empfang, Party oder als kleine Überraschung.

View File

@ -1,12 +0,0 @@
####################### Banner #########################
style: "style1 orient-left content-align-left image-position-right fullscreen onload-image-fade-in onload-content-fade-right"
title : "Bar Filipo"
subtitle: |
Ein kleines bisschen italienisches Flair für Ihre Veranstalung in und um Oldenburg.
content : |
Buchen Sie uns für Ihre Hochzeit, Empfang, Party oder als kleine Überraschung.
button:
label : "Los gehts"
link : "#first"
image : "images/federico-burgalassi-l--3rQeYvHs-unsplash.jpg"

View File

@ -1,6 +1,6 @@
{{ define "main" }} {{ define "main" }}
{{ partial "banner" site.Data.banner }} {{ partial "banner-headless" . }}
{{ partial "spotlight-headless" . }} {{ partial "spotlight-headless" . }}
{{ partial "gallery" site.Data.gallery }} {{ partial "gallery" site.Data.gallery }}
{{ partial "items" site.Data.items }} {{ partial "items" site.Data.items }}

View File

@ -0,0 +1,20 @@
{{ with .Site.GetPage "/banner" }}
{{ $image := resources.Get "logo/Logo_BarFilipo_4C_pos.svg" }}
<section class="banner {{ .Params.style }}">
<div class="content">
<h1><img src="{{ $image.RelPermalink }}" width="400" height="400" alt="{{ .Site.Title }}"></h1>
<p class="major">{{ .Params.subtitle }}</p>
<p>{{ .Content }}</p>
{{ with .Params.button }}
<ul class="actions stacked">
<li><a href="#{{ .link }}" class="button primary large wide smooth-scroll-middle">{{ .label }}</a></li>
</ul>
{{ end }}
</div>
{{ with .Resources.GetMatch "banner.*" }}
<div class="image">
<img src="{{ .RelPermalink }}" alt="banner" />
</div>
{{ end }}
</section>
{{ end }}