313fa67deb50d19d26bad04db8faa293633f9ac7
[books.alexwlchan.net] / templates / _review_entry.html
1 <div class="review_preview {% if review_entry.review.rating == 5 %}review_fave{% endif %}">
2   <a href="/{{ review_entry.out_path() }}">
3     <div class="book_thumbnail">
4       {% set book = review_entry.book %}
5       {% include "_book_cover.html" %}
6     </div>
7
8     <div class="book_metadata">
9       <p class="title">{{ review_entry.book.title | smartypants | safe }}</p>
10       <p>
11         <small>
12           by {{ review_entry.book.author }}
13           {%- if review_entry.book.publication_year %}
14             ({{ review_entry.book.publication_year}})
15           {%- endif -%}
16             <br/>
17           {% if review_entry.review.date_read %}
18           read {{ review_entry.review.date_read | render_date }}
19             <br/>
20           {% endif %}
21           {% if review_entry.review.rating %}
22             {% for _ in range(review_entry.review.rating) %}
23             ★
24             {% endfor %}
25             {% for _ in range(5 - review_entry.review.rating) %}
26             ☆
27             {% endfor %}
28           {% endif %}
29           {% if review_entry.review.did_not_finish %}
30             (did not finish)
31           {% endif %}
32         </small>
33       </p>
34     </div>
35   </a>
36 </div>