Add an entry for "Cosmogramma"
[books.alexwlchan.net] / templates / _review_entry.html
1 {% set (r, g, b) = review_entry.book.cover.tint_color | from_hex %}
2
3 <style>
4   {% include "_review_style.css" %}
5 </style>
6
7 <div class="review_preview {% if review_entry.review.rating == 5 and not is_index %}review_fave{% endif %}"
8 id="review_preview_{{ review_entry.book.slug }}">
9   <a href="/{{ review_entry.out_path() }}">
10     <div class="book_thumbnail">
11       {% set book = review_entry.book %}
12       {% include "_book_cover.html" %}
13     </div>
14
15     <div class="book_metadata">
16       <p class="title">
17         {{ review_entry.book.title | smartypants | safe }}
18         {% if review_entry.book.series %}
19         <span class="book-series">({{ review_entry.book.series | smartypants | safe }})</span>
20         {% endif %}
21       </p>
22       <p>
23         <small>
24           {% if review_entry.book.author %}
25             by {{ review_entry.book.author }}
26             {%- if review_entry.book.editor -%}
27             ,
28             {% endif %}
29           {% endif %}
30
31           {% if review_entry.book.editor %}
32           edited by {{ review_entry.book.editor }}
33           {% endif %}
34
35           {%- if review_entry.book.publication_year %}
36             ({{ review_entry.book.publication_year}})
37           {%- endif -%}
38             <br/>
39           {% if review_entry.review.date_read %}
40           read {{ review_entry.review.date_read | render_date }}
41             <br/>
42           {% endif %}
43
44           {% if review_entry.review.rating and not review_entry.review.did_not_finish %}
45             <span class="star_rating">
46
47             {% for _ in range(review_entry.review.rating) -%}
48             ★
49             {%- endfor -%}
50             {%- for _ in range(5 - review_entry.review.rating) -%}
51             ☆
52             {%- endfor %}
53             </span>
54           {% endif %}
55
56           {% if review_entry.review.did_not_finish %}
57           (did not finish)
58           {% endif %}
59         </small>
60       </p>
61     </div>
62   </a>
63 </div>