Merge pull request #184 from AyuntamientoMadrid/add_subnavigation

Adds sub navigation menu
This commit is contained in:
Juanjo Bazán
2015-08-17 15:21:53 +02:00
6 changed files with 104 additions and 2 deletions

View File

@@ -134,7 +134,7 @@ header {
min-height: rem-calc(480);
&.results {
min-height: rem-calc(192);
min-height: rem-calc(216);
}
h1 {
@@ -276,6 +276,35 @@ header {
}
}
.subnavigation {
background: white;
border-bottom: 1px solid white;
clear: both;
a {
color: $link;
font-size: rem-calc(14);
font-weight: bold;
&.active {
color: $text;
&:after {
bottom: -17px;
left: 50%;
border: solid transparent;
content: " ";
height: 0;
width: 0;
position: absolute;
border-top-color: #fff;
border-width: 8px;
margin-left: -8px;
}
}
}
}
// 05. Footer
// - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@@ -0,0 +1,50 @@
<header class="<%= header_css %>">
<section class="top-links">
<div class="row">
<div class="language">
<span id="locale-switcher">
<%= t("layouts.header.language") %>
[
<% available_locales_to_switch.each do |locale| %>
<%= link_to(locale, params.merge(locale: locale), id: "locale-link-#{locale}") %>
<% end %>
]
</div>
<div class="external-links">
<%= link_to t("layouts.header.participation"), root_path, class: "selected" %>&nbsp;|
<%= link_to t("layouts.header.external_link_transparency"), "#" %>&nbsp;|
<%= link_to t("layouts.header.external_link_opendata"), "#" %>&nbsp;|
<%= link_to t("layouts.header.external_link_blog"), "#" %>
</div>
</div>
</section>
<div class="contain-to-grid clear">
<nav class="top-bar" data-topbar role="navigation">
<ul class="title-area">
<li class="name">
<%= link_to root_path do %>
<%= image_tag('header_logo_madrid.png', class: 'left', size: '96x96') %>
<%= t("layouts.header.open_gov", open: "<strong>#{t('layouts.header.open')}</strong>").html_safe %> | <span><%= t("layouts.header.participation") %></span>
<% end %>
</li>
<li class="toggle-topbar menu-icon"><a href="#"><span><%= t("layouts.header.menu") %></span></a></li>
</ul>
<section class="top-bar-section">
<%= render 'devise/menu/login_items' %>
<%= render 'shared/admin_login_items' %>
</section>
</nav>
</div>
<% if home_page? %>
<div class="row home-page">
<div class="small-12 column text-center">
<h1><%= t("layouts.header.open_city") %></h1>
<h2><%= t("layouts.header.open_city_slogan") %></h2>
<%= link_to t("layouts.header.see_all_debates"), debates_path, class: 'button radius' %>
</div>
</div>
<% end %>
</header>

View File

@@ -35,6 +35,21 @@
<%= render 'devise/menu/login_items' %>
<%= render 'shared/admin_login_items' %>
</section>
<section class="subnavigation row text-center">
<div class="small-12 medium-3 column end">
<%= link_to t("layouts.header.welcome"), root_path, class: ("active" if current_page?(root_path)) %>
</div>
<div class="small-12 medium-3 column end">
<%= link_to t("layouts.header.news"), "#" %>
</div>
<div class="small-12 medium-3 column end">
<%= link_to t("layouts.header.debates"), debates_path, class: ("active" if current_page?(controller: 'debates')) %>
</div>
<div class="small-12 medium-3 column end">
<%= link_to t("layouts.header.initiatives"), "#" %>
</div>
</section>
</nav>
</div>

View File

@@ -13,7 +13,7 @@
</head>
<body>
<%= render 'layouts/header' %>
<%= render 'layouts/admin_header' %>
<% if notice %>
<p class="alert-box success"><%= notice %></p>

View File

@@ -15,6 +15,10 @@ en:
language: Site language
administration: Administration
moderation: Moderation
welcome: Welcome
news: News
debates: Debates
initiatives: Initiatives
footer:
copyright: "Ayuntamiento de Madrid, 2015. All rights reserved"
form:

View File

@@ -15,6 +15,10 @@ es:
language: Idioma de la página
administration: Administar
moderation: Moderar
welcome: Portada
news: Novedades
debates: Debates
initiatives: Iniciativas
footer:
copyright: "Ayuntamiento de Madrid, %{year}. Todos los derechos reservados"
form: