Don't highlight 5 star books on the homepage
authorAlex Chan <a.chan@wellcome.ac.uk>
Sun, 11 Oct 2020 23:03:40 +0000 (00:03 +0100)
committerAlex Chan <a.chan@wellcome.ac.uk>
Sun, 11 Oct 2020 23:03:40 +0000 (00:03 +0100)
templates/_review_entry.html
templates/index.html

index 4ed68c6..60ff71b 100644 (file)
@@ -18,7 +18,7 @@
   }
 </style>
 
   }
 </style>
 
-<div class="review_preview {% if review_entry.review.rating == 5 %}review_fave{% endif %}"
+<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">
 id="review_preview_{{ r }}_{{ g }}_{{ b }}">
   <a href="/{{ review_entry.out_path() }}">
     <div class="book_thumbnail">
index c746ecf..a1c92d7 100644 (file)
@@ -6,6 +6,7 @@
 <p>Here are a few of the books I&rsquo;ve read recently:</p>
 
 <div class="books_by_year">
 <p>Here are a few of the books I&rsquo;ve read recently:</p>
 
 <div class="books_by_year">
+  {% set is_index = true %}
   {% for review_entry in reviews %}
     {% include "_review_entry.html" %}
   {% endfor %}
   {% for review_entry in reviews %}
     {% include "_review_entry.html" %}
   {% endfor %}