oliverbooth.dev/OliverBooth/Pages/Books.cshtml

95 lines
2.8 KiB
Plaintext
Raw Normal View History

2023-12-14 16:03:24 +00:00
@page
2023-12-14 22:09:17 +00:00
@using NetBarcode
2023-12-14 16:03:24 +00:00
@using OliverBooth.Data.Web
2023-12-14 22:09:17 +00:00
@using SixLabors.ImageSharp
@using SixLabors.ImageSharp.Formats.Png
@using SixLabors.ImageSharp.Processing
@using Type = NetBarcode.Type
2023-12-14 16:03:24 +00:00
@model OliverBooth.Pages.Books
@{
ViewData["Title"] = "Reading List";
}
<h1 class="display-4">Reading List</h1>
<p>
This is a list of the books I've read, I'm currently reading, or that I plan to read. Not every book is listed here,
but I will update this list as I try to remember what it is I've read in the past.
</p>
<p>
This list is also available on <a href="https://www.goodreads.com/review/list/145592619">Goodreads</a>.
</p>
<p class="lead">Currently Reading</p>
<table class="table reading-list">
<thead>
<tr>
<th style="width: 50%">Title</th>
<th style="width: 25%">Author</th>
<th style="width: 25%">ISBN</th>
</tr>
</thead>
<tbody>
@foreach (IBook book in Model.CurrentlyReading.OrderBy(b => b.Author).ThenBy(b => b.Title))
{
<tr>
<td>
<img class="book-cover" src="https://cdn.olivr.me/img/books/@(book.Isbn.Trim()).jpg" alt="Book Cover">
@book.Title.Trim()
</td>
<td>@book.Author.Trim()</td>
2023-12-14 22:09:17 +00:00
<td style="font-family: monospace">@book.Isbn.Trim()<br><img src="@book.GetBarcode()" alt="@book.Isbn"></td>
2023-12-14 16:03:24 +00:00
</tr>
}
</tbody>
</table>
<p class="lead">Plan to Read</p>
<table class="table reading-list">
<thead>
<tr>
<th style="width: 50%">Title</th>
<th style="width: 25%">Author</th>
<th style="width: 25%">ISBN</th>
</tr>
</thead>
<tbody>
@foreach (IBook book in Model.PlanToRead.OrderBy(b => b.Author).ThenBy(b => b.Title))
{
<tr>
<td>
<img class="book-cover" src="https://cdn.olivr.me/img/books/@(book.Isbn.Trim()).jpg" alt="Book Cover">
@book.Title.Trim()
</td>
<td>@book.Author.Trim()</td>
2023-12-14 22:09:17 +00:00
<td style="font-family: monospace">@book.Isbn.Trim()<br><img src="@book.GetBarcode()" alt="@book.Isbn"></td>
2023-12-14 16:03:24 +00:00
</tr>
}
</tbody>
</table>
<p class="lead">Read</p>
<table class="table reading-list">
<thead>
<tr>
<th style="width: 50%">Title</th>
<th style="width: 25%">Author</th>
<th style="width: 25%">ISBN</th>
</tr>
</thead>
<tbody>
@foreach (IBook book in Model.Read.OrderBy(b => b.Author).ThenBy(b => b.Title))
{
<tr>
<td>
<img class="book-cover" src="https://cdn.olivr.me/img/books/@(book.Isbn.Trim()).jpg" alt="Book Cover">
@book.Title.Trim()
</td>
<td>@book.Author.Trim()</td>
2023-12-14 22:09:17 +00:00
<td style="font-family: monospace">@book.Isbn.Trim()<br><img src="@book.GetBarcode()" alt="@book.Isbn"></td>
2023-12-14 16:03:24 +00:00
</tr>
}
</tbody>
</table>