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">
|
2020-09-16 02:27:47 +00:00
|
|
|
@foreach (var item in Model.Documents.Take(25)) {
|
2020-09-16 01:43:55 +00:00
|
|
|
<div class="document">
|
|
|
|
<div class="document-column left" style="background-image:url('/img/placeholder.png');"></div>
|
|
|
|
<div class="document-column centre">
|
2020-09-17 14:14:50 +00:00
|
|
|
<div class="title"><a asp-page="./Documents/View" asp-route-id="@item.ID">@Html.DisplayFor(modelItem => item.Title)</a></div>
|
2020-09-17 13:47:13 +00:00
|
|
|
<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>
|
2020-09-18 05:35:20 +00:00
|
|
|
@{string hash = item.Hash?.Substring(0, 8);}
|
2020-09-17 13:47:13 +00:00
|
|
|
<div class="metadata">
|
|
|
|
@Html.DisplayFor(modelItem => item.Filename) |
|
|
|
|
<span title="@item.Size bytes">@Html.DisplayFor(modelItem => item.Size)</span> |
|
|
|
|
<span title="SHA256 digest: @Html.DisplayFor(modelItem => item.Hash)">@hash...</span>
|
|
|
|
</div>
|
|
|
|
</div> @* end of document-column centre *@
|
2020-09-16 01:43:55 +00:00
|
|
|
<div class="document-column right">
|
|
|
|
@* TODO: replace these with font awesome or something *@
|
|
|
|
<div class="vertical-buttons">
|
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-17 13:37:11 +00:00
|
|
|
<a asp-page="./Documents/Edit" asp-route-id="@item.ID" class="button simple">Edit</a>
|
2020-09-16 01:43:55 +00:00
|
|
|
<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>
|
|
|
|
}
|
2020-09-16 02:27:47 +00:00
|
|
|
|
|
|
|
<div class="centred subtle">Displaying @Model.Documents.Take(25).Count() of @Model.Documents.Count() results</div>
|
2020-09-16 01:43:55 +00:00
|
|
|
</div>
|