2024-11-16 14:57:43 +00:00
|
|
|
{{- $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 -}}
|
2024-11-16 14:33:45 +00:00
|
|
|
<div class="dots">
|
2024-11-16 14:57:43 +00:00
|
|
|
{{- $count := (len $images) -}}
|
|
|
|
{{- $first := true -}}
|
|
|
|
{{- range (seq 0 (sub $count 1)) }}
|
|
|
|
<div data-index="{{ . }}" class="dot {{ if $first }}active{{ end }}"></div>
|
|
|
|
{{ $first = false }}
|
|
|
|
{{- end }}
|
2024-11-16 14:33:45 +00:00
|
|
|
</div>
|
2024-11-16 14:57:43 +00:00
|
|
|
<script>
|
|
|
|
const numImages = {{ $count }};
|
|
|
|
</script>
|
|
|
|
<script defer src="{{ relURL "js/slider.js" }}"></script>
|