checkpoint
This commit is contained in:
+42
-15
@@ -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"]">‹</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"]">❚❚</button>
|
||||
<button type="button" class="slide-next" aria-label="@StringValues["Next"]">›</button>
|
||||
</div>
|
||||
}
|
||||
</section>
|
||||
|
||||
@section Scripts {
|
||||
<script src="~/scripts/slideshow.js" asp-append-version="true"></script>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user