From 1a73b20d9bb688d56c50ea651423003753bc13b7 Mon Sep 17 00:00:00 2001 From: decabeza Date: Fri, 5 Nov 2021 23:32:51 +0100 Subject: [PATCH] Fix supported investments layout --- app/assets/stylesheets/participation.scss | 5 +++++ .../budgets/investments/_investment.html.erb | 22 +++++-------------- 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/app/assets/stylesheets/participation.scss b/app/assets/stylesheets/participation.scss index a3dae8a94..1f6e47636 100644 --- a/app/assets/stylesheets/participation.scss +++ b/app/assets/stylesheets/participation.scss @@ -515,6 +515,10 @@ @include breakpoint(medium) { min-height: $line-height * 15; } + + .with-image > .row { + display: flex; + } } .budget-investments-list .budget-investment, @@ -543,6 +547,7 @@ } img { + height: 100%; max-width: 12rem; } } diff --git a/app/views/budgets/investments/_investment.html.erb b/app/views/budgets/investments/_investment.html.erb index 86c66d9fe..ce342c8a2 100644 --- a/app/views/budgets/investments/_investment.html.erb +++ b/app/views/budgets/investments/_investment.html.erb @@ -2,13 +2,10 @@
"> <% if feature?(:allow_images) && investment.image.present? %> -
+
-
- <%= image_tag investment.image_url(:thumb), - alt: investment.image.title.unicode_normalize %> -
+ <%= image_tag investment.image_url(:thumb), alt: investment.image.title.unicode_normalize %>
@@ -36,14 +33,12 @@ <% if investment.should_show_votes? %>
> + class="small-12 medium-3 column text-center"> <%= render Budgets::Investments::VotesComponent.new(investment) %>
<% elsif investment.should_show_vote_count? %>
> + class="small-12 medium-3 column text-center">
<%= t("budgets.investments.investment.supports", @@ -53,8 +48,7 @@
<% elsif investment.should_show_ballots? && !management_controller? %>
> + class="small-12 medium-3 column text-center"> <%= render "/budgets/investments/ballot", investment: investment, investment_ids: investment_ids, @@ -62,18 +56,14 @@
<% elsif investment.should_show_price? %>
> + class="supports small-12 medium-3 column text-center">
<%= investment.formatted_price %>
- <% else %> -
>
<% end %> - <% end %>