Create pages for individual reviews
[books.alexwlchan.net] / templates / review.html
1 {% extends "base.html" %}
2
3 {% block content %}
4   {% if review_entry.book.cover_image %}
5   <img class="book-cover" src="/covers/{{ review_entry.book.cover_image }}" alt="Cover of {{ review_entry.book.title }}. {{ review_entry.book.cover_desc }}">
6   {% endif %}
7
8   <h1>My review of <span class="book-title">{{ review_entry.book.title }}</span></h1>
9
10   <table>
11     <tr>
12       <td>author:</td>
13       <th>{{ review_entry.book.author }}
14         {%- if review_entry.book.publication_year %}
15           ({{ review_entry.book.publication_year}})
16         {%- endif -%}
17       </th>
18     </tr>
19     <tr>
20       <td>rating:</td>
21       <th>
22         {% for _ in range(review_entry.review.rating) %}
23         ★
24         {% endfor %}
25         {% for _ in range(5 - review_entry.review.rating) %}
26         ☆
27         {% endfor %}
28       </th>
29     </tr>
30     <tr>
31       <td>date read:</td>
32       <th>{{ review_entry.review.date_read }}</th>
33     </tr>
34   </table>
35
36   {{ review_entry.review.text | render_markdown | safe }}
37 {% endblock %}