@model ArtworkViewModel
@{
	ViewData["Title"] = "My artworks";
}

<header>
	<h1>My arts</h1>
</header>

<article class="gallery">
	@if (Model.Images.Count > 0)
		foreach (ImageModel image in Model.Images)
		{
			<a asp-action="Details" asp-route-id="@image.FileName"><img title="@image.Title" src="~/images/Gallery/@(image.FileName.EndsWith(".svg", StringComparison.OrdinalIgnoreCase) ? image.FileName : $"Cache/{image.FileName}.jpg")" onerror="this.src = '/images/Gallery/@image.FileName'" /></a>
		}
	else
	{
		<p class="comment">// No content available</p>
	}
</article>

@section Imports
{
	<link rel="stylesheet" type="text/css" href="~/css/Gallery.css" />
}