fix templates

This commit is contained in:
2025-08-27 00:26:41 +02:00
parent 83b3a23fe4
commit 6a54e21ed3
2 changed files with 12 additions and 6 deletions

View File

@@ -17,10 +17,16 @@
<hr/> <hr/>
<div id="carousel" class="carousel slide"> <div id="carousel" class="carousel slide">
<div class="carousel-inner"> <div class="carousel-inner">
{{ range .ScreenshotURLs }} {{ range $i, $url := .ScreenshotURLs }}
<div class="carousel-item"> {{ if not $i }}
<img src="{{ . }}" class="d-block w-100"> <div class="carousel-item active">
</div> <img src="{{ $url }}" class="d-block w-100">
</div>
{{ else }}
<div class="carousel-item">
<img src="{{ $url }}" class="d-block w-100">
</div>
{{ end }}
{{ end }} {{ end }}
</div> </div>
<button class="carousel-control-prev" type="button" data-bs-target="#carousel" data-bs-slide="prev"> <button class="carousel-control-prev" type="button" data-bs-target="#carousel" data-bs-slide="prev">

View File

@@ -15,9 +15,9 @@
<div style="width: 100%; height: 20rem; background-color: #f2f2f2; display: flex; justify-content: center; align-items: center;"> <div style="width: 100%; height: 20rem; background-color: #f2f2f2; display: flex; justify-content: center; align-items: center;">
<h1>DownloadHub</h1> <h1>DownloadHub</h1>
</div> </div>
<div class="container" style="margin-top: 1rem;"> <div class="container" style="margin-top: 1rem; display: flex">
{{ range . }} {{ range . }}
<div class="card" style="width: 18rem;"> <div class="card" style="width: 18rem; margin: 2rem">
{{ if .ScreenshotURLs }} {{ if .ScreenshotURLs }}
<img src="{{ index .ScreenshotURLs 0 }}" class="card-img-top"> <img src="{{ index .ScreenshotURLs 0 }}" class="card-img-top">
{{ end }} {{ end }}