Add a note about "Atomic"
[books.alexwlchan.net] / templates / review.html
index 233e7f7..5c7f882 100644 (file)
@@ -1,21 +1,49 @@
 {% extends "base.html" %}
 
+{% block head_content %}
+<meta name="twitter:card" content="summary">
+<meta name="twitter:site" content="@alexwlchan"/>
+<meta name="twitter:title" content="alexwlchan's review of {{ review_entry.book.title }}"/>
+<meta name="twitter:image" content="https://books.alexwlchan.net/squares/{{ review_entry.book.cover_image }}"/>
+
+<meta property="og:type" content="article" />
+<meta property="og:url" content="https://books.alexwlchan.net/{{ review_entry.out_path() }}">
+<meta property="og:title" content="alexwlchan's review of {{ review_entry.book.title }}">
+<meta property="og:image" content="https://books.alexwlchan.net/squares/{{ review_entry.book.cover_image }}"/>
+{% endblock %}
+
 {% block content %}
   {% if review_entry.book.cover_image %}
-  <img class="book-cover" src="/covers/{{ review_entry.book.cover_image }}" alt="Cover of {{ review_entry.book.title }}. {{ review_entry.book.cover_desc }}">
+    <div class="book-cover">
+      {% set book = review_entry.book %}
+      {% include "_book_cover.html" %}
+    </div>
   {% endif %}
 
-  <h1>My review of <span class="book-title">{{ review_entry.book.title }}</span></h1>
+  <h1><span class="book-title">{{ review_entry.book.title | smartypants | safe }}</span></h1>
 
-  <table>
+  <table class="book_metadata">
     <tr>
-      <td>author:</td>
+      <td>author{% if "and" in review_entry.book.author or ", " in review_entry.book.author or " & " in review_entry.book.author %}s{% endif %}:</td>
       <th>{{ review_entry.book.author }}
         {%- if review_entry.book.publication_year %}
           ({{ review_entry.book.publication_year}})
         {%- endif -%}
       </th>
     </tr>
+    {% if review_entry.review.date_read %}
+    <tr>
+      <td>date read:</td>
+      <th>{{ review_entry.review.date_read | render_date }}
+        {% if review_entry.review.did_not_finish %}
+        <span class="did_not_finish">
+          (did not finish)
+        </span>
+        {% endif %}
+      </th>
+    </tr>
+    {% endif %}
+    {% if review_entry.review.rating %}
     <tr>
       <td>rating:</td>
       <th>
         {% for _ in range(5 - review_entry.review.rating) %}
         ☆
         {% endfor %}
+        {% if review_entry.review.did_not_finish %}
+        (did not finish)
+        {% endif %}
       </th>
     </tr>
-    <tr>
-      <td>date read:</td>
-      <th>{{ review_entry.review.date_read }}</th>
-    </tr>
+    {% endif %}
   </table>
 
   {{ review_entry.review.text | render_markdown | safe }}
+
+  <p>(see <a href="/reviews">all reviews</a>)</p>
 {% endblock %}