templates/layout/header.html.twig line 1

Open in your IDE?
  1. {% import 'common/macros/svg.html.twig' as svg %}
  2. {% macro nav(label, href) %}
  3.     <li><a href="{{ href }}">{{ label|upper }}</a></li>
  4. {% endmacro %}
  5. {% import _self as _ %}
  6. {% set lang = app.session.get('locale')|default('en') %}
  7. {% set otherLang = lang == 'hu' ? 'en' : 'hu' %}
  8. <header class="page-header">
  9.     <div class="wrapper">
  10.         <div class="logo">
  11.             <a href="{{ path('home_index') }}">
  12.                 {{ svg.icf_logo }}
  13.             </a>
  14.         </div>
  15.         <div class="nav">
  16.             <ul>
  17.                 {{ _.nav('common.about_us'|trans, path('about_us_index')) }}
  18.                 {{ _.nav('common.our_locations'|trans, path('office_index')) }}
  19.                 {{ _.nav('common.operations'|trans, path('home_index') ~ '#operations') }}
  20.                 {{ _.nav('common.career'|trans, path('career_index')) }}
  21.                 {{ _.nav('common.news'|trans, path('news_index')) }}
  22.                 {{ _.nav('common.get_in_touch'|trans, path('home_index') ~ '#get_in_touch') }}
  23.                 <li class="lang-select">
  24.                     <a href="?lang={{ otherLang }}">
  25.                         <img class="flag" src="/img/{{ otherLang }}.png" alt="{{ otherLang }}" />
  26.                         <span class="lang-display">{{ otherLang|upper }}</span>
  27.                     </a>
  28.                 </li>
  29.             </ul>
  30.         </div>
  31.         <button class="nav-button">
  32.             <span></span>
  33.             <span></span>
  34.             <span></span>
  35.         </button>
  36.     </div>
  37. </header>