"did not finish" should be small, should not show star rating
[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 = (tint_colors[reading_entry.book.cover_image][0] * 255) | int %}
14   {% set g = (tint_colors[reading_entry.book.cover_image][1] * 255) | int %}
15   {% set b = (tint_colors[reading_entry.book.cover_image][2] * 255) | int %}
16
17   <style>
18     #reading_{{ r }}_{{ g }}_{{ b }} {
19       background: rgb(
20         {{ (r * 0.08 + 0.92 * 255) | int }},
21         {{ (g * 0.08 + 0.92 * 255) | int }},
22         {{ (b * 0.08 + 0.92 * 255) | int }}
23       );
24       border-color: rgb({{ r }}, {{ g }}, {{ b }});
25     }
26   </style>
27
28   <div class="reading" id="reading_{{ r }}_{{ g }}_{{ b }}">
29     <div class="reading_inner">
30       <div class="book_thumbnail">
31         {% set book = reading_entry.book %}
32         {% include "_book_cover.html" %}
33       </div>
34
35       <div class="book_metadata">
36         <p class="title">{{ reading_entry.book.title | smartypants | safe }}</p>
37         <p>
38           <small>
39             by {{ reading_entry.book.author }}
40             {%- if reading_entry.book.publication_year %}
41               ({{ reading_entry.book.publication_year}})
42             {%- endif -%}
43           </small>
44         </p>
45       </div>
46     </div>
47     {% if reading_entry.reading.text %}
48     <div class="note">
49       {{ reading_entry.reading.text | render_markdown | safe }}
50     </div>
51     {% endif %}
52   </div>
53   {% endfor %}
54 {% endblock %}