homepage revamp

This commit is contained in:
2023-02-01 20:24:20 +01:00
parent ddf93994f1
commit e22127510d
10 changed files with 71 additions and 33 deletions

View File

@ -9,7 +9,7 @@
{{ range $paginator.Pages }}
<div class="col-sm-6 mb-5">
<article
class="card rounded-0 border-bottom border-primary border-top-0 border-left-0 border-right-0 hover-shadow">
class="card rounded-0 border-primary hover-shadow">
<img class="card-img-top rounded-0" src="{{ .Params.Image | relURL }}" alt="{{ .Title }}">
<div class="card-body">
<ul class="list-inline mb-3">

View File

@ -1,4 +1,4 @@
<article class="card rounded-0 border-bottom border-primary border-top-0 border-left-0 border-right-0 hover-shadow">
<article class="card rounded-0 border-primary hover-shadow">
<img class="card-img-top rounded-0" src="{{ .Params.Image | relURL }}" alt="{{ .Title }}">
<div class="card-body">
<ul class="list-inline mb-3">

View File

@ -14,7 +14,7 @@
<h2 class="text-white">{{ $data.homepage.slider.title | markdownify }}</h2>
<p class="text-muted mb-4" data-animation-out="fadeOut{{.animation_out | title }}" data-delay-out="5" data-duration-in=".3" data-animation-in="fadeIn{{.animation_in | title }}" data-delay-in="0">{{ .content | markdownify }}</p>
{{ if .button.enable }}
<a href="{{ .button.link | absLangURL }}" class="btn btn-primary" data-animation-out="fadeOut{{.animation_out | title }}" data-delay-out="5" data-duration-in=".3" data-animation-in="fadeIn{{.animation_in | title }}" data-delay-in=".7">{{ .button.label }}</a>
<a href="{{ .button.link | absLangURL }}" class="btn btn-primary" data-animation-out="fadeOut{{.animation_out | title }}" data-delay-out="5" data-duration-in=".3" data-animation-in="fadeIn{{.animation_in | title }}" data-delay-in="0">{{ .button.label }}</a>
{{ end }}
</div>
</div>
@ -29,7 +29,6 @@
.hero-default {
display: none;
}
</style>
<section class="hero-section overlay bg-cover" style="background-image: url({{ $data.homepage.slider.bg_image | absURL }});">
<div class="container">
@ -53,8 +52,8 @@
</noscript>
{{ end }}
{{ if $data.header_logos.enable }}
{{ with $data.header_logos }}
{{ if $data.homepage.header_logos.enable }}
{{ with $data.homepage.header_logos }}
<section class="bg-white">
<div class="container">
<div class="row align-items-center">
@ -79,7 +78,7 @@
<section class="section-sm">
<div class="container">
<div class="row align-items-center">
<div class="col-md-9 order-2 order-md-1">
<div class="col-md-10 order-2 order-md-1">
<h3 class="section-title">{{ .title | markdownify }}</h3>
<div class="content">
{{ .content | markdownify }}
@ -91,7 +90,7 @@
{{ end }}
</div>
{{ with .image }}
<div class="col-md-3 col-6 order-1 order-md-2 mb-md-0 mx-auto">
<div class="col-md-2 col-6 order-1 order-md-2 mb-md-0 mx-auto">
<img class="img-fluid w-100" src="{{ . | absURL }}">
</div>
{{ end }}
@ -123,12 +122,12 @@
{{ if $data.homepage.success_banner.enable }}
{{ with $data.homepage.success_banner }}
<section class="section bg-cover" data-background="{{ .image | absURL }}" id="success">
<div class="container-fluid">
<div class="container">
<div class="row no-gutters">
<div class="col-xl-8 col-lg-7">
<div class="col-12">
<div class="row feature-blocks bg-white justify-content-between">
{{ range .feature_item }}
<div class="col-sm-6 col-xl-5 mb-xl-5 mb-lg-3 mb-4 text-sm-left">
<div class="col-xl-5 mb-xl-5 mb-4 text-sm-left">
{{ with .image }}
<img src="{{ . }}" class="mb-xl-4 mb-lg-3 mb-4 feature-icon"></img>
{{ end }}
@ -165,7 +164,7 @@
</div>
<div class="row justify-content-center">
{{ range first 6 (where .Site.RegularPages "Type" "ganztagsangebote" | shuffle)}}
<div class="col-lg-4 col-sm-6 mb-5">
<div class="col-lg-4 col-sm-6">
{{ .Render "ganztagsangebote" }}
</div>
{{ end }}

View File

@ -93,11 +93,13 @@
}
</style>
</noscript>
{{ $top_banner := (index .Site.Data .Site.Language.Lang).homepage.top_banner }}
</header>
{{ $top_banner := (index .Site.Data .Site.Language.Lang).homepage.top_banner }}
{{ if and $top_banner.enable }}
{{ if or (not $top_banner.temporarily.enable) (and $top_banner.temporarily.enable (and (le ($top_banner.temporarily.start_date | time.AsTime).Unix now.Unix ) (ge ($top_banner.temporarily.end_date | time.AsTime).Unix now.Unix))) }}
{{ with $top_banner }}
<div class="p-3 top-banner" style="background:{{ .color }}">
<div id="top-banner" class="p-3 top-banner" style="background:{{ .color }}">
<div class="container">
<div class="no-gutters align-items-center">
<div style="color:{{ .font_color }}"><b><i class="{{ .icon }}"></i> {{ .text | markdownify }}</b></div>
@ -107,7 +109,6 @@
{{ end }}
{{ end }}
{{ end }}
</header>
{{ if .Params.Gallery }}