bootstrap_italia-8.x-0.x-dev/templates/layout/header/_partial.header-slim.html.twig

templates/layout/header/_partial.header-slim.html.twig
{% apply spaceless %}
  <div class="it-header-slim-wrapper{{ slim_header_light ? ' theme-light' }}">
    <div class="{{ slim_header_container_type ?: 'container' }}">
      <div class="row">
        <div class="col-12">
          <div class="it-header-slim-wrapper-content">

            {% block headerSlimGovernment %}
              {% if government_entity_name %}
                {% set government_entity_url_classes = [
                  page.header_slim_menu ? 'd-none',
                  'd-lg-block',
                  'navbar-brand',
                ] %}
                {% set government_entity_url_attributes = create_attribute() %}
                {% set government_entity_url_attributes = government_entity_url_attributes
                  .addClass(government_entity_url_classes)
                  .setAttribute('href', government_entity_url ?: '#')
                  .setAttribute('target', government_entity_url ? '_blank' : '_self')
                  .setAttribute('title', 'Go to '|t ~ government_entity_name)
                  .setAttribute('aria-label', 'Go to '|t ~ government_entity_name ~ ' - ' ~ 'External link'|t ~ ' - ' ~ 'New window'|t)
                %}
                {% if not government_entity_url %}
                  {% set government_entity_url_attributes = government_entity_url_attributes
                    .setAttribute('disabled', true)
                    .setAttribute('style', 'text-decoration: none;')
                    .removeAttribute('title')
                  %}
                {% endif %}
                <a{{ government_entity_url_attributes }}>{{ government_entity_name }}</a>
              {% endif %}
            {% endblock %}

            {% block headerSlimMenu %}
              {% if page.header_slim_menu %}
                {{ page.header_slim_menu }}
              {% endif %}
            {% endblock %}

            {% block headerSlimRightZone %}
              <div class="it-header-slim-right-zone" role="navigation" aria-label="{{ 'User links'|t }}">
                {% if page.header_slim_language %}
                  {{ page.header_slim_language }}
                {% endif %}

                {% if slim_header_action_type != 'full' %}
                  <div class="it-access-top-wrapper">
                {% endif %}

                  {% if logged_in %}
                    {% if page.header_slim_action %}
                      {{ page.header_slim_action }}
                    {% endif %}
                  {% elseif slim_header_action_active_login %}
                    {# Compliance C.SI.5.1 and C.SI.5.2 Municipality #}
                    {% set login_button_attributes = create_attribute() %}
                    {% if pa_website_validator_type == 'municipality' %}
                      {% set login_button_attributes = login_button_attributes.setAttribute('data-element', 'personal-area-login') %}
                    {% endif %}
                    {% set login_button_attributes = login_button_attributes.setAttribute('data-focus-mouse', 'false') %}

                    {% embed '@bi-bcl/button/button.html.twig' with {
                      label: 'Login to your personal area'|t,
                      variant: 'primary',
                      tag: 'a',
                      size: 'sm',
                      url: slim_header_action_url ?: path('user.login'),
                      button_classes: [
                        'btn-icon',
                        slim_header_action_type == 'full' ? 'btn-full'
                      ],
                      label_classes: ['d-none', 'd-lg-block'],
                      button_attributes: login_button_attributes,
                    } %}
                      {% block before %}
                        {% if slim_header_action_type == 'full' and slim_header_action_icon %}
                          <span class="rounded-icon" aria-hidden="true">
                            {% include '@bi-bcl/icon/icon.html.twig' with {
                              name: 'it-user',
                              color: 'primary',
                            } %}
                          </span>&nbsp;
                        {% endif %}
                      {% endblock %}
                    {% endembed %}
                  {% endif %}{# End login button for anonymous user. #}

                {% if slim_header_action_type != 'full' %}
                  </div>{# End it-access-top-wrapper. #}
                {% endif %}
              </div>{# End it-header-slim-right-zone. #}
            {% endblock %}

          </div>{# End it-header-slim-wrapper-content. #}
        </div>{# End col. #}
      </div>{# End row. #}
    </div>{# End container. #}
  </div>{# End wrapper. #}
{% endapply %}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc