<header class="<%= header_css %>">
  <section class="top-links show-for-medium-up">
    <div class="row">
      <%= render "shared/locale_switcher" %>
      <div class="external-links">
        <%= link_to t("layouts.header.participation"), root_path, class: ("selected" unless current_page?("/transparency") || current_page?("/opendata")) %>&nbsp;|
        <%= link_to t("layouts.header.external_link_transparency"), "/transparency", class: ("selected" if current_page?("/transparency")) %>&nbsp;|
        <%= link_to t("layouts.header.external_link_opendata"), "/opendata", class: ("selected" if current_page?("/opendata")) %>
      </div>
    </div>
  </section>

  <div class="contain-to-grid clear">
    <nav class="top-bar" data-topbar role="navigation">
      <ul class="title-area">
        <li class="toggle-topbar menu-icon"><a href="#"><span></span></a></li>
        <li class="name">
          <%= link_to root_path do %>
            <%= image_tag('header_logo_madrid.png', class: 'show-for-medium-up left', size: '96x96') %>
            <%= t("layouts.header.open_gov", open: "#{t('layouts.header.open')}").html_safe %> <span>|</span> <span class="logo-site"><%= t("layouts.header.participation") %></span>
          <% end %>
        </li>
      </ul>

      <section class="top-bar-section">
        <%= render "devise/menu/login_items" %>
        <%= render "shared/admin_login_items" %>
      </section>
    </nav>
  </div>

  <div class="row-full subnavigation-container">
    <section class="subnavigation row">
      <%#= link_to t("layouts.header.welcome"), root_path %>
      <%#= link_to t("layouts.header.initiatives"), "#" %>
      <div class="small-8 column">
      <%= link_to t("layouts.header.debates"), debates_path, class: ("active" if current_page?(controller: "/debates")) %>
      <%= link_to t("layouts.header.more_information"), "/more_information", class: ("active" if current_page?("/more_information"))  %>
      <%= link_to t("layouts.header.external_link_blog_url"), target: "_blank" do %>
        <%= t("layouts.header.external_link_blog") %>
        <i class="icon-external"></i>
      <% end %>
      </div>
      <div class="small-12 medium-4 column right">
        <%= render "shared/search_form_header" %>
      </div>
    </section>
  </div>

  <% if home_page? %>
    <div class="row">
      <div class="small-12 medium-7 column">
        <h1><%= t("layouts.header.open_city_title") %></h1>
        <p><%= t("layouts.header.open_city_slogan") %></p>
        <%= link_to t("layouts.header.see_all_debates"), debates_path, class: "button radius" %>
        <%= link_to t("layouts.header.more_information"), "/more_information", class: "more-info" %>
      </div>

      <div class="show-for-medium-up small-12 medium-5 column text-center">
        <i class="icon-debates icon-home-big"></i>
        <i class="icon-debates icon-home-small"></i>
      </div>
    </div>
  <% end %>

  <% if transparency_page? %>
    <div class="row home-page">
      <div class="small-12 medium-7 column">
        <h1><%= t("pages.transparency") %></h1>
        <p>Estamos trabajando en el nuevo Portal de Transparencia del Ayuntamiento de Madrid, para que no quede ni una esquina del Ayuntamiento que no puedas ver.</p>
        <p>Por ahora puedes visitar el portal que existía hasta ahora:</p>
        <%= link_to "Ir al Portal de Transparencia", t("layouts.header.external_link_transparency_url"), target: "_blank", class: "button radius" %>
      </div>
      <div class="show-for-medium-up small-12 medium-5 column text-center">
        <i class="icon-debates icon-home-big"></i>
        <i class="icon-debates icon-home-small"></i>
      </div>
    </div>
  <% end %>

  <% if opendata_page? %>
    <div class="row home-page">
      <div class="small-12 medium-7 column">
        <h1><%= t("pages.opendata") %></h1>
        <p>Estamos trabajando en el nuevo Portal de Datos Abiertos del Ayuntamiento de Madrid, por ahora puedes visitar el portal que existía hasta ahora:</p>
        <%= link_to "Ir al Portal de Datos Abiertos", t("layouts.header.external_link_opendata_url"), target: "_blank", class: "button radius" %>
      </div>
      <div class="show-for-medium-up small-12 medium-5 column text-center">
        <i class="icon-debates icon-home-big"></i>
        <i class="icon-debates icon-home-small"></i>
      </div>
    </div>
  <% end %>
</header>
