displays welcome image only at home page
This commit is contained in:
@@ -56,7 +56,11 @@ header {
|
|||||||
background: url('home-header-bg.jpg');
|
background: url('home-header-bg.jpg');
|
||||||
background-position: 50% 50%;
|
background-position: 50% 50%;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
min-height: $line-height*20;
|
height: $line-height*20;
|
||||||
|
|
||||||
|
&.results {
|
||||||
|
height: $line-height*8 !important;
|
||||||
|
}
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
color: white;
|
color: white;
|
||||||
|
|||||||
@@ -8,4 +8,12 @@ module ApplicationHelper
|
|||||||
return if debate.total_votes == 0
|
return if debate.total_votes == 0
|
||||||
debate.send(vote).percent_of(debate.total_votes).to_s + "%"
|
debate.send(vote).percent_of(debate.total_votes).to_s + "%"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def home_page?
|
||||||
|
request.fullpath == '/'
|
||||||
|
end
|
||||||
|
|
||||||
|
def header_css
|
||||||
|
home_page? ? '' : 'results'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<header>
|
<header class="<%= header_css %>">
|
||||||
<section class="top-links">
|
<section class="top-links">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="small-12 column">
|
<div class="small-12 column">
|
||||||
@@ -27,6 +27,7 @@
|
|||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<% if home_page? %>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="small-12 column text-center">
|
<div class="small-12 column text-center">
|
||||||
<h1>Estamos abriendo Madrid</h1>
|
<h1>Estamos abriendo Madrid</h1>
|
||||||
@@ -34,4 +35,5 @@
|
|||||||
<%= link_to 'Participa en los últimos debates e iniciativas', new_debate_path, :class => 'button radius' %>
|
<%= link_to 'Participa en los últimos debates e iniciativas', new_debate_path, :class => 'button radius' %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<% end %>
|
||||||
</header>
|
</header>
|
||||||
Reference in New Issue
Block a user