{% set userpages = build_property_nav(document, 'navigationUser').pages|filter(page => page.visible) %}<div class="relative flex items-center justify-end space-x-6" id="topbar-user" {% if app.user %} data-controller="topbar-user" data-action="click@window->topbar-user#cleanup" {% endif %} > <div class="flex gap-4 text-sm text-white"> <ul class="flex text-sm uppercase"> {% if userpages %} {% for page in userpages %} <li> <a href="{{ page.href }}" target="{{ page.target }}" class="flex gap-1 items-baseline px-2 text-white {{ page.active ? 'font-medium' : '' }}"> {# prettier-ignore #} {% include "icons/" ~ page.document.property("icon") ~ ".svg.twig" ignore missing with {class: "w-5 h-5 text-primary"} %} <span>{{ page.label }}</span> </a> </li> {% endfor %} {% endif %} </ul> <div class="flex gap-5" {% if app.user %}{{ live_event_subscriber('user-' ~ app.user.id ~ '/messages') }}{% endif %}> {% if app.user %} <a href="#" data-action="click->topbar-user#toggleNotifications" id="user-topbar-notifications-icon" class="{{check_if_unread_notifications(app.user) ? 'has-new' : '' }}" > {% include 'icons/bell.svg.twig' with { class: 'w-5 inline' } %} </a> <a href="#" data-action="click->topbar-user#toggleMessages" id="user-topbar-messages-icon" class="{{ check_if_unread_messages(app.user.id) ? 'has-new' : '' }}"> {% include 'icons/chat.svg.twig' with { class: 'w-4 inline' } %} </a> <a href="#" data-action="click->topbar-user#toggleProfile" class=""> {% include 'icons/login.svg.twig' with { class: 'w-5 inline' } %} </a> {% else %} <a href="{{ path('auth_login') }}" class="flex items-center"> {% include 'icons/login.svg.twig' with { class: 'h-5 inline mr-2 text-primary' } %}<span class="leading-none">{{ 'login'|trans }}</span> </a> <a href="{{ path('auth_register') }}" class="flex items-center text-primary"> <span class="leading-none">{{ 'sign.up'|trans }}</span> </a> {% endif %} </div> </div> {% if app.user %} <div data-topbar-user-target="notificationsMenu" class="absolute hidden mt-3 text-black shadow-lg z-1700 w-80 bg-neutral-50 overlay top-full"> <turbo-frame id="topbar-user-notifications" src="{{ path('topbar_notifications_frame') }}" loading="lazy"> <div class="grid items-center justify-center p-8"> {% include 'component/loader.html.twig' with { classes: 'w-8 h-8' } %} </div> </turbo-frame> </div> <div data-topbar-user-target="messagesMenu" class="absolute hidden mt-3 text-black shadow-lg z-1700 w-80 bg-neutral-50 overlay top-full"> <turbo-frame id="topbar-user-messages" src="{{ path('topbar_messages_frame') }}" loading="lazy"> <div class="grid items-center justify-center p-8"> {% include 'component/loader.html.twig' with { classes: 'w-8 h-8' } %} </div> </turbo-frame> <ul> <li> <a href="{{ path('profile_messages_index') }}" class="grid justify-center p-4 text-sm hover:bg-neutral-100 text-neutral-700"> {{ 'show-all-messages'| trans }} </a> </li> </ul> </div> <div data-topbar-user-target="profileMenu" class="absolute hidden mt-3 text-black border-l-4 shadow-lg z-1700 w-44 bg-neutral-50 overlay top-full border-primary-500"> <ul> <li> <a href="{{ path('network_activity') }}" class="block px-4 py-2 mt-2 hover:bg-neutral-100"> {{ 'navigation.my-network'|trans }} </a> <li> <a href="{{ pimcore_url({ object: app.user }) }}" class="block px-4 py-2 hover:bg-neutral-100"> {{ 'navigation.my-profile'|trans }} </a> </li> <li> <a href="{{ path('profile_admin_index') }}" class="block px-4 py-2 hover:bg-neutral-100"> {{ 'navigation.manage-profile'|trans }} </a> </li> <li> <a href="{{ path('auth_logout') }}" class="block px-4 py-2 mb-2 hover:bg-neutral-100"> {{ 'navigation.logout'|trans }} </a> </li> </ul> </div> {% endif %}</div>