Add an entry for "Notes from Small Planets"
[books.alexwlchan.net] / templates / _review_entry.html
1 {% set r = (tint_colors[review_entry.book.cover_image][0] * 255) | int %}
2 {% set g = (tint_colors[review_entry.book.cover_image][1] * 255) | int %}
3 {% set b = (tint_colors[review_entry.book.cover_image][2] * 255) | int %}
4
5 <style>
6   {% include "_review_style.css" %}
7 </style>
8
9 <div class="review_preview {% if review_entry.review.rating == 5 and not is_index %}review_fave{% endif %}"
10 id="review_preview_{{ r }}_{{ g }}_{{ b }}">
11   <a href="/{{ review_entry.out_path() }}">
12     <div class="book_thumbnail">
13       {% set book = review_entry.book %}
14       {% include "_book_cover.html" %}
15     </div>
16
17     <div class="book_metadata">
18       <p class="title">{{ review_entry.book.title | smartypants | safe }}</p>
19       <p>
20         <small>
21           by {{ review_entry.book.author }}
22           {%- if review_entry.book.publication_year %}
23             ({{ review_entry.book.publication_year}})
24           {%- endif -%}
25             <br/>
26           {% if review_entry.review.date_read %}
27           read {{ review_entry.review.date_read | render_date }}
28             <br/>
29           {% endif %}
30
31           <span class="star_rating">
32           {% if review_entry.review.rating %}
33             {% for _ in range(review_entry.review.rating) -%}
34             ★
35             {%- endfor -%}
36             {%- for _ in range(5 - review_entry.review.rating) -%}
37             ☆
38             {%- endfor %}
39           {% endif %}
40           </span>
41         </small>
42         {% if review_entry.review.did_not_finish %}
43           (did not finish)
44         {% endif %}
45       </p>
46     </div>
47   </a>
48 </div>