Merge pull request #46 from AyuntamientoMadrid/beautification

Beautification
This commit is contained in:
Enrique García
2015-07-28 16:50:32 +02:00
5 changed files with 24 additions and 10 deletions

View File

@@ -56,7 +56,11 @@ header {
background: url('home-header-bg.jpg');
background-position: 50% 50%;
background-size: cover;
min-height: $line-height*20;
height: $line-height*20;
&.results {
height: $line-height*8 !important;
}
h1 {
color: white;

View File

@@ -8,4 +8,12 @@ module ApplicationHelper
return if debate.total_votes == 0
debate.send(vote).percent_of(debate.total_votes).to_s + "%"
end
def home_page?
request.fullpath == '/'
end
def header_css
home_page? ? '' : 'results'
end
end

View File

@@ -1,4 +1,4 @@
<div id="debate-<%= debate.id %>" class="small-12 medium-6 large-4 column debate">
<div id="debate-<%= debate.id %>" class="small-12 medium-6 large-4 column debate end">
<div class="panel">
<i class="fi-comment-quotes left"></i>
<span class="label radius right"><%= t("debates.debate.debate") %></span>

View File

@@ -33,7 +33,7 @@
</div>
<div class="actions">
<%= f.submit "Registrarse" %>
<%= f.submit "Registrarse", class: 'button radius' %>
</div>
<% end %>

View File

@@ -1,4 +1,4 @@
<header>
<header class="<%= header_css %>">
<section class="top-links">
<div class="row">
<div class="small-12 column">
@@ -27,6 +27,7 @@
</nav>
</div>
<% if home_page? %>
<div class="row">
<div class="small-12 column text-center">
<h1>Estamos abriendo Madrid</h1>
@@ -34,4 +35,5 @@
<%= link_to 'Participa en los últimos debates e iniciativas', new_debate_path, :class => 'button radius' %>
</div>
</div>
<% end %>
</header>