ソースを参照

make blur for #0 value

Mohidul Islam 3 年 前
コミット
e16571bf5a
1 ファイル変更6 行追加6 行削除
  1. 6 6
      manager/templates/locations.html

+ 6 - 6
manager/templates/locations.html

@@ -85,18 +85,18 @@
                 <table class="table">
                   <tr>
                     <td><i class="fa fa-google" aria-hidden="true" style="color: #ff7700; margin-left: 1rem;">oogle</i></td>
-                    <td style="color: #212F3D;"><i class="fa fa-thumbs-o-up" style="color: green;" aria-hidden="true"></i> {{ loc.last_week_pos_google_review_count }}</td>
-                    <td style="color: #212F3D;"><i class="fa fa-thumbs-o-down" style="color: red;" aria-hidden="true"></i> {{ loc.last_week_neg_google_review_count }}</td>
+                    <td style="color: {% if loc.last_week_pos_google_review_count == 0 %} grey {% else %} #212F3D {% endif %}"><i class="fa fa-thumbs-o-up" style="color: green;" aria-hidden="true"></i> {{ loc.last_week_pos_google_review_count }}</td>
+                    <td style="color: {% if loc.last_week_neg_google_review_count == 0 %} grey {% else %} #212F3D {% endif %}"><i class="fa fa-thumbs-o-down" style="color: red;" aria-hidden="true"></i> {{ loc.last_week_neg_google_review_count }}</td>
                   </tr>
                   <tr>
                     <td><i class="fa fa-facebook" aria-hidden="true" style="color: blue; margin-left: 2rem;">acebook</i></td>
-                    <td style="color: #212F3D;"><i class="fa fa-thumbs-o-up" style="color: green;" aria-hidden="true"></i> {{ loc.last_week_pos_facebook_review_count }}</td>
-                    <td style="color: #212F3D;"><i class="fa fa-thumbs-o-down" style="color: red;" aria-hidden="true"></i> {{ loc.last_week_neg_facebook_review_count }}</td>
+                    <td style="color: {% if loc.last_week_pos_facebook_review_count == 0 %} grey {% else %} #212F3D {% endif %}"><i class="fa fa-thumbs-o-up" style="color: green;" aria-hidden="true"></i> {{ loc.last_week_pos_facebook_review_count }}</td>
+                    <td style="color: {% if loc.last_week_neg_facebook_review_count == 0 %} grey {% else %} #212F3D {% endif %}"><i class="fa fa-thumbs-o-down" style="color: red;" aria-hidden="true"></i> {{ loc.last_week_neg_facebook_review_count }}</td>
                   </tr>
                   <tr>
                     <td><i class="fa fa-yelp" aria-hidden="true" style="color: red; margin-left: 2rem;"> Yelp</i></td>
-                    <td style="color: #212F3D;"><i class="fa fa-thumbs-o-up" style="color: green;" aria-hidden="true"></i> {{ loc.last_week_pos_yelp_review_count }}</td>
-                    <td style="color: #212F3D;"><i class="fa fa-thumbs-o-down" style="color: red;" aria-hidden="true"></i> {{ loc.last_week_neg_yelp_review_count }}</td>
+                    <td style="color: {% if loc.last_week_pos_yelp_review_count == 0 %} grey {% else %} #212F3D {% endif %}"><i class="fa fa-thumbs-o-up" style="color: green;" aria-hidden="true"></i> {{ loc.last_week_pos_yelp_review_count }}</td>
+                    <td style="color: {% if loc.last_week_neg_yelp_review_count == 0 %} grey {% else %} #212F3D {% endif %}"><i class="fa fa-thumbs-o-down" style="color: red;" aria-hidden="true"></i> {{ loc.last_week_neg_yelp_review_count }}</td>
                   </tr>
                 </table>
               </div>