Remove image by default on carousel. Remove duplicate code. Add background when user recomendations is actived
This commit is contained in:
@@ -55,4 +55,8 @@ module WelcomeHelper
|
||||
end
|
||||
end
|
||||
|
||||
def highlight_background
|
||||
(feature?("user.recommendations") && current_user) ? "highlight" : ""
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
key: "debates",
|
||||
image_field: nil,
|
||||
image_version: nil,
|
||||
image_default: "https://dummyimage.com/600x400/000/fff",
|
||||
image_default: nil,
|
||||
carousel_size: carousel_size,
|
||||
btn_text_link: t("welcome.recommended.debates.btn_text_link"),
|
||||
btn_path_link: debates_path(order: "recommendations") %>
|
||||
@@ -21,7 +21,7 @@
|
||||
key: "proposals",
|
||||
image_field: nil,
|
||||
image_version: nil,
|
||||
image_default: "https://dummyimage.com/600x400/000/fff",
|
||||
image_default: nil,
|
||||
carousel_size: carousel_size,
|
||||
btn_text_link: t("welcome.recommended.proposals.btn_text_link"),
|
||||
btn_path_link: proposals_path(order: "recommendations") %>
|
||||
|
||||
@@ -27,53 +27,26 @@
|
||||
<% cache [locale_and_user_status, @featured_debates, @featured_proposals, 'featured'] do %>
|
||||
<main>
|
||||
|
||||
<div class="row margin padding">
|
||||
<div class="small-12 medium-3 column">
|
||||
<h2><%= t("welcome.debates.title") %></h2>
|
||||
<p><%= t("welcome.debates.description") %></p>
|
||||
</div>
|
||||
<div class="small-12 medium-3 column">
|
||||
<h2><%= t("welcome.proposal.title") %></h2>
|
||||
<p><%= t("welcome.proposal.description") %></p>
|
||||
</div>
|
||||
<div class="small-12 medium-3 column">
|
||||
<h2><%= t("welcome.decide.title") %></h2>
|
||||
<p><%= t("welcome.decide.description") %></p>
|
||||
</div>
|
||||
<div class="small-12 medium-3 column">
|
||||
<h2><%= t("welcome.do.title") %></h2>
|
||||
<p><%= t("welcome.do.description") %></p>
|
||||
<div class="small-12 column text-center <%= highlight_background %>">
|
||||
<div class="row margin padding">
|
||||
<div class="small-12 medium-3 column">
|
||||
<h2><%= t("welcome.debates.title") %></h2>
|
||||
<p><%= t("welcome.debates.description") %></p>
|
||||
</div>
|
||||
<div class="small-12 medium-3 column">
|
||||
<h2><%= t("welcome.proposal.title") %></h2>
|
||||
<p><%= t("welcome.proposal.description") %></p>
|
||||
</div>
|
||||
<div class="small-12 medium-3 column">
|
||||
<h2><%= t("welcome.decide.title") %></h2>
|
||||
<p><%= t("welcome.decide.description") %></p>
|
||||
</div>
|
||||
<div class="small-12 medium-3 column">
|
||||
<h2><%= t("welcome.do.title") %></h2>
|
||||
<p><%= t("welcome.do.description") %></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 medium-6 column">
|
||||
<p>
|
||||
<span class="lead"><strong><%= t("welcome.debates.title") %></strong></span><br>
|
||||
<%= t("welcome.debates.description") %>
|
||||
</p>
|
||||
</div>
|
||||
<div class="small-12 medium-6 column">
|
||||
<p>
|
||||
<span class="lead"><strong><%= t("welcome.proposal.title") %></strong></span><br>
|
||||
<%= t("welcome.proposal.description") %>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row margin-top">
|
||||
<div class="small-12 medium-6 column">
|
||||
<p>
|
||||
<span class="lead"><strong><%= t("welcome.decide.title") %></strong></span><br>
|
||||
<%= t("welcome.decide.description") %>
|
||||
</p>
|
||||
</div>
|
||||
<div class="small-12 medium-6 column">
|
||||
<p>
|
||||
<span class="lead"><strong><%= t("welcome.do.title") %></strong></span><br>
|
||||
<%= t("welcome.do.description") %>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user