templates/partials/layout/header.html.twig line 1

Open in your IDE?
  1. {% set logos = sulu_snippet_load_by_area('logos_area',null) %}
  2. {% set menu = [
  3. {
  4. 'title': 'agency',
  5. 'href': '/agency'
  6. }, {
  7. 'title': 'projects',
  8. 'href': '/projects'
  9. }, {
  10. 'title': 'services',
  11. 'href': '/services'
  12. }, {
  13. 'title': 'offers',
  14. 'href': '/offers'
  15. }, {
  16. 'title': 'partners',
  17. 'href': '/partners'
  18. }, {
  19. 'title': 'estimate',
  20. 'href': '/estimate'
  21. }, {
  22. 'title': 'investors',
  23. 'href': '/investors'
  24. }, {
  25. 'title': 'news',
  26. 'href': '/news'
  27. }, {
  28. 'title': 'team',
  29. 'href': '/team'
  30. }
  31. ] %}
  32. {% set lang = app.request.locale %}
  33. <header class="header {{ headerColor }}">
  34.   <div class="header-container custom-grid-3 h-full border-b border-gray z-20 relative">
  35.     <div class="relative flex border-r border-gray">
  36.       <button class="header-hamburger hidden lg:flex z-10 border-r border-gray"
  37.         aria-label="Menu">
  38.         <div class="flex items-center relative w-6 h-6">
  39.           <span class="top-2"></span>
  40.           <span class="top-4"></span>
  41.         </div>
  42.       </button>
  43.       <div class="lang-select flex lg:hidden border-l border-gray group">
  44.         <div class="lang-select__current">
  45.           <span>{{ lang|capitalize }}</span>
  46.           <svg class="w-4 h-4 ml-2 group-hover:rotate-180 duration-300">
  47.             <use xlink:href="#slide-down-arrow"></use>
  48.           </svg>
  49.         </div>
  50.         <ul class="lang-select__list absolute top-full w-full flex flex-col border-t border-gray opacity-0 pointer-events-none
  51.          group-hover:opacity-100 group-hover:pointer-events-auto
  52.          group-focus-within:opacity-100 group-focus-within:pointer-events-auto group-focus-within:translate-y-0
  53.          duration-100">
  54.         {% for localization in localizations %}
  55.                     {% if localization.locale != lang %}
  56.           <li>
  57.             <a class="flex items-center justify-center w-full h-14 px-2.5 py-1 outline-none" href="{{ localization.url }}">{{ localization.locale|capitalize }}</a>
  58.           </li>
  59.           {% endif %}
  60.                 {% endfor %}
  61.         </ul>
  62.       </div>
  63.       
  64.       
  65.       <ul class="header-left-menu hidden lg:grid grid-cols-3 w-full items-center divide-x divide-gray">
  66.         {% for item in sulu_navigation_root_tree('topLeft', 4) %}
  67.         <li class="header-menu-item">
  68.           <a href="{{ sulu_content_path(item.url) }}">{{ item.title }}</a>
  69.         </li>
  70.         {% endfor %}
  71.       </ul>
  72.     </div>
  73.     <div class="header-logo z-10 relative w-full flex items-center justify-center">
  74.       <a class="relative flex items-center h-full"
  75.         href="{{ sulu_content_root_path() }}">
  76.         <span class="text-[0px]">Home page</span>
  77.         {% if logos.content.image_dark.url is defined %}
  78.           <img class="header-logo__blue w-36 xs:w-44 lg:w-[clamp(15rem,16vw,17rem)] duration-500 opacity-0" src="{{ logos.content.image_dark.url }}" alt="">
  79.         {% endif %}
  80.         
  81.         {% if logos.content.image_white.url is defined %}
  82.           <img class="header-logo__white w-36 xs:w-44 lg:w-[clamp(15rem,16vw,17rem)] duration-500 absolute" src="{{ logos.content.image_white.url }}" alt="">
  83.         {% endif %}
  84.         
  85.       </a>
  86.     </div>
  87.     <div class="relative flex justify-end border-l border-gray">
  88.       <ul class="header-right-menu hidden lg:grid grid-cols-3 w-full items-center divide-x divide-gray">
  89.         {% for item in sulu_navigation_root_tree('topRight', 4) %}
  90.         <li class="header-menu-item">
  91.           <a href="{{ sulu_content_path(item.url) }}">{{item.title}}</a>
  92.         </li>
  93.         {% endfor %}
  94.       </ul>
  95.       <div class="lang-select hidden lg:flex border-l border-gray group">
  96.         <div class="lang-select__current">
  97.           <span>{{ lang|capitalize }}</span>
  98.           <svg class="w-4 h-4 ml-2 group-hover:rotate-180 duration-300">
  99.             <use xlink:href="#slide-down-arrow"></use>
  100.           </svg>
  101.         </div>
  102.         <ul class="lang-select__list absolute top-full w-full flex flex-col border-t border-gray opacity-0 pointer-events-none
  103.          group-hover:opacity-100 group-hover:pointer-events-auto
  104.          group-focus-within:opacity-100 group-focus-within:pointer-events-auto group-focus-within:translate-y-0
  105.          duration-100">
  106.         {% for localization in localizations %}
  107.                     {% if localization.locale != lang %}
  108.           <li>
  109.             <a class="flex items-center justify-center w-full h-14 px-2.5 py-1 outline-none" href="{{ localization.url }}">{{ localization.locale|capitalize }}</a>
  110.           </li>
  111.           {% endif %}
  112.                 {% endfor %}
  113.         </ul>
  114.       </div>
  115.       <button class="header-hamburger w-[100px] flex lg:hidden items-center justify-center relative"
  116.         aria-label="Menu">
  117.         <div class="flex items-center relative w-6 h-6">
  118.           <span class="top-2"></span>
  119.           <span class="top-4"></span>
  120.         </div>
  121.       </button>
  122.     </div>
  123.   </div>
  124.   
  125.   {% set contactInformations = sulu_snippet_load_by_area('ContactInformations_area',null, app.ContactInformations) %}
  126.   {# ----- MENU ----- #}
  127.   <div
  128.     class="menu fixed top-0 left-0 right-0 min-h-screen h-screen overflow-x-hidden overflow-y-auto lg:overflow-hidden pointer-events-none bg-blue text-white"
  129.     style="clip-path: polygon(0% 0%, 100% 0%, 100% 0%, 0% 0%);">
  130.     <div class="grid grid-cols-[auto_1fr] md:grid-cols-2 lg:grid-cols-3 h-auto lg:h-full pb-20 lg:pb-0">
  131.       {# Absolute BG Logo #}
  132.       <svg
  133.         class="absolute lg:min-h-[600px] h-full lg:h-[120%] left-0 lg:left-1/3 top-1/2 lg:-translate-x-1/2 -translate-y-1/2 aspect-square text-white/5 pointer-events-none">
  134.         <use xlink:href="#circle"></use>
  135.       </svg>
  136.       {# Left column #}
  137.       <div
  138.         class="order-1 lg:order-none col-span-2 lg:col-span-1 flex flex-col justify-end h-full lg:pt-56 border-r border-white/5">
  139.         {# Text content #}
  140.         <div class="flex flex-col gap-8 px-8 xl:px-12 pb-8 lg:pb-14">
  141.           <div class="menu-left-fade"
  142.             fade
  143.             fade-trigger="none">
  144.             <p class="uppercase text-[10px] font-extrabold">{{contactInformations.content.contactsAdressTitle}}</p>
  145.             <address class="text-sm not-italic">
  146.               <p class="font-extrabold">{{contactInformations.content.contactsCompanyName}}</p>
  147.               <p class="mt-1">
  148.                 <span>{{contactInformations.content.contactsCompanyAdress}}</span>
  149.               </p>
  150.             </address>
  151.           </div>
  152.           <div class="menu-left-fade"
  153.             fade
  154.             fade-trigger="none">
  155.             <p class="uppercase text-[10px] font-extrabold">{{contactInformations.content.contactsPhoneText}}</p>
  156.             <p class="mt-1">
  157.               <a class=""
  158.                 href="tel:{{contactInformations.content.contactsPhone}}">{{contactInformations.content.contactsPhone}}</a>
  159.             </p>
  160.           </div>
  161.           <div class="menu-left-fade"
  162.             fade
  163.             fade-trigger="none">
  164.             <p class="uppercase text-[10px] font-extrabold">{{contactInformations.content.contactsEmailText}}</p>
  165.             <p class="mt-1">
  166.               {% include 'partials/layout/contact_email.html.twig' with { email: contactInformations.content.contactsEmail } %}
  167.             </p>
  168.           </div>
  169.         </div>
  170.         {# Socials #}
  171.         <div
  172.           class="menu-socials grid grid-cols-4 lg:pb-0 mx-8 lg:mx-0 border-x lg:border-x-0 border-y border-white/5 divide-x divide-white/5"
  173.           fade
  174.           fade-trigger="none">
  175.           {% for social in contactInformations.content.socials %}
  176.           <div class="h-16 md:h-24 xl:h-[120px] hover:bg-white/25 duration-500 ease-basic-ease group">
  177.             <a href="{{social.socialUrl}}"
  178.               class="flex items-center justify-center w-full h-full text-[0px]"
  179.               target="blank">
  180.               {{social.socialName}}
  181.               <svg class="block w-4 h-4 group-hover:scale-125 duration-500 ease-basic-ease">
  182.                 <use xlink:href="#{{social.socialName}}"></use>
  183.               </svg>
  184.             </a>
  185.           </div>
  186.           {% endfor %}
  187.         </div>
  188.       </div>
  189.       {# Center cloumn #}
  190.       <div class="h-full pt-40 px-8 lg:px-12 pb-16 overflow-auto">
  191.         <nav class="h-full w-full flex items-end">
  192.           <ul class="flex flex-col gap-4">
  193.             {% for item in sulu_navigation_root_tree('burger', 4) %}
  194.             <li class="center-menu-item"
  195.               fade
  196.               fade-trigger="none">
  197.               <a class="menu-clip-item text-[2.5rem] sm:text-5xl lg:text-[5vh] leading-none"
  198.                 href="{{ sulu_content_path(item.url) }}">
  199.                 <span>{{item.title}}</span>
  200.                 <span>{{item.title}}</span>
  201.               </a>
  202.             </li>
  203.             {% endfor %}
  204.           </ul>
  205.         </nav>
  206.       </div>
  207.       {# Right column #}
  208.       <div class="relative w-full h-full overflow-hidden">
  209.       {% if contactInformations.content.menuBurgerImage|length > 0 %}
  210.         <img class="menu-img hidden lg:block w-full h-full object-cover scale-[1.4]"
  211.           src="{{contactInformations.content.menuBurgerImage.url}}"
  212.           alt="Oaks Lane Menu"
  213.           loading="lazy">
  214.       {% endif %}
  215.         <div class="hidden lg:block absolute inset-0 bg-blue/30"></div>
  216.         {# Rotate text line #}
  217.         <div
  218.           class="menu-translate-text-wrapp absolute bottom-8 left-0 right-1 lg:right-8 origin-bottom-right leading-[0.8] pointer-events-none"
  219.           style="transform: rotate(-90deg) translateX(100%)">
  220.           <div
  221.             class="menu-translate-text text-[90px] md:text-[120px] 2xl:text-[155px] stroke-text whitespace-nowrap uppercase tracking-[0.13em]">
  222.             {{contactInformations.content.contactsCompanyName}}</div>
  223.         </div>
  224.       </div>
  225.     </div>
  226.   </div>
  227. </header>