custom/apps/AtlKatanaTheme/Resources/views/storefront/layout/header/top-bar.html.twig line 1

Open in your IDE?
  1. {% sw_extends "@Storefront/storefront/layout/header/top-bar.html.twig" %}
  2. {% block layout_header_top_bar %}
  3.     {% set items = [{
  4.         show: theme_config('atl-header-top-bar-show-label-one') == 'true',
  5.         classes: 'd-flex',
  6.         icon: theme_config('atl-header-top-bar-label-icon-one'),
  7.         label: "atl-katana-theme.header.top-bar.labelOne"|trans|sw_sanitize
  8.     }, {
  9.         show: theme_config('atl-header-top-bar-show-label-two') == 'true',
  10.         classes: 'd-none d-md-flex',
  11.         icon: theme_config('atl-header-top-bar-label-icon-two'),
  12.         label: "atl-katana-theme.header.top-bar.labelTwo"|trans|sw_sanitize
  13.     }, {
  14.         show: theme_config('atl-header-top-bar-show-label-three') == 'true',
  15.         classes: 'd-none d-lg-flex',
  16.         icon: theme_config('atl-header-top-bar-label-icon-three'),
  17.         label: "atl-katana-theme.header.top-bar.labelThree"|trans|sw_sanitize
  18.     }, {
  19.         show: theme_config('atl-header-top-bar-show-label-four') == 'true',
  20.         classes: 'd-none d-xl-flex',
  21.         icon: theme_config('atl-header-top-bar-label-icon-four'),
  22.         label: "atl-katana-theme.header.top-bar.labelFour"|trans|sw_sanitize
  23.     }] %}
  24.     {% set googleMapsApiKey = config('AtlKatanaTheme.config.googleMapsApiKey') %}
  25.     {% set googleMapsPlaceId = config('AtlKatanaTheme.config.googleMapsPlaceId') %}
  26.     {% set loadGoogleMapsLib = config('AtlKatanaTheme.config.loadGoogleMapsLib') %}
  27.     <nav class="top-bar {{ theme_config('atl-header-show-top-bar-at') }}">
  28.         <div class="container">
  29.             <div class="row">
  30.                 {% block layout_header_top_bar_inner %}
  31.                     <div class="col-12 d-flex justify-content-center{% if theme_config('atl-header-top-bar-alignment') == 'space-between' %} justify-content-md-around justify-content-lg-between{% elseif theme_config('atl-header-top-bar-alignment') == 'flex-end' %} justify-content-md-end{% endif %}">
  32.                         {% block layout_header_top_bar_social_service %}
  33.                             {% if theme_config('atl-header-top-bar-social-media') == 'left' or theme_config('atl-header-top-bar-service-menu') == 'list' and page.header.serviceMenu.count > 0 %}
  34.                                 <div class="top-bar-item-first d-none d-md-block">
  35.                                     <div class="d-flex align-items-center h-100">
  36.                                         {% block layout_header_top_bar_social %}
  37.                                             {% if theme_config('atl-header-top-bar-social-media') == 'left' %}
  38.                                                 <div class="top-bar-social-media pr-3">
  39.                                                     {% sw_include '@Storefront/storefront/skin/global/component/social/social-media.html.twig' with {
  40.                                                         'size': 'xs'
  41.                                                     } %}
  42.                                                 </div>
  43.                                             {% endif %}
  44.                                         {% endblock %}
  45.                                         {% block layout_header_top_bar_service_list %}
  46.                                             {% if theme_config('atl-header-top-bar-service-menu') == 'list' %}
  47.                                                 <div class="d-none d-md-block">
  48.                                                     {% apply spaceless %}
  49.                                                         <ul class="d-flex list-unstyled h-100 m-0">
  50.                                                             {% for serviceMenuItem in page.header.serviceMenu %}
  51.                                                                 {% block layout_header_top_bar_service_list_item %}
  52.                                                                     <li class="top-bar-item">
  53.                                                                         <a class="text-decoration-none"
  54.                                                                            href="{{ category_url(serviceMenuItem) }}"
  55.                                                                            {% if category_linknewtab(serviceMenuItem) %}target="_blank"{% endif %}
  56.                                                                            title="{{ serviceMenuItem.translated.name }}">
  57.                                                                             {{ serviceMenuItem.translated.name }}
  58.                                                                         </a>
  59.                                                                     </li>
  60.                                                                 {% endblock %}
  61.                                                             {% endfor %}
  62.                                                         </ul>
  63.                                                     {% endapply %}
  64.                                                 </div>
  65.                                             {% endif %}
  66.                                         {% endblock %}
  67.                                     </div>
  68.                                 </div>
  69.                             {% endif %}
  70.                         {% endblock %}
  71.                         {% block layout_header_top_bar_items %}
  72.                             {% for item in items %}
  73.                                 {% if item.show %}
  74.                                     <div class="{{ item.classes }} top-bar-item">
  75.                                         {% if loop.index == 2 and googleMapsApiKey and googleMapsPlaceId and loadGoogleMapsLib %}
  76.                                             {% sw_include '@AtlKatanaTheme/storefront/skin/global/component/ratings/google.html.twig' with {
  77.                                                 googleMapsApiKey: googleMapsApiKey,
  78.                                                 googleMapsPlaceId: googleMapsPlaceId
  79.                                             } %}
  80.                                         {% else %}
  81.                                             {% block layout_header_top_bar_item %}
  82.                                                 {% if item.icon %}
  83.                                                     {% sw_include '@Storefront/storefront/utilities/icon.html.twig' with {
  84.                                                         name: item.icon,
  85.                                                         namespace: 'AtlKatanaTheme',
  86.                                                         'pack':  theme_config('atl-icon-set'),
  87.                                                         'size': 'xs'
  88.                                                     } %}
  89.                                                 {% endif %}
  90.                                                 <span>
  91.                                                     {{ item.label|raw }}
  92.                                                 </span>
  93.                                             {% endblock %}
  94.                                         {% endif %}
  95.                                     </div>
  96.                                 {% endif %}
  97.                             {% endfor %}
  98.                         {% endblock %}
  99.                         {% block layout_header_top_bar_widgets %}
  100.                             {% if page.header.currencies.count > 1 or page.header.languages.count > 1 or theme_config('atl-header-top-bar-service-menu') == 'dropdown' and page.header.serviceMenu.count > 0 %}
  101.                                 <div class="d-none d-md-block">
  102.                                     <div class="top-bar-widgets">
  103.                                         {% block layout_header_top_bar_currency %}
  104.                                             {% sw_include '@Storefront/storefront/layout/header/actions/currency-widget.html.twig' %}
  105.                                         {% endblock %}
  106.                                         {% block layout_header_top_bar_language %}
  107.                                             {% sw_include '@Storefront/storefront/layout/header/actions/language-widget.html.twig' %}
  108.                                         {% endblock %}
  109.                                         {% block layout_header_top_bar_service %}
  110.                                             {% if theme_config('atl-header-top-bar-service-menu') == 'dropdown' %}
  111.                                                 {% sw_include '@Storefront/storefront/layout/header/actions/service-menu-widget.html.twig' %}
  112.                                             {% endif %}
  113.                                         {% endblock %}
  114.                                     </div>
  115.                                 </div>
  116.                             {% endif %}
  117.                         {% endblock %}
  118.                     </div>
  119.                 {% endblock %}
  120.             </div>
  121.         </div>
  122.     </nav>
  123. {% endblock %}