improves polls show layout

This commit is contained in:
decabeza
2017-10-02 20:44:28 +02:00
parent e67ca1f86b
commit 1b3cdc181d
5 changed files with 22 additions and 60 deletions

View File

@@ -303,6 +303,10 @@ a {
float: left; float: left;
} }
.back:not([class^="icon-"]) {
text-decoration: underline;
}
.tabs-content { .tabs-content {
border: 0; border: 0;
} }

View File

@@ -1549,18 +1549,8 @@
// 08. Polls // 08. Polls
// ---------------------- // ----------------------
.dark-heading { .polls-show-header {
background: #2d3e50; background: #fafafa;
color: #fff;
.title {
color: #92ba48;
}
.button {
background: #fff;
color: $brand;
}
.callout { .callout {
@@ -1576,29 +1566,6 @@
color: $color-alert; color: $color-alert;
} }
} }
.info {
background: #314253;
padding: $line-height;
@include breakpoint(medium) {
border-top: rem-calc(6) solid #92ba48;
}
}
a:not(.button) {
color: #fff;
text-decoration: underline;
}
.back,
.icon-angle-left {
color: #fff;
}
&.polls-show-header {
min-height: $line-height * 8;
}
} }
.poll, .poll,

View File

@@ -1,10 +1,10 @@
<% provide :title do %><%= @poll.name %><% end %> <% provide :title do %><%= @poll.name %><% end %>
<div class="polls-show"> <div class="polls-show">
<div class="expanded no-margin-top dark-heading polls-show-header"> <div class="expanded no-margin-top polls-show-header">
<div class="row"> <div class="row">
<div class="small-12 medium-9 column padding"> <div class="small-12 medium-9 column padding">
<%= back_link_to polls_path %> <%= back_link_to polls_path, t("polls.show.back") %>
<h2><%= @poll.name %></h2> <h2><%= @poll.name %></h2>
<ul class="no-bullet margin-top tags"> <ul class="no-bullet margin-top tags">
@@ -12,25 +12,22 @@
<li class="inline-block"><span><%= g.name %></span></li> <li class="inline-block"><span><%= g.name %></span></li>
<% end %> <% end %>
</ul> </ul>
</div>
<%= render "callout" %> <aside class="small-12 medium-3 column margin-top">
</div> <%= render partial: 'shared/social_share', locals: {
<div class="small-12 medium-3 column"> share_title: t("shared.share"),
<div class="info"> title: @poll.name,
<p> url: poll_url
<span class="title"> } %>
<strong><%= t("polls.show.dates_title") %></strong> </aside>
</span>
<br>
<%= poll_dates(@poll) %>
</p>
</div>
</div>
</div> </div>
</div> </div>
<div class="row margin-top"> <div class="row margin-top">
<div class="small-12 medium-9 column"> <div class="small-12 medium-9 column">
<%= render "callout" %>
<% if @poll.voted_in_booth?(current_user) %> <% if @poll.voted_in_booth?(current_user) %>
<div class="callout warning"> <div class="callout warning">
<%= t("polls.show.already_voted_in_booth") %> <%= t("polls.show.already_voted_in_booth") %>
@@ -41,13 +38,5 @@
<% end %> <% end %>
<% end %> <% end %>
</div> </div>
<aside class="small-12 medium-3 column">
<%= render partial: 'shared/social_share', locals: {
share_title: t("proposals.show.share"),
title: @poll.name,
url: poll_url
} %>
</aside>
</div> </div>
</div> </div>

View File

@@ -482,7 +482,7 @@ en:
help_text_2: "To participate in the next vote you have to sign up on %{org} and verify your account. All registered voters in the city over 16 years old can vote. The results of all votes are binding on the government." help_text_2: "To participate in the next vote you have to sign up on %{org} and verify your account. All registered voters in the city over 16 years old can vote. The results of all votes are binding on the government."
show: show:
already_voted_in_booth: "You have already participated in a booth for this poll." already_voted_in_booth: "You have already participated in a booth for this poll."
dates_title: "Participation dates" back: Back to voting
cant_answer_not_logged_in: "You must %{signin} or %{signup} to participate." cant_answer_not_logged_in: "You must %{signin} or %{signup} to participate."
signin: Sign in signin: Sign in
signup: Sign up signup: Sign up
@@ -607,6 +607,7 @@ en:
budget: Participatory budget budget: Participatory budget
searcher: Searcher searcher: Searcher
go_to_page: "Go to page of " go_to_page: "Go to page of "
share: Share
social: social:
blog: "%{org} Blog" blog: "%{org} Blog"
facebook: "%{org} Facebook" facebook: "%{org} Facebook"

View File

@@ -482,7 +482,7 @@ es:
help_text_2: "Para participar en la próxima votación tienes que registrarte en %{org} y verificar tu cuenta. Pueden votar todas las personas empadronadas en la ciudad mayores de 16 años. Los resultados de todas las votaciones serán vinculantes para el gobierno." help_text_2: "Para participar en la próxima votación tienes que registrarte en %{org} y verificar tu cuenta. Pueden votar todas las personas empadronadas en la ciudad mayores de 16 años. Los resultados de todas las votaciones serán vinculantes para el gobierno."
show: show:
already_voted_in_booth: "Ya has participado en esta votación en una urna." already_voted_in_booth: "Ya has participado en esta votación en una urna."
dates_title: "Fechas de participación" back: Volver a votaciones
cant_answer_not_logged_in: "Necesitas %{signin} o %{signup} para participar." cant_answer_not_logged_in: "Necesitas %{signin} o %{signup} para participar."
signin: iniciar sesión signin: iniciar sesión
signup: registrarte signup: registrarte
@@ -607,6 +607,7 @@ es:
budget: Presupuestos participativos budget: Presupuestos participativos
searcher: Buscador searcher: Buscador
go_to_page: "Ir a la página de " go_to_page: "Ir a la página de "
share: Compartir
social: social:
blog: "Blog de %{org}" blog: "Blog de %{org}"
facebook: "Facebook de %{org}" facebook: "Facebook de %{org}"