feat: want to read page
This commit is contained in:
parent
2d674ebfb2
commit
f85aff112b
8 changed files with 36 additions and 6 deletions
|
@ -17,6 +17,7 @@ export default async function () {
|
|||
dateAdded: book?.['dateStarted'] || book?.['dateFinished'],
|
||||
status: book['status'],
|
||||
tags: book['tags'],
|
||||
categories: book['categories']?.length > 1 ? book['categories'].join(', ') : book['categories']?.[0],
|
||||
type: 'book',
|
||||
}
|
||||
})
|
||||
|
|
|
@ -143,10 +143,10 @@ hr {
|
|||
height: 1px;
|
||||
background-color: var(--gray-light);
|
||||
border: 0;
|
||||
}
|
||||
|
||||
hr.large-spacing {
|
||||
margin: var(--sizing-base) 0;
|
||||
&.large-spacing {
|
||||
margin: var(--sizing-base) 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* tables */
|
||||
|
|
|
@ -12,5 +12,5 @@ image: /assets/img/404.jpg
|
|||
</div>
|
||||
<hr class="large-spacing" />
|
||||
{% render "partials/tags.liquid", tags:collections.tagsSortedByCount, hasSpace:true %}
|
||||
{% render "partials/addon-links.liquid", posts:collections.posts, analytics:analytics, links:links %}
|
||||
{% render "partials/addon-links.liquid", posts:collections.posts, analytics:analytics, links:collections.links %}
|
||||
</div>
|
25
src/want-to-read.html
Normal file
25
src/want-to-read.html
Normal file
|
@ -0,0 +1,25 @@
|
|||
---
|
||||
title: Want to read • Books
|
||||
layout: default
|
||||
pagination:
|
||||
data: collections.booksToRead
|
||||
alias: books
|
||||
size: 30
|
||||
permalink: "/books/want-to-read/{{ pagination.pageNumber }}/index.html"
|
||||
---
|
||||
{% if pagination.pageNumber == 0 %}
|
||||
<h2 class="page-header">Want to read</h2>
|
||||
<p>These are books I want to read, sorted in alphabetical order. As one would expect, it will change as I navigate through and add to it.</p>
|
||||
<hr class="large-spacing" />
|
||||
{% endif %}
|
||||
<ul class="link-list reduced-spacing">
|
||||
{% for book in pagination.items %}
|
||||
<li>
|
||||
<a href="{{ book.url }}" title="{{ book.title | escape }}">
|
||||
<strong>{{ book.title }}</strong>
|
||||
</a>
|
||||
{% if book.authors %}by {{ book.authors }}{% endif %}{% if book.categories %} • <em>{{ book.categories }}</em>{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% render "partials/paginator.liquid", pagination:pagination %}
|
Reference in a new issue