templates/partials/generalHeader.html.twig line 1
{% block laptopHeader %}
<header
class="w-full navbar h-20 flex items-center sticky-header z-50 relative dark:bg-background dark:text-gray-100 transition-all"
>
<nav class="container-menu mx-auto flex items-center justify-between lg:px-5 px-5">
<svg
xmlns="http://www.w3.org/2000/svg"
class="h-6 w-6 lg:hidden block menu-btn"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
stroke-width="2"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M4 6h16M4 12h16M4 18h16"
/>
</svg>
<div>
<a href="/" class="flex items-center">
<img class="w-auto h-12 mr-3" src="../img/bos_logo.png" alt="" />
<h6 class="text-base font-medium"></h6>
</a>
</div>
<button
type="button"
class="hover:text-blue-500 flex items-center lg:hidden"
>
{% set path = is_granted('ROLE_COMMERCE') or is_granted('ROLE_ADMIN') ? path('admin') : path('app_login') %}
<a href="{{ path }}">
<span class="lg:mr-3 mr-0 relative">
<img
class="w-8 h-8 rounded-full border border-white"
src="{{ '../images/user/' ~ app.user.imageNameUser ?? 'default.jpg'}}"
alt="{{ app.user.imageNameUser ?? 'image par défaut' }}"
/>
{% if app.user %}
<span class="w-2 h-2 bg-green-500 rounded-full border absolute bottom-0 left-0"></span>
{% else %}
<span class="w-2 h-2 red-button rounded-full border absolute bottom-0 left-0"></span>
{% endif %}
</span>
</a>
</button>
<div class="hidden lg:flex items-center">
<ul class="flex items-center">
<li class="">
<div
class="relative [&>div] [&>div]:hover:visible [&>div]:hover:transition-all [&>div]:hover:pt-3 [&>div]:hover:h-full [&>div]:hover:opacity-100 [&>div]:hover:top-auto [&>div]:hover:z-10 pr-9"
>
<button class="link hover:text-blue-500 flex items-center">
<a href="{{ path('app_home_list') }}">Accéder à la carte</a>
</button>
<li class="">
<div
class="relative [&>div] [&>div]:hover:visible [&>div]:hover:transition-all [&>div]:hover:pt-3 [&>div]:hover:h-full [&>div]:hover:opacity-100 [&>div]:hover:top-auto [&>div]:hover:z-10 pr-9"
>
<button class="link hover:text-blue-500 flex items-center">
Categories
<svg
data-dropdown-button
class="w-3 h-auto ml-2"
width="10"
height="6"
viewBox="0 0 10 6"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M4.99982 6.00001C4.79513 6.00001 4.59034 5.92467 4.43435 5.774L0.434558 1.91686C0.122074 1.61552 0.122074 1.12735 0.434558 0.826011C0.747042 0.524671 1.25327 0.524671 1.56575 0.826011L4.99982 4.13893L8.43464 0.826613C8.74712 0.525274 9.25335 0.525274 9.56583 0.826613C9.87831 1.12795 9.87831 1.61612 9.56583 1.91746L5.56604 5.7746C5.4098 5.92527 5.20481 6.00001 4.99982 6.00001Z"
fill="currentColor"
/>
</svg>
</button>
<div class="absolute top-9 invisible opacity-0 whitespace-nowrap pt-0">
<div
class="rounded-lg whitespace-nowrap shadow-front-3 bg-white dark:bg-foreground dark:text-gray-300 text-gray-700"
>
<ul
class="h-full rounded-lg relative bg-white dark:bg-foreground dark:text-gray-300 text-gray-700"
>
<!-- ALL CATEGORIES IN MENU START -->
{% for category in categorieNavbar() %}
<li
class="flex rounded-t-lg [&>a_h6]:hover:text-blue-500 [&>a:first-child]:hover:border-blue-200 [&>a:first-child]:hover:rounded-t-lg [&>a:first-child]:hover:bg-blue-50 [&>a:last-child]:hover:block bg-white dark:bg-foreground"
>
<a
href="{{ path('app_home_list_category', {id:category.id}) }}"
class="link px-3 py-2 border-b text-sm border-grey-200 dark:border-gray-800 w-full"
>
<h6 class="font-medium text-gray-600 dark:text-gray-200">
{{category.name}}
</h6>
<p class="font-normal text-gray-500 dark:text-gray-400 text-xs">
{{category.subtitle}}
</p>
</a>
</li>
{% endfor %}
<!-- ALL CATEGORIES IN MENU END -->
</ul>
</div>
</div>
</div>
</li>
<li class="">
<div
class="dropdown relative [&>div]:hover:visible [&>div]:hover:transition-all [&>div]:hover:pt-3 [&>div]:hover:h-full [&>div]:hover:block [&>div]:hover:opacity-100 [&>div]:hover:top-auto [&>div]:hover:z-10 pr-9"
>
<button class="link hover:text-blue-500 flex items-center">
Blog
</svg>
</button>
</li>
<li class="">
<div
class="dropdown relative [&>div]:hover:visible [&>div]:hover:transition-all [&>div]:hover:pt-3 [&>div]:hover:h-full [&>div]:hover:block [&>div]:hover:opacity-100 [&>div]:hover:top-auto [&>div]:hover:z-10 pr-9"
>
<button class="link hover:text-blue-500 flex items-center">
Nos valeurs
</svg>
</button>
</li>
<li class="mr-9">
<svg
xmlns="http://www.w3.org/2000/svg"
class="h-5 w-5 text-gray-300 cursor-pointer darkMode"
viewBox="0 0 20 20"
fill="currentColor"
>
<path
d="M17.293 13.293A8 8 0 016.707 2.707a8.001 8.001 0 1010.586 10.586z"
/>
</svg>
<svg
xmlns="http://www.w3.org/2000/svg"
class="h-5 w-5 text-yellow-500 cursor-pointer lightMode hidden"
viewBox="0 0 20 20"
fill="currentColor"
>
<path
fill-rule="evenodd"
d="M10 2a1 1 0 011 1v1a1 1 0 11-2 0V3a1 1 0 011-1zm4 8a4 4 0 11-8 0 4 4 0 018 0zm-.464 4.95l.707.707a1 1 0 001.414-1.414l-.707-.707a1 1 0 00-1.414 1.414zm2.12-10.607a1 1 0 010 1.414l-.706.707a1 1 0 11-1.414-1.414l.707-.707a1 1 0 011.414 0zM17 11a1 1 0 100-2h-1a1 1 0 100 2h1zm-7 4a1 1 0 011 1v1a1 1 0 11-2 0v-1a1 1 0 011-1zM5.05 6.464A1 1 0 106.465 5.05l-.708-.707a1 1 0 00-1.414 1.414l.707.707zm1.414 8.486l-.707.707a1 1 0 01-1.414-1.414l.707-.707a1 1 0 011.414 1.414zM4 11a1 1 0 100-2H3a1 1 0 000 2h1z"
clip-rule="evenodd"
/>
</svg>
</li>
<li class="mr-9">
<div class="dropdown" data-dropdown>
<button
class="link hover:text-blue-500 flex items-center"
data-dropdown-button
>
<img
class="w-8 h-8 rounded-full border border-white mr-3"
src="{{ '../images/user/' ~ app.user.imageNameUser ?? 'default.jpg'}}"
data-dropdown-button
alt="{{ app.user.imageNameUser ?? 'image par défaut' }}"
/>
{% if app.user %}
<span class="w-2 h-2 bg-green-500 rounded-full border absolute bottom-0 left-0"></span>
{% else %}
<span class="w-2 h-2 red-button rounded-full border absolute bottom-0 left-0"></span>
{% endif %}
</span>
Espace professionnel
<svg
class="w-3 h-auto ml-2"
width="10"
height="6"
data-dropdown-button
viewBox="0 0 10 6"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M4.99982 6.00001C4.79513 6.00001 4.59034 5.92467 4.43435 5.774L0.434558 1.91686C0.122074 1.61552 0.122074 1.12735 0.434558 0.826011C0.747042 0.524671 1.25327 0.524671 1.56575 0.826011L4.99982 4.13893L8.43464 0.826613C8.74712 0.525274 9.25335 0.525274 9.56583 0.826613C9.87831 1.12795 9.87831 1.61612 9.56583 1.91746L5.56604 5.7746C5.4098 5.92527 5.20481 6.00001 4.99982 6.00001Z"
fill="currentColor"
/>
</svg>
</button>
<div
class="dropdown-menu bg-white dark:bg-foreground dark:text-gray-300 text-gray-700"
>
<div>
<div class="dropdown-links max-w-xs w-48 rounded-md py-3">
{% set path = is_granted('ROLE_COMMERCE') or is_granted('ROLE_ADMIN') ? path('admin') : path('app_login') %}
<a
href="{{ path }}"
class="link hover:text-blue-500 px-4 py-1 flex items-center text-sm text-gray-700 dark:text-gray-300"
><svg
xmlns="http://www.w3.org/2000/svg"
class="w-4 h-4 mr-2"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
stroke-width="2"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"
/></svg
>Mon compte
</a>
<a
href="#"
class="link hover:text-blue-500 px-4 py-1 flex items-center text-sm text-gray-700 dark:text-gray-300"
>
<svg
xmlns="http://www.w3.org/2000/svg"
class="h-4 w-4 mr-2"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
stroke-width="2"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z"
/>
</svg>
Nos offres
</a>
{% if app.user %}
<a
href="{{ path('app_logout')}}"
class="link hover:text-blue-500 px-4 py-1 flex items-center text-sm text-gray-700 dark:text-gray-300"
>
<svg
xmlns="http://www.w3.org/2000/svg"
class="w-4 h-4 mr-2"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
stroke-width="2"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1"
/>
</svg>
Déconnexion
</a>
{% endif %}
</div>
</div>
</div>
</div>
</li>
</ul>
<a href="{{ path('app_shop_new') }}">
<button
type="button"
class="inline-flex hover:bg-blue-500 hover:text-white items-center px-3 py-[9px] rounded-lg border hover:border-blue-100"
>
<svg
xmlns="http://www.w3.org/2000/svg"
class="h-4 w-4 xl:mr-2 mr-0"
viewBox="0 0 20 20"
fill="currentColor"
>
<path
fill-rule="evenodd"
d="M10 3a1 1 0 011 1v5h5a1 1 0 110 2h-5v5a1 1 0 11-2 0v-5H4a1 1 0 110-2h5V4a1 1 0 011-1z"
clip-rule="evenodd"
/>
</svg>
<span class="xl:block hidden">Ajouter un commerce</span>
</button>
</a>
</div>
</nav>
</header>
{% endblock %}