Make banner section dynamic

This commit is contained in:
Patrick Neff 2019-02-26 00:08:58 +01:00
parent 379bc2ccf1
commit a8b2cc7f6a
2 changed files with 14 additions and 14 deletions

View File

@ -3,7 +3,6 @@ date = "2018-12-02T19:16:57+01:00"
draft = false draft = false
title = "Neff Stein-Design" title = "Neff Stein-Design"
campaign = "angebote-fruehjahr-2019"
galleries = ["gemeinschaftsgrab", "grabmal", "bauen-und-wohnen"] galleries = ["gemeinschaftsgrab", "grabmal", "bauen-und-wohnen"]
[menu] [menu]

View File

@ -1,15 +1,16 @@
{{- with .Params.campaign }} {{- $section := $.Site.GetPage "section" "aktionen" -}}
{{- $section := $.Site.GetPage "section" "aktionen" -}} {{ $page := "" }}
{{- $page := $section.GetPage . -}} {{- with $section.Pages }}
{{- with $page -}} {{- $page = index . 0 -}}
<section id="banner"> {{ end }}
<div class="container"> {{- with $page -}}
<div id="banner-container" class="padding"> <section id="banner">
<h1>{{ .Title }}</h1> <div class="container">
<p>{{ .Params.description }}</p> <div id="banner-container" class="padding">
<p><a href="{{ .Permalink }}" class="btn btn-primary">{{ i18n "more-info" }}</a></p> <h1>{{ .Title }}</h1>
</div> <p>{{ .Params.description }}</p>
<p><a href="{{ .Permalink }}" class="btn btn-primary">{{ i18n "more-info" }}</a></p>
</div> </div>
</section> </div>
{{- end }} </section>
{{- end }} {{- end }}