1
0
This repository has been archived on 2026-04-22. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
my-old-website/MyWebsite/MyWebsite/Views/Gallery/Details.cshtml
T
Michael Gordeev 4c3b1bf5da Added link shortener
Fixed text selection
2020-06-20 12:13:11 +03:00

52 lines
1.2 KiB
Plaintext

@model ArtworkViewModel
@{
ViewData["Title"] = Model.Current?.Title;
}
<header>
@if (Model.Previous != null)
{
@:&#xE760;
<a asp-action="Details" asp-route-id="@Model.Previous">@Localizer["Previous"]</a>
@:|
}
&#xE8B9; <a asp-action="Index" asp-controller="Gallery">@Localizer["All artworks"]</a>
@if (Model.Next != null)
{
@:| &#xE761;
<a asp-action="Details" asp-route-id="@Model.Next">@Localizer["Next"]</a>
}
</header>
<article class="image-overview-block">
<img src="~/images/Gallery/@Model.Current?.FileName" onclick="ToggleImageSize();" />
<div allow-select>
<h1>@Model.Current?.Title</h1>
<span>@Localizer["Creation date"]: @Model.Current?.CreationDate.ToShortDateString()</span>
<p>
@Html.Raw(Model.Current?.Description?.Replace("\n", "<br />"))
</p>
</div>
</article>
@section Imports
{
<link rel="stylesheet" type="text/css" href="~/css/Gallery.css" />
<script type="text/javascript">
function ToggleImageSize()
{
var image = document.querySelector("img");
if (image.style.cursor == "zoom-out")
image.style = "";
else
{
image.style.maxHeight = "none";
image.style.maxWidth = "none";
image.style.cursor = "zoom-out";
}
}
</script>
}