added bg color to sections

This commit is contained in:
Connor Turland 2017-09-03 08:27:05 -04:00
parent 958bd8c70c
commit 42f4ecb37b

View file

@ -1,4 +1,4 @@
<% button_style = "background-color:#4fc059;border-radius:2px;color:white;display:inline-block;font-family:Roboto,Arial,Helvetica,sans-serif;font-size:12px;font-weight:bold;min-height:29px;line-height:29px;min-width:54px;outline:0px;padding:0 8px;text-align:center;text-decoration:none" %> <% button_style = "margin-top: 8px;background-color:#4fc059;border-radius:2px;color:white;display:inline-block;font-family:Roboto,Arial,Helvetica,sans-serif;font-size:12px;font-weight:bold;min-height:29px;line-height:29px;min-width:54px;outline:0px;padding:0 8px;text-align:center;text-decoration:none" %>
<!DOCTYPE html> <!DOCTYPE html>
<style> <style>
@ -35,48 +35,57 @@
<% end %> <% end %>
</div> </div>
<hr> <hr>
<% if @summary_data[:topics_added] %> <% if @summary_data[:topics_added] || @summary_data[:synapses_added] %>
<h3 style="color:#424242;">Topics Added</h3> <div style="background:rgba(79, 192, 89, 0.2); padding:8px;">
<ul> <% if @summary_data[:topics_added] %>
<% @summary_data[:topics_added].each do |event| %> <h3 style="color:#424242;">Topics Added</h3>
<li><%= event.eventable.name %></li> <ul>
<% @summary_data[:topics_added].each do |event| %>
<li><%= event.eventable.name %></li>
<% end %>
</ul>
<% end %> <% end %>
</ul>
<% if @summary_data[:synapses_added] %>
<h3 style="color:#424242;">Synapses Added</h3>
<ul>
<% @summary_data[:synapses_added].each do |event| %>
<li>
<%= event.eventable.topic1.name %></br>
<img src="https://s3.amazonaws.com/metamaps-assets/site/synapse16.png" /></br>
<%= event.eventable.topic2.name %>
</li>
<% end %>
</ul>
<% end %>
</div>
<% end %> <% end %>
<% if @summary_data[:topics_removed] %>
<h3 style="color:#424242;">Topics Removed</h3> <% if @summary_data[:topics_removed] || @summary_data[:synapses_removed] %>
<ul> <div style="background:rgba(192, 79, 79, 0.2); padding:8px;">
<% @summary_data[:topics_removed].each do |event| %> <% if @summary_data[:topics_removed] %>
<li><%= event.eventable.name %></li> <h3 style="color:#424242;">Topics Removed</h3>
<ul>
<% @summary_data[:topics_removed].each do |event| %>
<li><%= event.eventable.name %></li>
<% end %>
</ul>
<% end %> <% end %>
</ul>
<% end %>
<% if @summary_data[:synapses_added] %> <% if @summary_data[:synapses_removed] %>
<h3 style="color:#424242;">Synapses Added</h3> <h3 style="color:#424242;">Synapses Removed</h3>
<ul> <ul>
<% @summary_data[:synapses_added].each do |event| %> <% @summary_data[:synapses_removed].each do |event| %>
<li> <li>
<%= event.eventable.topic1.name %></br> <%= event.eventable.topic1.name %></br>
<img src="https://s3.amazonaws.com/metamaps-assets/site/synapse16.png" /></br> <img src="https://s3.amazonaws.com/metamaps-assets/site/synapse16.png" /></br>
<%= event.eventable.topic2.name %> <%= event.eventable.topic2.name %>
</li> </li>
<% end %>
</ul>
<% end %> <% end %>
</ul> </div>
<% end %>
<% if @summary_data[:synapses_removed] %>
<h3 style="color:#424242;">Synapses Removed</h3>
<ul>
<% @summary_data[:synapses_removed].each do |event| %>
<li>
<%= event.eventable.topic1.name %></br>
<img src="https://s3.amazonaws.com/metamaps-assets/site/synapse16.png" /></br>
<%= event.eventable.topic2.name %>
</li>
<% end %>
</ul>
<% end %> <% end %>
<%= link_to 'Visit Map', map_url(@map), style: button_style %> <%= link_to 'Visit Map', map_url(@map), style: button_style %>