Link to a tweet about "Unicorn"
[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_{{ review_entry.book.slug }}">
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           {% if review_entry.book.author %}
22             by {{ review_entry.book.author }}
23             {%- if review_entry.book.editor -%}
24             ,
25             {% endif %}
26           {% endif %}
27
28           {% if review_entry.book.editor %}
29           edited by {{ review_entry.book.editor }}
30           {% endif %}
31
32           {%- if review_entry.book.publication_year %}
33             ({{ review_entry.book.publication_year}})
34           {%- endif -%}
35             <br/>
36           {% if review_entry.review.date_read %}
37           read {{ review_entry.review.date_read | render_date }}
38             <br/>
39           {% endif %}
40
41           {% if review_entry.review.rating and not review_entry.review.did_not_finish %}
42             <span class="star_rating">
43
44             {% for _ in range(review_entry.review.rating) -%}
45             ★
46             {%- endfor -%}
47             {%- for _ in range(5 - review_entry.review.rating) -%}
48             ☆
49             {%- endfor %}
50             </span>
51           {% endif %}
52
53           {% if review_entry.review.did_not_finish %}
54           (did not finish)
55           {% endif %}
56         </small>
57       </p>
58     </div>
59   </a>
60 </div>