Merge pull request #184 from AyuntamientoMadrid/add_subnavigation
Adds sub navigation menu
This commit is contained in:
@@ -134,7 +134,7 @@ header {
|
|||||||
min-height: rem-calc(480);
|
min-height: rem-calc(480);
|
||||||
|
|
||||||
&.results {
|
&.results {
|
||||||
min-height: rem-calc(192);
|
min-height: rem-calc(216);
|
||||||
}
|
}
|
||||||
|
|
||||||
h1 {
|
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
|
// 05. Footer
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
|
|||||||
50
app/views/layouts/_admin_header.html.erb
Normal file
50
app/views/layouts/_admin_header.html.erb
Normal 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" %> |
|
||||||
|
<%= link_to t("layouts.header.external_link_transparency"), "#" %> |
|
||||||
|
<%= link_to t("layouts.header.external_link_opendata"), "#" %> |
|
||||||
|
<%= 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>
|
||||||
@@ -35,6 +35,21 @@
|
|||||||
<%= render 'devise/menu/login_items' %>
|
<%= render 'devise/menu/login_items' %>
|
||||||
<%= render 'shared/admin_login_items' %>
|
<%= render 'shared/admin_login_items' %>
|
||||||
</section>
|
</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>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<%= render 'layouts/header' %>
|
<%= render 'layouts/admin_header' %>
|
||||||
|
|
||||||
<% if notice %>
|
<% if notice %>
|
||||||
<p class="alert-box success"><%= notice %></p>
|
<p class="alert-box success"><%= notice %></p>
|
||||||
|
|||||||
@@ -15,6 +15,10 @@ en:
|
|||||||
language: Site language
|
language: Site language
|
||||||
administration: Administration
|
administration: Administration
|
||||||
moderation: Moderation
|
moderation: Moderation
|
||||||
|
welcome: Welcome
|
||||||
|
news: News
|
||||||
|
debates: Debates
|
||||||
|
initiatives: Initiatives
|
||||||
footer:
|
footer:
|
||||||
copyright: "Ayuntamiento de Madrid, 2015. All rights reserved"
|
copyright: "Ayuntamiento de Madrid, 2015. All rights reserved"
|
||||||
form:
|
form:
|
||||||
|
|||||||
@@ -15,6 +15,10 @@ es:
|
|||||||
language: Idioma de la página
|
language: Idioma de la página
|
||||||
administration: Administar
|
administration: Administar
|
||||||
moderation: Moderar
|
moderation: Moderar
|
||||||
|
welcome: Portada
|
||||||
|
news: Novedades
|
||||||
|
debates: Debates
|
||||||
|
initiatives: Iniciativas
|
||||||
footer:
|
footer:
|
||||||
copyright: "Ayuntamiento de Madrid, %{year}. Todos los derechos reservados"
|
copyright: "Ayuntamiento de Madrid, %{year}. Todos los derechos reservados"
|
||||||
form:
|
form:
|
||||||
|
|||||||
Reference in New Issue
Block a user