upd: carousel

This commit is contained in:
Edoardo Rosa 2023-12-02 22:47:36 +01:00
parent 4e9ba961df
commit 9bd061323a
No known key found for this signature in database
GPG key ID: 2AF1937D15CB28F6

View file

@ -39,10 +39,58 @@
</div> </div>
<div class="relative flex flex-col grow"> <div class="relative flex flex-col grow">
<main id="main-content" class="grow video-margin"> <main id="main-content" class="grow video-margin">
{{ block "main" . }}{{ end }} {{ if .IsHome }}
{{ if and (.Site.Params.footer.showScrollToTop | default true) (gt .WordCount 1) }} <h2 class="mt-8 text-2xl font-extrabold mb-10">Sponsors</h1>
{{- partial "scroll-to-top.html" . -}} {{ $images := .Site.Params.sponsors }}
{{ end }} <link rel="stylesheet" href="css/infinite.css">
<script src="js/main.js"></script>
<div class="marquee-wrapper" style="user-select: none;">
<div class="marquee-content scrollingX">
{{ $num := 0 }}
{{ range $images }}
<div class="card-testimonial flex items-center">
<article>
<picture>
{{ if .site }}
<a href="{{ .site }}" target="_blank"><img src="{{ .img }}" alt="{{ .img }}"></a>
{{ else }}
<img src="{{ .img }}" alt="{{ .img }}">
{{ end }}
</picture>
{{ if .name }}
<article class="short-description"><p class="text-center mt-1">{{ .name }}</p></article>
{{ end }}
</article>
</div>
{{ $num = add $num 1 }}
{{ end }}
{{ $num := 0 }}
{{ range $images }}
<div class="card-testimonial flex items-center">
<article>
<picture>
{{ if .site }}
<a href="{{ .site }}" target="_blank"><img src="{{ .img }}" alt="{{ .img }}"></a>
{{ else }}
<img src="{{ .img }}" alt="{{ .img }}">
{{ end }}
</picture>
{{ if .name }}
<article class="short-description">
<p class="text-center mt-1">{{ .name }}</p>
</article>
{{ end }}
</article>
</div>
{{ $num = add $num 1 }}
{{ end }}
</div>
</div>
{{ end }}
{{ block "main" . }}{{ end }}
{{ if and (.Site.Params.footer.showScrollToTop | default true) (gt .WordCount 1) }}
{{- partial "scroll-to-top.html" . -}}
{{ end }}
</main> </main>
{{- partial "footer.html" . -}} {{- partial "footer.html" . -}}
{{ if .Site.Params.enableSearch | default false }} {{ if .Site.Params.enableSearch | default false }}