Adds styles to budgets execution

This commit is contained in:
decabeza
2018-07-03 17:22:48 +02:00
committed by Javi Martín
parent 2a3ce0b182
commit c7936bacae
2 changed files with 78 additions and 14 deletions

View File

@@ -1680,6 +1680,58 @@
} }
} }
.budget-execution {
border: 1px solid $border;
overflow: hidden;
position: relative;
a {
color: $text;
display: block;
img {
max-height: $line-height * 13;
transition-duration: 0.3s;
transition-property: transform;
}
&:hover {
text-decoration: none;
img {
transform: scale(1.05);
}
}
}
h5 {
font-size: $base-font-size;
margin-bottom: 0;
}
.budget-execution-info {
padding: $line-height / 2;
}
.author {
color: $text-medium;
font-size: $small-font-size;
}
.budget-execution-content {
min-height: $line-height * 3;
}
.price {
color: $budget;
font-size: rem-calc(24);
}
&:hover {
box-shadow: 0 0 12px 0 rgba(0, 0, 0, 0.2);
}
}
// 07. Proposals successful // 07. Proposals successful
// ------------------------- // -------------------------

View File

@@ -1,17 +1,29 @@
<div> <% @headings.each do |heading| %>
<% @headings.each do |heading| %> <h4 id="<%= heading.name.parameterize %>">
<b><%= heading.name %></b> <%= heading.name %>
</h4>
<div class="row" data-equalizer-on="medium" data-equalizer>
<% heading.investments.selected.sort_by_ballots.joins(:milestones).each do |investment| %> <% heading.investments.selected.sort_by_ballots.joins(:milestones).each do |investment| %>
<div> <div class="small-12 medium-6 large-4 column end margin-bottom">
<div class="budget-execution">
<%= link_to investment.url, data: { 'equalizer-watch': true} do %>
<% if investment.image.present? %> <% if investment.image.present? %>
<%= image_tag investment.image_url(:thumb), alt: investment.image.title %> <%= image_tag investment.image_url(:thumb), alt: investment.image.title %>
<% else %> <% else %>
<%= image_tag Rails.root.join('/budget_execution_no_image.jpg'), alt: investment.title %> <%= image_tag Rails.root.join('/budget_execution_no_image.jpg'), alt: investment.title %>
<% end %> <% end %>
<%= investment.title %> <div class="budget-execution-info">
<%= investment.author.name %> <div class="budget-execution-content">
<%= investment.formatted_price %> <h5><%= investment.title %></h5>
<span class="author"><%= investment.author.name %></span>
</div>
<p class="price margin-top text-center">
<strong><%= investment.formatted_price %></strong>
</p>
</div> </div>
<% end %> <% end %>
</div>
</div>
<% end %> <% end %>
</div> </div>
<% end %>