"did not finish" should be small, should not show star rating
[books.alexwlchan.net] / templates / _review_entry.html
index 313fa67..65fd6d0 100644 (file)
@@ -1,4 +1,13 @@
-<div class="review_preview {% if review_entry.review.rating == 5 %}review_fave{% endif %}">
+{% set r = (tint_colors[review_entry.book.cover_image][0] * 255) | int %}
+{% set g = (tint_colors[review_entry.book.cover_image][1] * 255) | int %}
+{% set b = (tint_colors[review_entry.book.cover_image][2] * 255) | int %}
+
+<style>
+  {% include "_review_style.css" %}
+</style>
+
+<div class="review_preview {% if review_entry.review.rating == 5 and not is_index %}review_fave{% endif %}"
+id="review_preview_{{ r }}_{{ g }}_{{ b }}">
   <a href="/{{ review_entry.out_path() }}">
     <div class="book_thumbnail">
       {% set book = review_entry.book %}
           read {{ review_entry.review.date_read | render_date }}
             <br/>
           {% endif %}
-          {% if review_entry.review.rating %}
-            {% for _ in range(review_entry.review.rating) %}
+
+          {% if review_entry.review.rating and not review_entry.review.did_not_finish %}
+            <span class="star_rating">
+
+            {% for _ in range(review_entry.review.rating) -%}
             ★
-            {% endfor %}
-            {% for _ in range(5 - review_entry.review.rating) %}
+            {%- endfor -%}
+            {%- for _ in range(5 - review_entry.review.rating) -%}
             ☆
-            {% endfor %}
+            {%- endfor %}
           {% endif %}
+          </span>
+
           {% if review_entry.review.did_not_finish %}
-            (did not finish)
+          (did not finish)
           {% endif %}
         </small>
       </p>