Commit 5d80858
Changed files (2)
app
assets
stylesheets
views
neighbourhoods
app/assets/stylesheets/neighbourhoods.css.scss
@@ -1,3 +1,15 @@
// Place all the styles related to the Neighbourhoods controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
+
+$green: #00cc33;
+$orange: #cc9900;
+$red: #cc0000;;
+$white: #fff;
+
+body { text-rendering:optimizeLegibility; }
+
+td { color:$white; text-decoration:uppercase;}
+td.evac { background:$red; }
+td.open { background:$green; }
+td.part { background:$orange; }
\ No newline at end of file
app/views/neighbourhoods/index.html.erb
@@ -12,7 +12,15 @@
<% @neighbourhoods.each do |neighbourhood| %>
<tr>
<td><%= neighbourhood.name %></td>
- <td><%= neighbourhood.status %></td>
+ <% case
+ when neighbourhood.status.starts_with.downcase? == 'evac' %>
+ <td class="evac"><%= neighbourhood.status %></td>
+ <% when neighbourhood.status.starts_with.downcase? == 'part' %>
+ <td class="part">neighbourhood.status</td>
+ <% else %>
+ <td class="open">neighbourhood.status</td>
+ <% end %>
+ </td>
</tr>
<% end %>
</tbody>