src/Front/Templates/_includes/_header.html.twig line 1
{% from '@front_templates/_includes/_icons.html.twig' import faq,close,menu,search,arrowDown,chevronDown,contrast,typo %}
{% macro link(item, class) %}
{% set isLinkable = item.readTranslation(app.request.locale, 'isLinkable') %}
{% set page = item.readTranslation(app.request.locale, 'page') %}
{% set link = item.readTranslation(app.request.locale, 'link') %}
{% if isLinkable %}
<a
href="{{ page
? site_url_generator.Url('page', { slug: page })
: link
}}"
class="{{ class }}"
{% if item.isTargetBlank %}target="_blank"{% endif %}
>
{% else %}
<span class="{{ class }}">
{% endif %}
{{ item.readTranslation(app.request.locale, 'title') }}
{% if isLinkable %}
</a>
{% else %}
</span>
{% endif %}
{% endmacro %}
<header class="header-area js-header-area {% if journal is not null %}header-journal{% endif %}">
<a class="header-area__logo" href="{{ site_url_generator.Url('index') }}">
{% if app.request.locale == 'pl' %}
<img src="{{ asset('assets/img/logo.svg') }}" alt="{{ 'LOGOTYP_MAIN_PAGE'|trans }}">
{% else %}
<img src="{{ asset('assets/img/logo-en.svg') }}" style="width: 196px;" alt="{{ 'LOGOTYP_MAIN_PAGE'|trans }}">
{% endif %}
</a>
{% set faqPage = front_service.PageByIdName('page_faq', app.request.locale, false) %}
{% if faqPage %}
<a class="faq js-faq ico-dark justify-c" href="{{ site_url_generator.Url('page', { slug: faqPage }) }}">{{ faq('T_FAQ'|trans) }}</a>
{% endif %}
<button class="icon-contrast ico-dark">{{ contrast('T_CONTRAST'|trans) }}</button>
<button class="icon-typo ico-dark">{{ typo('T_TYPO'|trans) }}</button>
{% include '@front_templates/_includes/_profile.html.twig' %}
{% include '@front_templates/_includes/_lang_changer.html.twig' %}
{% if journal is not null %}
{% include '@front_templates/Journal/_layout/_header.html.twig' %}
{% else %}
<button class="menu ico-light justify-c js-menu-open">
{{ menu('T_MENU'|trans, 'white') }}
</button>
{% set groups = front_service.MenuGroups(app.request.locale) %}
<div class="header-area__full-screen header-area__full-screen--short js-menu-area">
<div class="header-area__full-screen-wrapper">
{% for group in groups %}
{% set isLinkable = group.readTranslation(app.request.locale, 'isLinkable') %}
{% set page = group.readTranslation(app.request.locale, 'page') %}
{% set link = group.readTranslation(app.request.locale, 'link') %}
{% if group.items|length %}
<ul role="tablist" class="md js-accordion">
<li class="md__link">
<div class="md__link-wrapper">
{{ _self.link(group, '') }}
<button
id="menu-btn-{{ loop.index }}"
role="tab"
aria-controls="menu-panel-{{ loop.index }}"
aria-expanded="{{ group.isCollapsed ? 'false' : 'true' }}"
>{{ arrowDown('T_ARROW_DOWN'|trans, 'white') }}</button>
</div>
<ul
role="tabpanel"
aria-hidden="{{ group.isCollapsed ? 'true' : 'false' }}"
id="menu-panel-{{ loop.index }}"
aria-labelledby="menu-btn-{{ loop.index }}"
>
{% for item in group.items %}
<li>{{ _self.link(item, '') }}</li>
{% endfor %}
</ul>
</li>
</ul>
{% else %}
{{ _self.link(group, group.isSmall ? 'sm__link' : 'md__link') }}
{% endif %}
{% endfor %}
</div>
</div>
<button class="close ico-light justify-c menu-close js-menu-close">
{{ close('T_CLOSE_MENU'|trans, 'white') }}
</button>
<nav class="header-area__menu">
<div class="header-area__menu-wrapper js-header-area__menu-wrapper">
{% for group in groups|filter(group => group.isVisibleInBar) %}
{% set isLinkable = group.readTranslation(app.request.locale, 'isLinkable') %}
{% if isLinkable %}
{% set page = group.readTranslation(app.request.locale, 'page') %}
{% set link = group.readTranslation(app.request.locale, 'link') %}
<a href="{{ page
? site_url_generator.Url('page', { slug: page })
: link
}}" {% if group.isTargetBlank %}target="_blank"{% endif %}>
{% else %}
<span>
{% endif %}
{{ group.readTranslation(app.request.locale, 'title') }}
{% if isLinkable %}
</a>
{% else %}
</span>
{% endif %}
{% endfor %}
</div>
</nav>
<div class="search ico-light"></div>
{% if entity is defined and entity.idName is defined and entity.idName == 'search_results' %}
<div class="search ico-light"></div>
{% else %}
<button class="search ico-light justify-c js-search-open">
{{ search('T_SEARCH'|trans, 'white') }}
</button>
{% include '@front_templates/_includes/_search.html.twig' %}
{% endif %}
{% endif %}
{% if journal is not null %}
{% include '@front_templates/Journal/_layout/_styles.html.twig' %}
{% else %}
<style>
body {
--header-bg-color: #fff;
--menu-bg-color: #000;
--submenu-bg-color: #fff;
--header-text-color: #000;
--menu-text-color: #fff;
--submenu-text-color: #000;
}
</style>
{% endif %}
</header>
<div class="header-area-bottom">
<div class="js-header-area-bottom js-b1"></div>
<div class="js-header-area-bottom js-b2 header-area-bottom-2"></div>
<div class="js-header-area-bottom js-b3 header-area-bottom-3"></div>
</div>