Add an entry for "Cosmogramma"
[books.alexwlchan.net] / templates / list_reading.html
1 {% extends "base.html" %}
2
3 {% block content %}
4   <p class="nav">
5     <a href="/reviews">read</a> /
6     <a class="selected" href="/reading">reading</a> /
7     <a href="/to-read">to read</a>
8   </p>
9
10   <h2>books i&rsquo;m currently reading</h2>
11
12   {% for reading_entry in all_reading %}
13   {% set (r, g, b) = reading_entry.book.cover.tint_color | from_hex %}
14
15   <style>
16     #reading_{{ r }}_{{ g }}_{{ b }} {
17       background: rgb(
18         {{ (r * 0.08 + 0.92 * 255) | int }},
19         {{ (g * 0.08 + 0.92 * 255) | int }},
20         {{ (b * 0.08 + 0.92 * 255) | int }}
21       );
22       border-color: {{ reading_entry.book.cover.tint_color }};
23     }
24   </style>
25
26   <div class="reading" id="reading_{{ r }}_{{ g }}_{{ b }}">
27     <div class="reading_inner">
28       <div class="book_thumbnail">
29         {% set book = reading_entry.book %}
30         {% include "_book_cover.html" %}
31       </div>
32
33       <div class="book_metadata">
34         <p class="title">{{ reading_entry.book.title | smartypants | safe }}</p>
35         <p>
36           <small>
37             by {{ reading_entry.book.author }}
38             {%- if reading_entry.book.publication_year %}
39               ({{ reading_entry.book.publication_year}})
40             {%- endif -%}
41           </small>
42         </p>
43       </div>
44     </div>
45     {% if reading_entry.reading.text %}
46     <div class="note">
47       {{ reading_entry.reading.text | render_markdown | safe }}
48     </div>
49     {% endif %}
50   </div>
51   {% endfor %}
52 {% endblock %}