Merge branch 'enh/banner-dynamic' into develop

This commit is contained in:
Christian Wolf 2024-11-16 16:02:50 +01:00
commit f3c3af54af
No known key found for this signature in database
GPG Key ID: AB6DF7467D2738F2
25 changed files with 24 additions and 17 deletions

BIN
assets/banner/2010er.jpeg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 888 KiB

BIN
assets/banner/80s.jpeg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 759 KiB

BIN
assets/banner/90s.jpeg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 622 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 780 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 814 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 776 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 753 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1021 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 878 KiB

View File

Before

Width:  |  Height:  |  Size: 140 KiB

After

Width:  |  Height:  |  Size: 140 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 892 KiB

BIN
assets/banner/Renote.jpeg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 997 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 618 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 818 KiB

View File

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 62 KiB

View File

@ -0,0 +1,22 @@
{{- $images := resources.Match "banner/*" -}}
{{- $first := true -}}
{{- range $images }}
{{- $img := .Fit "1220x340 webp" -}}
{{ if $first }}
<img src="{{ $img.RelPermalink }}" class="placeholder">
{{ $first = false }}
{{ end }}
<img src="{{ $img.RelPermalink }}" class="hidden slider-img">
{{ end -}}
<div class="dots">
{{- $count := (len $images) -}}
{{- $first := true -}}
{{- range (seq 0 (sub $count 1)) }}
<div data-index="{{ . }}" class="dot {{ if $first }}active{{ end }}"></div>
{{ $first = false }}
{{- end }}
</div>
<script>
const numImages = {{ $count }};
</script>
<script defer src="{{ relURL "js/slider.js" }}"></script>

View File

@ -19,7 +19,6 @@
<title>{{ $title }}</title>
<link rel="canonical" href="{{ .Permalink }}" />
<script defer src="{{ relURL "js/jquery-3.6.3.min.js" }}"></script>
<script defer src="{{ relURL "js/slider.js" }}"></script>
<script defer src="{{ relURL "js/gallery.js" }}"></script>
<script defer src="{{ (resources.Get "js/mails.js" ).RelPermalink }}"></script>
</head>

View File

@ -8,21 +8,7 @@
</a>
</div>
<div class="slider">
<img src="{{ relURL "img/banner/Banner-RENOTE.jpg" }}" class="placeholder">
<img src="{{ relURL "img/banner/Banner-RENOTE.jpg" }}" class="hidden slider-img">
<img src="{{ relURL "img/banner/Banner-Show2016.jpg" }}" class="hidden slider-img">
<img src="{{ relURL "img/banner/Banner2019.jpg" }}" class="hidden slider-img">
<img src="{{ relURL "img/banner/Fotobanner2.jpg" }}" class="hidden slider-img">
<img src="{{ relURL "img/banner/Paare_2019.jpg" }}" class="hidden slider-img">
<img src="{{ relURL "img/banner/slider-turnier.jpg" }}" class="hidden slider-img">
<div class="dots">
<div data-index="0" class="dot active"></div>
<div data-index="1" class="dot"></div>
<div data-index="2" class="dot"></div>
<div data-index="3" class="dot"></div>
<div data-index="4" class="dot"></div>
<div data-index="5" class="dot"></div>
</div>
{{ partial "page/banner-images.html" . }}
</div>
<div id="nav-border" class="container nav">
<nav id="nav" class="nav justify-content-center">

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

View File

@ -1,6 +1,6 @@
$(function () {
var index = 0
const maxIndex = 5
const maxIndex = numImages - 1
const delay = 6000
const shuffeledIndices = []