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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def highlight_background
|
||||||
|
(feature?("user.recommendations") && current_user) ? "highlight" : ""
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
key: "debates",
|
key: "debates",
|
||||||
image_field: nil,
|
image_field: nil,
|
||||||
image_version: nil,
|
image_version: nil,
|
||||||
image_default: "https://dummyimage.com/600x400/000/fff",
|
image_default: nil,
|
||||||
carousel_size: carousel_size,
|
carousel_size: carousel_size,
|
||||||
btn_text_link: t("welcome.recommended.debates.btn_text_link"),
|
btn_text_link: t("welcome.recommended.debates.btn_text_link"),
|
||||||
btn_path_link: debates_path(order: "recommendations") %>
|
btn_path_link: debates_path(order: "recommendations") %>
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
key: "proposals",
|
key: "proposals",
|
||||||
image_field: nil,
|
image_field: nil,
|
||||||
image_version: nil,
|
image_version: nil,
|
||||||
image_default: "https://dummyimage.com/600x400/000/fff",
|
image_default: nil,
|
||||||
carousel_size: carousel_size,
|
carousel_size: carousel_size,
|
||||||
btn_text_link: t("welcome.recommended.proposals.btn_text_link"),
|
btn_text_link: t("welcome.recommended.proposals.btn_text_link"),
|
||||||
btn_path_link: proposals_path(order: "recommendations") %>
|
btn_path_link: proposals_path(order: "recommendations") %>
|
||||||
|
|||||||
@@ -27,53 +27,26 @@
|
|||||||
<% cache [locale_and_user_status, @featured_debates, @featured_proposals, 'featured'] do %>
|
<% cache [locale_and_user_status, @featured_debates, @featured_proposals, 'featured'] do %>
|
||||||
<main>
|
<main>
|
||||||
|
|
||||||
<div class="row margin padding">
|
<div class="small-12 column text-center <%= highlight_background %>">
|
||||||
<div class="small-12 medium-3 column">
|
<div class="row margin padding">
|
||||||
<h2><%= t("welcome.debates.title") %></h2>
|
<div class="small-12 medium-3 column">
|
||||||
<p><%= t("welcome.debates.description") %></p>
|
<h2><%= t("welcome.debates.title") %></h2>
|
||||||
</div>
|
<p><%= t("welcome.debates.description") %></p>
|
||||||
<div class="small-12 medium-3 column">
|
</div>
|
||||||
<h2><%= t("welcome.proposal.title") %></h2>
|
<div class="small-12 medium-3 column">
|
||||||
<p><%= t("welcome.proposal.description") %></p>
|
<h2><%= t("welcome.proposal.title") %></h2>
|
||||||
</div>
|
<p><%= t("welcome.proposal.description") %></p>
|
||||||
<div class="small-12 medium-3 column">
|
</div>
|
||||||
<h2><%= t("welcome.decide.title") %></h2>
|
<div class="small-12 medium-3 column">
|
||||||
<p><%= t("welcome.decide.description") %></p>
|
<h2><%= t("welcome.decide.title") %></h2>
|
||||||
</div>
|
<p><%= t("welcome.decide.description") %></p>
|
||||||
<div class="small-12 medium-3 column">
|
</div>
|
||||||
<h2><%= t("welcome.do.title") %></h2>
|
<div class="small-12 medium-3 column">
|
||||||
<p><%= t("welcome.do.description") %></p>
|
<h2><%= t("welcome.do.title") %></h2>
|
||||||
|
<p><%= t("welcome.do.description") %></p>
|
||||||
|
</div>
|
||||||
</div>
|
</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>
|
</main>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
Reference in New Issue
Block a user