Snootalogue/Pages/Index.cshtml

35 lines
1.3 KiB
Text
Raw Normal View History

2020-09-15 12:31:52 +00:00
@page
@model Snootalogue.Pages.IndexModel
2020-09-16 02:14:31 +00:00
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
2020-09-16 01:43:55 +00:00
@{
ViewData["Title"] = "Home";
}
2020-09-15 12:31:52 +00:00
2020-09-16 01:43:55 +00:00
@* <h1>Documents</h1> *@
<div class="documents">
@foreach (var item in Model.Documents) {
<div class="document">
<div class="document-column left" style="background-image:url('/img/placeholder.png');"></div>
<div class="document-column centre">
<div class="title">@Html.DisplayFor(modelItem => item.Title)</div>
<div class="authors">By @Html.DisplayFor(modelItem => item.Authors)</div>
<div class="category">Category: @Html.DisplayFor(modelItem => item.Category)</div>
<div class="tags">@Html.DisplayFor(modelItem => item.Tags)</div>
@{string hash = item.Hash.Substring(0, 8);}
<div class="metadata">@Html.DisplayFor(modelItem => item.Filename) | @Html.DisplayFor(modelItem => item.Size) | <span title="@Html.DisplayFor(modelItem => item.Hash)">@hash...</span></div>
</div>
<div class="document-column right">
@* TODO: replace these with font awesome or something *@
<div class="vertical-buttons">
<a href="#" class="button simple">View</a>
2020-09-16 02:14:31 +00:00
<a asp-page="./Documents/Details" asp-route-id="@item.ID" class="button simple">Details</a>
2020-09-16 01:43:55 +00:00
<a href="#" class="button simple">Edit</a>
<a href="#" class="button simple">Delete</a>
</div>
</div>
2020-09-15 12:31:52 +00:00
2020-09-16 01:43:55 +00:00
</div>
}
</div>