checkpoint

This commit is contained in:
2026-10-28 13:23:35 +02:00
parent cce5e348b3
commit 33dad8ca5a
26 changed files with 1949 additions and 49 deletions
+42 -15
View File
@@ -1,21 +1,48 @@
@page
@model StatiKosev.Pages.Gallery
@{
Layout = null;
ViewData["Title"] = StringValues["Gallery"];
}
@section Head {
<link rel="stylesheet" href="~/styles/gallery.css" asp-append-version="true"/>
}
<!DOCTYPE html>
<section class="slideshow" aria-roledescription="carousel" aria-label="@StringValues["Gallery"]">
<h1>@StringValues["Gallery"]</h1>
<html>
<head>
<title>
@StringValues["Gallery"]
</title>
</head>
<body>
<div>
</div>
</body>
</html>
@if (Model.Images.Count == 0)
{
<p>@StringValues["GalleryEmpty"]</p>
}
else
{
@* without JavaScript this is a swipeable scroll-snap strip; slideshow.js adds the buttons and autoplay *@
<div class="slides" tabindex="0">
@for (var i = 0; i < Model.Images.Count; i++)
{
<figure class="slide" role="group" aria-roledescription="slide"
aria-label="@StringValues["SlideOf", i + 1, Model.Images.Count]">
<img src="@Model.Images[i]" alt="@StringValues["GoToSlide", i + 1]" asp-append-version="true"
loading="@(i == 0 ? "eager" : "lazy")"/>
</figure>
}
</div>
<div class="slideshow-controls" hidden>
<button type="button" class="slide-prev" aria-label="@StringValues["Previous"]">&#8249;</button>
<div class="slide-dots">
@for (var i = 0; i < Model.Images.Count; i++)
{
<button type="button" data-index="@i" aria-label="@StringValues["GoToSlide", i + 1]"></button>
}
</div>
<button type="button" class="slide-toggle" data-pause="@StringValues["Pause"]" data-play="@StringValues["Play"]"
aria-label="@StringValues["Pause"]">&#10074;&#10074;</button>
<button type="button" class="slide-next" aria-label="@StringValues["Next"]">&#8250;</button>
</div>
}
</section>
@section Scripts {
<script src="~/scripts/slideshow.js" asp-append-version="true"></script>
}