templates/shared/ui/header/header.html.twig line 1

Open in your IDE?
  1. {% set companyObj = companyObj is defined ? companyObj : app.request.get('companyInner') %}
  2. {% set headerPages = companyObj.pages|default([])|filter(page => page.active and 'header' in page.displayLocations) %}
  3. {% if companyObj.headerVisible is not defined or companyObj.headerVisible %}
  4. <div class="py-[12px] px-[24px] mb-[16px] rounded-[16px] border-[#E2E2E9] bg-[#F7F7FA] mx-auto w-full border">
  5.     <div class="flex justify-between items-center">
  6.         <div class="flex gap-[16px] items-center">
  7.             <div class="[&_img]:max-w-[91px] [&_img]:max-h-[43px] [&_img]:object-contain">
  8.                 <a href="/">
  9.                     {% if companyStyles.mainImage is not empty %}
  10.                         {{ sonata_media(companyStyles.mainImage, 'reference') }}
  11.                     {% endif %}
  12.                 </a>
  13.             </div>
  14.             <p class="text-[16px] font-medium text-[#1B2028] leading-tight">
  15.                 Краще місце для купівлі e-Sim!
  16.             </p>
  17.         </div>
  18.         {% if headerPages is not empty %}
  19.             <div class="hidden min-[1100px]:flex flex-wrap gap-[16px] items-center">
  20.                 {% for page in headerPages %}
  21.                     <a href="{{ path('custom_page_show', {slug: page.slug}) }}" class="font-semibold text-[#1B2028] text-[12px] text-center uppercase block hover:underline">{{ page.title }}</a>
  22.                 {% endfor %}
  23.             </div>
  24.             <button type="button" class="js--headerPagesToggle min-[1100px]:hidden flex items-center justify-center w-[24px] h-[24px] shrink-0" aria-expanded="false" aria-label="Menu">
  25.                 <svg class="w-[24px] h-[24px]" viewBox="0 0 24 24" fill="none">
  26.                     <path d="M4 6H20M4 12H20M4 18H20" stroke="#1B2028" stroke-width="2" stroke-linecap="round"/>
  27.                 </svg>
  28.             </button>
  29.         {% endif %}
  30.     </div>
  31.     {% if headerPages is not empty %}
  32.         <div class="js--headerPagesMenu hidden min-[1100px]:hidden flex-col gap-[12px] mt-[12px]">
  33.             {% for page in headerPages %}
  34.                 <a href="{{ path('custom_page_show', {slug: page.slug}) }}" class="font-semibold text-[#1B2028] text-[12px] text-center uppercase block hover:underline">{{ page.title }}</a>
  35.             {% endfor %}
  36.         </div>
  37.     {% endif %}
  38. </div>
  39. {% endif %}