-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbookshelf.html
48 lines (45 loc) · 1.46 KB
/
bookshelf.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
---
layout: page
css:
- "/assets/css/landing-page.css"
- "/assets/css/movies.css"
---
{% include about-nav.html bookshelf='true' text='Bookshelf' %} {% include
rating-details.html %}
<article class="covers-list__container">
{% assign items_by_year = site.data.books | group_by_exp: "book", "book.date |
date: '%Y'" %} {% for year in items_by_year %}
<div class="covers-list__year-container">
<header class="covers-list__year-header">
<h2>{{ year.name }}</h2>
{{ year.size }} books
</header>
<div class="covers-list__year-items">
{%- for book in year.items -%}
<div class="covers-list__item">
<div class="covers-list__cover">
{% picture cover "{{ book.thumbnail }}" --img width="180" height="270"
%}
</div>
<div class="covers-list__info">
<h3 class="covers-list__title">{{ book.title }} ({{ book.year }})</h3>
<p class="covers-list__subtitle">{{ book.subtitle }}</p>
<p>{{ book.author }}</p>
{% if book.rating %} {% assign rating = book.rating | parse_rating %}
{% if book.review %}
<details>
<summary>{{ rating }}</summary>
<div class="covers-list__notes">
<p>{{ book.review }}</p>
</div>
</details>
{% else %}
<p>{{ rating }}</p>
{% endif %} {% endif %}
</div>
</div>
{%- endfor -%}
</div>
{%- endfor -%}
</div>
</article>