templates/vitrine/lexend/components/header.html.twig line 1

Open in your IDE?
  1. {% set menuHeader = getMenuWebsiteLocaleArray(app.request.locale,"header",connectUser) %}
  2. {% set menuHeader2 = getMenuWebsiteLocaleArray(app.request.locale,"header-right",connectUser) %}
  3. {% if page is defined %}
  4.     {% set navname = page.navbar %}
  5. {% else %}
  6.     {% set navname = "default" %}
  7. {% endif %}
  8. {% if navname == "default" %}
  9.     <header class="uc-header header-global uc-navbar-sticky-wrap z-999">
  10.         <nav class="uc-navbar-container uc-navbar-transparent uc-navbar-float ft-tertiary z-1">
  11.             <div class="uc-navbar-main">
  12.                 <div class="container max-w-lg lg:max-w-950px xl:max-w-xl">
  13.                     <div class="uc-navbar min-h-56px lg:min-h-100px px-2 lg:px-0 text-gray-900 dark:text-white">
  14.                         <div class="uc-navbar-left">
  15.                             <div class="uc-logo">
  16.                                 <a class="panel text-none" href="{% if app.request.locale == default_locale %}{{ path('homepage') }}{% else %}{{ path('locale_homepage',{'_locale':app.request.locale}) }}{% endif %}" style="width: {{ logo_width }}px">
  17.                                     <img class="text-primary dark:text-tertiary" src="{{ logo }}" alt="{{ websitename }}" width="{{ logo_width }}" height="{{ logo_height }}" data-uc-svg>
  18.                                 </a>
  19.                             </div>
  20.                         </div>
  21.                         <div class="uc-navbar-center d-none xl:d-flex">
  22.                             <ul class="uc-navbar-nav gap-4 xl:gap-5 d-none lg:d-flex fs-5 fw-bold" style="--uc-nav-height: 48px">
  23.                                 {% if menuHeader is not empty %}
  24.                                     {% for m in  menuHeader %}
  25.                                         {% if m.link != "#" %}
  26.                                             <li><a href="{{ m.link }}" {% if m.targetBlank == 1%}target="_blank"{% endif %}>{{ m.title }}</a></li>
  27.                                         {% else %}
  28.                                             {% set itemsLink = getMenuWebsiteItems(m.id) %}
  29.                                             <li>
  30.                                                 <a href="#">{{ m.title }} <span data-uc-navbar-parent-icon></span></a>
  31.                                                 <div class="uc-navbar-dropdown w-600px ft-primary text-unset fs-6 fw-normal p-0 hide-scrollbar rounded-2 overflow-hidden" data-uc-drop="mode: click; offset: 0; boundary: !.uc-navbar; animation: uc-animation-slide-top-small; duration: 150;">
  32.                                                     <div class="row child-cols-6 g-0 col-match" data-uc-grid>
  33.                                                         <div>
  34.                                                             <ul class="uc-nav uc-navbar-dropdown-nav p-2">
  35.                                                                 {% for itl in itemsLink %}
  36.                                                                     <li>
  37.                                                                         <a class="hstack items-start gap-2 p-2 hover:bg-gray-600 hover:bg-opacity-5 dark:hover:bg-white duration-150 rounded-1-5" href="{{ itl.link }}"  aria-label="{{ itl.title }}" title="{{ itl.title }}">
  38.                                                                             {% if itl.linkPicture is not empty %}<img src="{{ itl.linkPicture }}" width="20" style="margin-top:-2px;" />{% endif %}
  39.                                                                             <span class="vstack gap-narrow mt-nnarrow">
  40.                                                                             <span class="fw-bold dark:text-white">{{ itl.title }}</span>
  41.                                                                             {% if itl.description is not empty %}<span class="fw-normal">{{ itl.description }}</span>{% endif %}
  42.                                                                         </span>
  43.                                                                         </a>
  44.                                                                     </li>
  45.                                                                 {% endfor %}
  46.                                                             </ul>
  47.                                                         </div>
  48.                                                         {% if m.submenuHTML is not empty %}
  49.                                                             <div>
  50.                                                                 <ul class="uc-nav uc-navbar-dropdown-nav p-2 h-100 bg-gray-25 dark:bg-gray-300 dark:bg-opacity-5">
  51.                                                                     {{ m.submenuHTML|raw }}
  52.                                                                 </ul>
  53.                                                             </div>
  54.                                                         {% endif %}
  55.                                                     </div>
  56.                                                 </div>
  57.                                             </li>
  58.                                         {% endif %}
  59.                                     {% endfor %}
  60.                                 {% endif %}
  61.                             </ul>
  62.                         </div>
  63.                         <div class="uc-navbar-right">
  64.                             <div class="d-inline-block">
  65.                                 <ul class="uc-navbar-nav gap-3 xl:gap-4 d-none lg:d-flex fw-medium ltr:ms-2 ltr:xl:ms-4 rtl:me-2 rtl:xl:me-4">
  66.                                     {% block header_content %}
  67.                                         {% set translationsPaths = app.session.get('translations_paths') %}
  68.                                         {% if translationsPaths is not null %}
  69.                                             <li class="d-inline-block">
  70.                                                 <a href="#" class="hstack gap-1 text-none fw-medium" role="button" aria-haspopup="true" aria-expanded="true">
  71.                                                     <i class="icon icon-1 unicon-wikis"></i>
  72.                                                     <span>{{ app.request.locale }}</span>
  73.                                                 </a>
  74.                                                 <div class="w-200px py-1 bg-white dark:bg-gray-700 shadow-xs rounded-2 " data-uc-drop="mode: click; offset: 0; pos: top-right; boundary: !.uc-navbar-container; animation: uc-animation-slide-top-small; duration: 150;" style="top: 100px; left: 889.023px; max-width: 2017px;">
  75.                                                     <ul class="nav-y gap-0 fs-7">
  76.                                                         {% for key, value in translationsPaths %}
  77.                                                             {% if key == "en" %}
  78.                                                                 <li>
  79.                                                                     <a href="{{ value }}" class="w-100 p-1 px-2 hover:bg-gray-600 hover:bg-opacity-5 dark:hover:bg-white duration-150">
  80.                                                                         <img class="w-20px rounded-1 me-1 rtl:me-0 rtl:ms-1" src="/assets/lexend/images/common/en.svg" alt="{{ "Anglais"|translateLocale(arrayTranslate) }}" /> {{ "Anglais"|translateLocale(arrayTranslate) }}
  81.                                                                     </a>
  82.                                                                 </li>
  83.                                                             {% endif %}
  84.                                                             {% if key == "fr" %}
  85.                                                                 <li>
  86.                                                                     <a href="{{ value }}" class="w-100 p-1 px-2 hover:bg-gray-600 hover:bg-opacity-5 dark:hover:bg-white duration-150">
  87.                                                                         <img class="w-20px rounded-1 me-1 rtl:me-0 rtl:ms-1" src="/assets/lexend/images/common/fr.svg" alt="{{"Français"|translateLocale(arrayTranslate)}}" /> {{"Français"|translateLocale(arrayTranslate)}}
  88.                                                                     </a>
  89.                                                                 </li>
  90.                                                             {% endif %}
  91.                                                             {% if key == "de" %}
  92.                                                                 <li>
  93.                                                                     <a href="{{ value }}" class="w-100 p-1 px-2 hover:bg-gray-600 hover:bg-opacity-5 dark:hover:bg-white duration-150">
  94.                                                                         <img class="w-20px rounded-1 me-1 rtl:me-0 rtl:ms-1" src="/assets/lexend/images/common/de.svg" alt="{{ "Allemand"|translateLocale(arrayTranslate) }}" /> {{ "Allemand"|translateLocale(arrayTranslate) }}
  95.                                                                     </a>
  96.                                                                 </li>
  97.                                                             {% endif %}
  98.                                                         {% endfor %}
  99.                                                     </ul>
  100.                                                 </div>
  101.                                             </li>
  102.                                         {% endif %}
  103.                                     {% endblock header_content %}
  104.                                     {% if menuHeader2 is not empty %}
  105.                                         {% for m in menuHeader2 %}
  106.                                             {% if m.typeButton == "download" %}
  107.                                                 <li>
  108.                                                     <a href="{{ m.link }}" {% if m.targetBlank == 1%}target="_blank"{% endif %} title="{{ m.title }}" class="btn btn-md btn-primary border-0 px-3 lg:d-inline-flex" style="color:white !important;">
  109.                                                         {{ m.title }}
  110.                                                     </a>
  111.                                                 </li>
  112.                                             {% else %}
  113.                                                 <li>
  114.                                                     <a href="{{ m.link }}" {% if m.targetBlank == 1%}target="_blank"{% endif %} title="{{ m.title }}">{{ m.title }}</a>
  115.                                                 </li>
  116.                                             {% endif %}
  117.                                         {% endfor %}
  118.                                     {% endif %}
  119.                                 </ul>
  120.                                 <a class="d-block lg:d-none" href="#uc-menu-panel" data-uc-navbar-toggle-icon data-uc-toggle></a>
  121.                             </div>
  122.                         </div>
  123.                     </div>
  124.                 </div>
  125.             </div>
  126.         </nav>
  127.     </header>
  128. {% endif %}
  129. {% if navname == "secondary" %}
  130.     <header class="uc-header header-six uc-navbar-sticky-wrap z-999 uc-sticky" data-uc-sticky="start: 300px; animation: uc-animation-slide-top; sel-target: .uc-navbar-container; cls-active: uc-navbar-sticky; cls-inactive: uc-navbar-transparent; end: !*;">
  131.         <nav class="uc-navbar-container lg:mt-3 rounded-0 lg:rounded-pill uc-navbar-float ft-tertiary z-1 uc-navbar-transparent">
  132.             <div class="uc-navbar-main">
  133.                 <div class="container max-w-lg lg:max-w-950px xl:max-w-xl">
  134.                     <div class="uc-navbar min-h-64px lg:min-h-80px px-2 lg:px-0 text-gray-900 dark:text-white" data-uc-navbar="mode: click; animation: uc-animation-slide-top-small; duration: 150;">
  135.                         <div class="uc-navbar-left">
  136.                             <div class="uc-logo">
  137.                                 <a class="panel text-none" href="{% if app.request.locale == default_locale %}{{ path('homepage') }}{% else %}{{ path('locale_homepage',{'_locale':app.request.locale}) }}{% endif %}" style="width: {{ logo_width }}px">
  138.                                     <img class="text-primary dark:text-tertiary" src="{{ logo }}" alt="{{ websitename }}" width="{{ logo_width }}" height="{{ logo_height }}" data-uc-svg>
  139.                                 </a>
  140.                             </div>
  141.                         </div>
  142.                         <div class="uc-navbar-center">
  143.                             <ul class="uc-navbar-nav gap-3 xl:gap-5 d-none lg:d-flex fs-5 fw-medium" data-uc-scrollspy-nav="closest: li; offset: 40; scroll: true">
  144.                                 {% if menuHeader is not empty %}
  145.                                     {% for m in  menuHeader %}
  146.                                         {% if m.link != "#" %}
  147.                                             <li><a href="{{ m.link }}" {% if m.targetBlank == 1%}target="_blank"{% endif %}>{{ m.title }}</a></li>
  148.                                         {% else %}
  149.                                             {% set itemsLink = getMenuWebsiteItems(m.id) %}
  150.                                             <li>
  151.                                                 <a href="#">{{ m.title }} <span data-uc-navbar-parent-icon></span></a>
  152.                                                 <div class="uc-navbar-dropdown w-600px ft-primary text-unset fs-6 fw-normal p-0 hide-scrollbar rounded-2 overflow-hidden" data-uc-drop="mode: click; offset: 0; boundary: !.uc-navbar; animation: uc-animation-slide-top-small; duration: 150;">
  153.                                                     <div class="row child-cols-6 g-0 col-match" data-uc-grid>
  154.                                                         <div>
  155.                                                             <ul class="uc-nav uc-navbar-dropdown-nav p-2">
  156.                                                                 {% for itl in itemsLink %}
  157.                                                                     <li>
  158.                                                                         <a class="hstack items-start gap-2 p-2 hover:bg-gray-600 hover:bg-opacity-5 dark:hover:bg-white duration-150 rounded-1-5" href="{{ itl.link }}"  aria-label="{{ itl.title }}" title="{{ itl.title }}">
  159.                                                                             {% if itl.linkPicture is not empty %}<img src="{{ itl.linkPicture }}" width="20" style="margin-top:-2px;" />{% endif %}
  160.                                                                             <span class="vstack gap-narrow mt-nnarrow"><b class="fw-bold dark:text-white">{{ itl.title }}</b>
  161.                                                                         {% if itl.description is not empty %}<span class="fw-normal">{{ itl.description }}</span>{% endif %}
  162.                                                                     </span>
  163.                                                                         </a>
  164.                                                                     </li>
  165.                                                                 {% endfor %}
  166.                                                             </ul>
  167.                                                         </div>
  168.                                                         {% if m.submenuHTML is not empty %}
  169.                                                             <div>
  170.                                                                 <ul class="uc-nav uc-navbar-dropdown-nav p-2 h-100 bg-gray-25 dark:bg-gray-300 dark:bg-opacity-5">
  171.                                                                     {{ m.submenuHTML|raw }}
  172.                                                                 </ul>
  173.                                                             </div>
  174.                                                         {% endif %}
  175.                                                     </div>
  176.                                                 </div>
  177.                                             </li>
  178.                                         {% endif %}
  179.                                     {% endfor %}
  180.                                 {% endif %}
  181.                             </ul>
  182.                         </div>
  183.                         <div class="uc-navbar-right">
  184.                             <ul class="uc-navbar-nav gap-3 xl:gap-4 d-none lg:d-flex fw-medium ltr:ms-2 ltr:xl:ms-4 rtl:me-2 rtl:xl:me-4">
  185.                                 {% set translationsPaths = app.session.get('translations_paths') %}
  186.                                 {% if translationsPaths is not null %}
  187.                                     <li class="d-inline-block">
  188.                                         <a href="#" class="hstack gap-1 text-none fw-medium" role="button" aria-haspopup="true" aria-expanded="true">
  189.                                             <i class="icon icon-1 unicon-wikis"></i>
  190.                                             <span>{{ app.request.locale }}</span>
  191.                                         </a>
  192.                                         <div class="w-200px py-1 bg-white dark:bg-gray-700 shadow-xs rounded-2 " data-uc-drop="mode: click; offset: 0; pos: top-right; boundary: !.uc-navbar-container; animation: uc-animation-slide-top-small; duration: 150;" style="top: 100px; left: 889.023px; max-width: 2017px;">
  193.                                             <ul class="nav-y gap-0 fs-7">
  194.                                                 {% for key, value in translationsPaths %}
  195.                                                     {% if key == "en" %}
  196.                                                         <li>
  197.                                                             <a href="{{ value }}" class="w-100 p-1 px-2 hover:bg-gray-600 hover:bg-opacity-5 dark:hover:bg-white duration-150">
  198.                                                                 <img class="w-20px rounded-1 me-1 rtl:me-0 rtl:ms-1" src="/assets/lexend/images/common/en.svg" alt="{{ "Anglais"|translateLocale(arrayTranslate) }}" /> {{ "Anglais"|translateLocale(arrayTranslate) }}
  199.                                                             </a>
  200.                                                         </li>
  201.                                                     {% endif %}
  202.                                                     {% if key == "fr" %}
  203.                                                         <li>
  204.                                                             <a href="{{ value }}" class="w-100 p-1 px-2 hover:bg-gray-600 hover:bg-opacity-5 dark:hover:bg-white duration-150">
  205.                                                                 <img class="w-20px rounded-1 me-1 rtl:me-0 rtl:ms-1" src="/assets/lexend/images/common/fr.svg" alt="{{"Français"|translateLocale(arrayTranslate)}}" /> {{"Français"|translateLocale(arrayTranslate)}}
  206.                                                             </a>
  207.                                                         </li>
  208.                                                     {% endif %}
  209.                                                     {% if key == "de" %}
  210.                                                         <li>
  211.                                                             <a href="{{ value }}" class="w-100 p-1 px-2 hover:bg-gray-600 hover:bg-opacity-5 dark:hover:bg-white duration-150">
  212.                                                                 <img class="w-20px rounded-1 me-1 rtl:me-0 rtl:ms-1" src="/assets/lexend/images/common/de.svg" alt="{{ "Allemand"|translateLocale(arrayTranslate) }}" /> {{ "Allemand"|translateLocale(arrayTranslate) }}
  213.                                                             </a>
  214.                                                         </li>
  215.                                                     {% endif %}
  216.                                                 {% endfor %}
  217.                                             </ul>
  218.                                         </div>
  219.                                     </li>
  220.                                 {% endif %}
  221.                                 {% if menuHeader2 is not empty %}
  222.                                     {% for m in menuHeader2 %}
  223.                                         {% if m.typeButton == "download" %}
  224.                                             <li>
  225.                                                 <a href="{{ m.link }}" {% if m.targetBlank == 1%}target="_blank"{% endif %} title="{{ m.title }}" class="btn btn-md btn-primary border-0 px-3 lg:d-inline-flex">
  226.                                                     {{ m.title }}
  227.                                                 </a>
  228.                                             </li>
  229.                                         {% else %}
  230.                                             <li>
  231.                                                 <a href="{{ m.link }}" {% if m.targetBlank == 1%}target="_blank"{% endif %} title="{{ m.title }}">{{ m.title }}</a>
  232.                                             </li>
  233.                                         {% endif %}
  234.                                     {% endfor %}
  235.                                 {% endif %}
  236.                             </ul>
  237.                         </div>
  238.                     </div>
  239.                 </div>
  240.             </div>
  241.         </nav>
  242.     </header>
  243. {% endif %}
  244. <div id="uc-menu-panel" data-uc-offcanvas="overlay: true;" class="uc-offcanvas uc-offcanvas-overlay" tabindex="-1">
  245.     <div class="uc-offcanvas-bar bg-white text-dark dark:bg-gray-900 dark:text-white uc-offcanvas-bar-animation uc-offcanvas-slide" role="dialog" aria-modal="true" style="max-width: 581px;">
  246.         <header class="uc-offcanvas-header hstack justify-between items-center pb-2 bg-white dark:bg-gray-900">
  247.             <div class="uc-logo">
  248.                 <a href="{% if app.request.locale == default_locale %}{{ path('homepage') }}{% else %}{{ path('locale_homepage',{'_locale':app.request.locale}) }}{% endif %}" class="h5 text-none text-gray-900 dark:text-white">
  249.                     <img src="{{ logo }}" alt="{{ websitename }}" width="{{ logo_width }}" height="{{ logo_height }}">
  250.                 </a>
  251.             </div>
  252.             <button class="uc-offcanvas-close rtl:end-auto rtl:start-0 m-1 mt-2 icon-3 btn border-0 dark:text-white dark:text-opacity-50 hover:text-primary hover:rotate-90 duration-150 transition-all" type="button">
  253.                 <i class="unicon-close"></i>
  254.             </button>
  255.         </header>
  256.         <div class="panel">
  257.             <div class="uc-sticky-placeholder" hidden=""></div>
  258.             <ul class="nav-y gap-narrow fw-medium fs-6 uc-nav" data-uc-nav="">
  259.                 {% if menuHeader is not empty %}
  260.                     {% for m in  menuHeader %}
  261.                         {% if m.link != "#" %}
  262.                             <li><a href="{{ m.link }}" {% if m.targetBlank == 1%}target="_blank"{% endif %}>{{ m.title }}</a></li>
  263.                         {% else %}
  264.                             {% set itemsLink = getMenuWebsiteItems(m.id) %}
  265.                             <li class="uc-parent">
  266.                                 <a href="#" id="uc-nav-{{ m.id }}" role="button" aria-controls="uc-nav-{{ m.id }}" aria-expanded="false" aria-disabled="false">{{ m.title }}</a>
  267.                                 <ul class="uc-nav-sub uc-nav" data-uc-nav="" hidden="" id="uc-nav-12" role="region" aria-labelledby="uc-nav-11">
  268.                                     {% for itl in itemsLink %}
  269.                                     <li role="presentation"><a href="{{ itl.link }}">{{ itl.title }}</a></li>
  270.                                     {% endfor %}
  271.                                 </ul>
  272.                             </li>
  273.                         {% endif %}
  274.                     {% endfor %}
  275.                 {% endif %}
  276.                 <li class="hr opacity-10 my-1"></li>
  277.                 {% if menuHeader2 is not empty %}
  278.                     {% for m in menuHeader2 %}
  279.                         {% if m.typeButton == "download" %}
  280.                             <li>
  281.                                 <a href="{{ m.link }}" {% if m.targetBlank == 1%}target="_blank"{% endif %} title="{{ m.title }}" class="btn btn-md btn-primary border-0 px-3 lg:d-inline-flex" style="color:white !important;">
  282.                                     {{ m.title }}
  283.                                 </a>
  284.                             </li>
  285.                         {% else %}
  286.                             <li>
  287.                                 <a href="{{ m.link }}" {% if m.targetBlank == 1%}target="_blank"{% endif %} title="{{ m.title }}">{{ m.title }}</a>
  288.                             </li>
  289.                         {% endif %}
  290.                     {% endfor %}
  291.                 {% endif %}
  292.             </ul>
  293.             <ul class="social-icons nav-x mt-4">
  294.                 {% if facebook is not empty %}
  295.                     <li>
  296.                         <a href="{{ facebook }}" target="_blank">
  297.                             <i class="icon icon-2 unicon-logo-facebook"></i>
  298.                         </a>
  299.                     </li>
  300.                 {% endif %}
  301.                 {% if twitter is not empty %}
  302.                     <li>
  303.                         <a href="{{ twitter }}" target="_blank">
  304.                             <i class="icon icon-2 unicon-logo-x-filled"></i>
  305.                         </a>
  306.                     </li>
  307.                 {% endif %}
  308.                 {% if instagram is not empty %}
  309.                     <li>
  310.                         <a href="{{ instagram }}" target="_blank">
  311.                             <i class="icon icon-2 unicon-logo-instagram"></i>
  312.                         </a>
  313.                     </li>
  314.                 {% endif %}
  315.                 {% if linkedin is not empty %}
  316.                     <li>
  317.                         <a href="{{ linkedin }}" target="_blank">
  318.                             <i class="icon icon-2 unicon-logo-linkedin"></i>
  319.                         </a>
  320.                     </li>
  321.                 {% endif %}
  322.                 {% if youtube is not empty %}
  323.                     <li>
  324.                         <a href="{{ youtube }}" target="_blank">
  325.                             <i class="icon icon-2 unicon-logo-youtube"></i>
  326.                         </a>
  327.                     </li>
  328.                 {% endif %}
  329.             </ul>
  330.             <div class="uc-sticky-placeholder" hidden=""></div>
  331.         </div>
  332.     </div>
  333. </div>