Refactoring 1
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
|
||||
@{
|
||||
ViewData["Title"] = Model.Title;
|
||||
Image image = Model;
|
||||
}
|
||||
|
||||
<header>
|
||||
<p> <a asp-action="Index" asp-controller="Gallery">Back to gallery</a></p>
|
||||
</header>
|
||||
|
||||
<article class="image-overview-block">
|
||||
<img src="~/images/Gallery/@image.FileName" onclick="ToggleImageSize();" id="image" />
|
||||
|
||||
<div>
|
||||
<h1>@image.Title</h1>
|
||||
<span>Creation date: @image.CreationDate.ToShortDateString()</span>
|
||||
<p>
|
||||
@foreach(string line in image.Description.Split("\n"))
|
||||
{
|
||||
@line<br />
|
||||
}
|
||||
</p>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="~/css/Gallery.css" />
|
||||
@@ -0,0 +1,17 @@
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "My artworks";
|
||||
}
|
||||
|
||||
<header>
|
||||
<h1>My arts</h1>
|
||||
</header>
|
||||
|
||||
<article class="info-block gallery">
|
||||
@foreach (Image image in Model)
|
||||
{
|
||||
<a asp-action="Details" asp-route-id="@image.FileName"><img title="@image.Title" src="~/images/Gallery/@image.FileName"/></a>
|
||||
}
|
||||
</article>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="~/css/Gallery.css" />
|
||||
Reference in New Issue
Block a user