Add an entry for "A Speller's Companion"
[books.alexwlchan.net] / templates / review.html
1 {% extends "base.html" %}
2
3 {% block head_content %}
4 <meta name="twitter:card" content="summary">
5 <meta name="twitter:site" content="@alexwlchan"/>
6 <meta name="twitter:title" content="alexwlchan's review of {{ review_entry.book.title }}"/>
7 <meta name="twitter:image" content="https://books.alexwlchan.net/squares/{{ review_entry.book.cover_image }}"/>
8
9 <meta property="og:type" content="article" />
10 <meta property="og:url" content="https://books.alexwlchan.net/{{ review_entry.out_path() }}">
11 <meta property="og:title" content="alexwlchan's review of {{ review_entry.book.title }}">
12 <meta property="og:image" content="https://books.alexwlchan.net/squares/{{ review_entry.book.cover_image }}"/>
13 {% endblock %}
14
15 {% block content %}
16   {% if review_entry.book.cover_image %}
17     <div class="book-cover">
18       {% set book = review_entry.book %}
19       {% include "_book_cover.html" %}
20     </div>
21   {% endif %}
22
23   <h1><span class="book-title">{{ review_entry.book.title | smartypants | safe }}</span></h1>
24
25   <table class="book_metadata">
26     <tr>
27       <td>author{% if "and" in review_entry.book.author or ", " in review_entry.book.author or " & " in review_entry.book.author %}s{% endif %}:</td>
28       <th>{{ review_entry.book.author }}
29         {%- if review_entry.book.publication_year %}
30           ({{ review_entry.book.publication_year}})
31         {%- endif -%}
32       </th>
33     </tr>
34     {% if review_entry.review.date_read %}
35     <tr>
36       <td>date read:</td>
37       <th>{{ review_entry.review.date_read | render_date }}
38         {% if review_entry.review.did_not_finish %}
39         <span class="did_not_finish">
40           (did not finish)
41         </span>
42         {% endif %}
43       </th>
44     </tr>
45     {% endif %}
46     {% if review_entry.review.rating %}
47     <tr>
48       <td>rating:</td>
49       <th>
50         {% for _ in range(review_entry.review.rating) %}
51         ★
52         {% endfor %}
53         {% for _ in range(5 - review_entry.review.rating) %}
54         ☆
55         {% endfor %}
56         {% if review_entry.review.did_not_finish %}
57         (did not finish)
58         {% endif %}
59       </th>
60     </tr>
61     {% endif %}
62   </table>
63
64   {{ review_entry.review.text | render_markdown | safe }}
65
66   <p>(see <a href="/reviews">all reviews</a>)</p>
67 {% endblock %}