4c3b1bf5da
Fixed text selection
52 lines
1.2 KiB
Plaintext
52 lines
1.2 KiB
Plaintext
@model ArtworkViewModel
|
|
@{
|
|
ViewData["Title"] = Model.Current?.Title;
|
|
}
|
|
|
|
<header>
|
|
@if (Model.Previous != null)
|
|
{
|
|
@:
|
|
<a asp-action="Details" asp-route-id="@Model.Previous">@Localizer["Previous"]</a>
|
|
@:|
|
|
}
|
|
 <a asp-action="Index" asp-controller="Gallery">@Localizer["All artworks"]</a>
|
|
@if (Model.Next != null)
|
|
{
|
|
@:| 
|
|
<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>
|
|
} |