Render titles with smartypants
[books.alexwlchan.net] / templates / review.html
1 {% extends "base.html" %}
2
3 {% block content %}
4   {% if review_entry.book.cover_image %}
5     <div class="book-cover">
6       {% set book = review_entry.book %}
7       {% include "_book_cover.html" %}
8     </div>
9   {% endif %}
10
11   <h1>My review of <span class="book-title">{{ review_entry.book.title | smartypants | safe }}</span></h1>
12
13   <table class="book_metadata">
14     <tr>
15       <td>author{% if "and" in review_entry.book.author or ", " in review_entry.book.author %}s{% endif %}:</td>
16       <th>{{ review_entry.book.author }}
17         {%- if review_entry.book.publication_year %}
18           ({{ review_entry.book.publication_year}})
19         {%- endif -%}
20       </th>
21     </tr>
22     {% if review_entry.review.date_read %}
23     <tr>
24       <td>date read:</td>
25       <th>{{ review_entry.review.date_read | render_date }}</th>
26     </tr>
27     {% endif %}
28     <tr>
29       <td>rating:</td>
30       <th>
31         {% for _ in range(review_entry.review.rating) %}
32         ★
33         {% endfor %}
34         {% for _ in range(5 - review_entry.review.rating) %}
35         ☆
36         {% endfor %}
37         {% if review_entry.review.did_not_finish %}
38         (did not finish)
39         {% endif %}
40       </th>
41     </tr>
42   </table>
43
44   {{ review_entry.review.text | render_markdown | safe }}
45
46   <p>(see <a href="/reviews">all reviews</a>)</p>
47 {% endblock %}