oliverbooth.dev/OliverBooth/Pages/Books.cshtml
Oliver Booth 6ec4103a3a
refactor: separate Markdig extensions from project
Also introduces .Common project to house common references and types
2024-05-05 02:18:20 +01:00

98 lines
3.2 KiB
Plaintext

@page
@using OliverBooth.Common.Data.Web
@model OliverBooth.Pages.Books
@{
ViewData["Title"] = "Reading List";
}
<main class="container">
<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 colspan="2" 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">
</td>
<td>@book.Title.Trim()</td>
<td>@book.Author.Trim()</td>
<td style="font-family: monospace">
@book.Isbn.Trim()<br><img src="@book.GetBarcode()" alt="@book.Isbn">
</td>
</tr>
}
</tbody>
</table>
<p class="lead">Plan to Read</p>
<table class="table reading-list">
<thead>
<tr>
<th colspan="2" 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">
</td>
<td>@book.Title.Trim()</td>
<td>@book.Author.Trim()</td>
<td style="font-family: monospace">
@book.Isbn.Trim()<br><img src="@book.GetBarcode()" alt="@book.Isbn">
</td>
</tr>
}
</tbody>
</table>
<p class="lead">Read</p>
<table class="table reading-list">
<thead>
<tr>
<th colspan="2" 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">
</td>
<td>@book.Title.Trim()</td>
<td>@book.Author.Trim()</td>
<td style="font-family: monospace">
@book.Isbn.Trim()<br><img src="@book.GetBarcode()" alt="@book.Isbn">
</td>
</tr>
}
</tbody>
</table>
</main>