{# Tailwind Public Navigation — STARTPLATZ #}
{# Port of _nav.homepage.bootstrap4.html.twig using Tailwind + Alpine.js #}
{# Data source: menuLinksAndPhrases (Twig global via MenuTranslationExtension) #}
{% set menuLinks = menuLinksAndPhrases.menuLinks %}
{% set menuPhrases = menuLinksAndPhrases.menuPhrases %}
{% set targetPath = menuLinksAndPhrases.targetPath %}
{% set lang = menuLinksAndPhrases.lang %}
{% set menuLinksDe2En = menuLinksAndPhrases.menuLinksDe2En %}
{% set menuLinksEn2De = menuLinksAndPhrases.menuLinksEn2De %}
{% set menuLinksDe2Fr = menuLinksAndPhrases.menuLinksDe2Fr %}
{% set menuLinksFr2De = menuLinksAndPhrases.menuLinksFr2De %}
{% set menuLinksEn2Fr = menuLinksAndPhrases.menuLinksEn2Fr %}
{% set menuLinksFr2En = menuLinksAndPhrases.menuLinksFr2En %}
<nav x-data="{ mobileOpen: false }" class="fixed top-0 left-0 right-0 z-50 bg-gray-900 text-white shadow-lg" style="padding-bottom: 2px;">
<div class="flex items-center justify-center px-4 py-2">
{# Logo #}
<a href="https://www.startplatz.de" class="flex-shrink-0 mr-4" title="Home for the innovative people in Rheinland">
<img src="https://res.cloudinary.com/startplatz/image/upload/c_scale,w_107/v1614775778/logos/STARTPLATZ_Logos/STARTPLATZ_Logo_wei%C3%9F.png"
alt="STARTPLATZ" class="h-8">
</a>
{# Mobile Toggle #}
<button @click="mobileOpen = !mobileOpen" class="lg:hidden ml-auto p-2 text-white">
<svg x-show="!mobileOpen" class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"/>
</svg>
<svg x-show="mobileOpen" class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/>
</svg>
</button>
{# Desktop + Mobile Menu #}
<ul class="hidden lg:flex items-center space-x-1 text-sm mt-1"
:class="{ '!flex flex-col absolute top-full left-0 right-0 bg-gray-900 p-4 space-x-0 space-y-1 max-h-[90vh] overflow-y-auto': mobileOpen, 'hidden': !mobileOpen }"
style="max-width: 920px;">
{# ── AI Hub ── #}
{% set aiHubUrl = (lang == 'EN') ? 'https://startplatz-ai-hub.de/en/' : 'https://startplatz-ai-hub.de' %}
<li class="my-1">
<a href="{{ aiHubUrl }}"
class="block px-3 py-1.5 rounded-[10px] text-white text-center hover:text-black hover:bg-[#aacf61]"
style="background-color: rgba(142,86,255,1.0); min-width: 75px;">
AI Hub
</a>
</li>
{# ── Startups ── #}
<li x-data="{ open: false }" @click.away="open = false" @mouseenter="open = true" @mouseleave="open = false" class="relative my-1">
<button @click="open = !open"
class="flex items-center px-2 py-1.5 text-white hover:bg-[#aacf61] hover:text-black hover:rounded">
Startups
<svg class="w-3 h-3 ml-1" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"/></svg>
</button>
<div x-show="open" x-transition class="lg:absolute left-0 mt-1 w-56 bg-[#eae9e9] rounded shadow-lg py-1 z-50">
<hr class="my-1 mx-3 border-gray-400">
<a href="{{ attribute(menuLinks, '/memberships') }}" class="block px-4 py-2 text-sm text-gray-800 hover:bg-[#aacf61]">
{{ attribute(menuPhrases, 'memberships') }}
</a>
<hr class="my-1 mx-3 border-gray-400">
<a href="/accelerator/" class="block px-4 py-2 text-sm text-gray-800 hover:bg-[#aacf61]">Accelerator</a>
<a href="{{ attribute(menuLinks, '/rheinland-pitch') }}" class="block px-4 py-2 text-sm text-gray-800 hover:bg-[#aacf61]">
{{ attribute(menuPhrases, 'rheinland-pitch') }}
</a>
<a href="{{ attribute(menuLinks, '/gruenderstipendium') }}" class="block px-4 py-2 text-sm text-gray-800 hover:bg-[#aacf61]">
{{ attribute(menuPhrases, 'gruenderstipendium') }}
</a>
</div>
</li>
{# ── Unternehmen / Corporates ── #}
{% set corporateHighlight = false %}
{% if lang == 'DE' %}
{% if 'fuer-unternehmen' in targetPath or '/fuer-unternehmen-1' in targetPath %}
{% set corporateHighlight = true %}
{% endif %}
{% else %}
{% if 'en/corporate-innovation' in targetPath or 'en/corporate-innovation-1' in targetPath %}
{% set corporateHighlight = true %}
{% endif %}
{% endif %}
<li x-data="{ open: false }" @click.away="open = false" @mouseenter="open = true" @mouseleave="open = false" class="relative my-1 {{ corporateHighlight ? 'border-b-[3px] border-[#AACF61]' : '' }}">
<button @click="open = !open"
class="flex items-center px-2 py-1.5 text-white hover:bg-[#aacf61] hover:text-black hover:rounded">
{{ attribute(menuPhrases, 'corporate') }}
<svg class="w-3 h-3 ml-1" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"/></svg>
</button>
<div x-show="open" x-transition class="lg:absolute left-0 mt-1 w-56 bg-[#eae9e9] rounded shadow-lg py-1 z-50">
<a href="{{ attribute(menuLinks, '/innovation-partnerschaften') }}" class="block px-4 py-2 text-sm text-gray-800 hover:bg-[#aacf61]">
{{ attribute(menuPhrases, 'innovation-partnerschaften') }}
</a>
<a href="{{ attribute(menuLinks, '/ki-weiterbildung') }}" class="block px-4 py-2 text-sm text-gray-800 hover:bg-[#aacf61]">
{{ attribute(menuPhrases, 'ki-weiterbildung') }}
</a>
</div>
</li>
{# ── Büros / Offices ── #}
<li x-data="{ open: false }" @click.away="open = false" @mouseenter="open = true" @mouseleave="open = false" class="relative my-1">
<button @click="open = !open"
class="flex items-center px-2 py-1.5 text-white hover:bg-[#aacf61] hover:text-black hover:rounded">
{{ attribute(menuPhrases, 'coworking-offices') }}
<svg class="w-3 h-3 ml-1" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"/></svg>
</button>
<div x-show="open" x-transition class="lg:absolute right-0 mt-1 w-64 bg-[#eae9e9] rounded shadow-lg py-1 z-50">
<a href="{{ attribute(menuLinks, '/offices-cologne') }}" class="block px-4 py-2 text-sm text-gray-800 hover:bg-[#aacf61]">
{{ attribute(menuPhrases, 'offices-cologne') }}
</a>
<a href="{{ attribute(menuLinks, '/offices-duesseldorf') }}" class="block px-4 py-2 text-sm text-gray-800 hover:bg-[#aacf61]">
{{ attribute(menuPhrases, 'offices-duesseldorf') }}
</a>
<a href="{{ attribute(menuLinks, '/coworking-cologne') }}" class="block px-4 py-2 text-sm text-gray-800 hover:bg-[#aacf61]">
{{ attribute(menuPhrases, 'coworking-cologne') }}
</a>
<a href="{{ attribute(menuLinks, '/coworking-duesseldorf') }}" class="block px-4 py-2 text-sm text-gray-800 hover:bg-[#aacf61]">
{{ attribute(menuPhrases, 'coworking-duesseldorf') }}
</a>
<a href="{{ attribute(menuLinks, '/geschaeftsadresse-cologne') }}" class="block px-4 py-2 text-sm text-gray-800 hover:bg-[#aacf61]">
{{ attribute(menuPhrases, 'geschaeftsadresse-cologne') }}
</a>
<a href="{{ attribute(menuLinks, '/geschaeftsadresse-duesseldorf') }}" class="block px-4 py-2 text-sm text-gray-800 hover:bg-[#aacf61]">
{{ attribute(menuPhrases, 'geschaeftsadresse-duesseldorf') }}
</a>
</div>
</li>
{# ── Konferenzräume ── #}
<li x-data="{ open: false }" @click.away="open = false" @mouseenter="open = true" @mouseleave="open = false" class="relative my-1">
<button @click="open = !open"
class="flex items-center px-2 py-1.5 text-white hover:bg-[#aacf61] hover:text-black hover:rounded">
{{ attribute(menuPhrases, 'tagen') }}
<svg class="w-3 h-3 ml-1" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"/></svg>
</button>
<div x-show="open" x-transition class="lg:absolute right-0 mt-1 w-64 bg-[#eae9e9] rounded shadow-lg py-1 z-50">
<a href="{{ attribute(menuLinks, '/tagungsraum-koeln') }}" class="block px-4 py-2 text-sm text-gray-800 hover:bg-[#aacf61]">
{{ attribute(menuPhrases, 'tagungsraum-koeln') }}
</a>
<a href="{{ attribute(menuLinks, '/tagungsraum-dus') }}" class="block px-4 py-2 text-sm text-gray-800 hover:bg-[#aacf61]">
{{ attribute(menuPhrases, 'tagungsraum-dus') }}
</a>
</div>
</li>
{# ── Events ── #}
<li class="my-1 {{ 'events' in targetPath ? 'border-b-[3px] border-[#AACF61]' : '' }}">
<a href="{{ attribute(menuLinks, '/events') }}"
class="block px-2 py-1.5 text-white hover:bg-[#aacf61] hover:text-black hover:rounded">
{{ attribute(menuPhrases, 'events') }}
</a>
</li>
{# ── Über uns ── #}
{% set aboutHighlight = false %}
{% if lang == 'DE' %}
{% if 'presse' in targetPath or 'standorte' in targetPath or 'startplatz-team' in targetPath
or 'partner' in targetPath or 'startups' in targetPath or 'jobs' in targetPath or 'software' in targetPath
or 'sprechstunden' in targetPath or 'referenzen' in targetPath or 'carrer' in targetPath %}
{% set aboutHighlight = true %}
{% endif %}
{% else %}
{% if '/en/presse' in targetPath or '/en/standorte' in targetPath or '/en/startplatz-team' in targetPath
or '/en/partner' in targetPath or '/en/startups' in targetPath or '/en/jobs' in targetPath or '/en/software' in targetPath
or '/en/sprechstunden' in targetPath or '/en/referenzen' in targetPath or '/en/carrer' in targetPath %}
{% set aboutHighlight = true %}
{% endif %}
{% endif %}
<li x-data="{ open: false }" @click.away="open = false" @mouseenter="open = true" @mouseleave="open = false" class="relative my-1 {{ aboutHighlight ? 'border-b-[3px] border-[#AACF61]' : '' }}">
<button @click="open = !open"
class="flex items-center px-2 py-1.5 text-white hover:bg-[#aacf61] hover:text-black hover:rounded">
{{ attribute(menuPhrases, 'ueber-uns') }}
<svg class="w-3 h-3 ml-1" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"/></svg>
</button>
<div x-show="open" x-transition class="lg:absolute right-0 mt-1 w-56 bg-[#eae9e9] rounded shadow-lg py-1 z-50">
<a href="{{ attribute(menuLinks, '/ueber-startplatz') }}" class="block px-4 py-2 text-sm text-gray-800 hover:bg-[#aacf61]">
{{ attribute(menuPhrases, 'ueber-startplatz') }}
</a>
<a href="{{ attribute(menuLinks, '/standorte') }}" class="block px-4 py-2 text-sm text-gray-800 hover:bg-[#aacf61]">
{{ attribute(menuPhrases, 'standorte') }}
</a>
<a href="{{ attribute(menuLinks, '/startplatz-team') }}" class="block px-4 py-2 text-sm text-gray-800 hover:bg-[#aacf61]">
{{ attribute(menuPhrases, 'startplatz-team') }}
</a>
{# Partner link → new /partners route #}
<a href="{{ lang == 'EN' ? '/en/partners' : '/partners' }}" class="block px-4 py-2 text-sm text-gray-800 hover:bg-[#aacf61]">
{{ attribute(menuPhrases, 'partner') }}
</a>
<a href="{{ attribute(menuLinks, '/startups') }}" class="block px-4 py-2 text-sm text-gray-800 hover:bg-[#aacf61]">
{{ attribute(menuPhrases, 'startups') }}
</a>
<a href="{{ attribute(menuLinks, '/referenzen') }}" class="block px-4 py-2 text-sm text-gray-800 hover:bg-[#aacf61]">
{{ attribute(menuPhrases, 'referenzen') }}
</a>
<a href="{{ attribute(menuLinks, '/career') }}" class="block px-4 py-2 text-sm text-gray-800 hover:bg-[#aacf61]">
{{ attribute(menuPhrases, 'career') }}
</a>
</div>
</li>
{# ── Blog ── #}
<li class="my-1">
<a href="{{ attribute(menuLinks, '/blog') }}"
class="block px-2 py-1.5 text-white hover:bg-[#aacf61] hover:text-black hover:rounded">
{{ attribute(menuPhrases, 'blog') }}
</a>
</li>
{# ── Language Switcher ── #}
<li x-data="{ open: false }" @click.away="open = false" @mouseenter="open = true" @mouseleave="open = false" class="relative my-1">
<button @click="open = !open"
class="flex items-center px-2 py-1.5 text-white hover:bg-[#aacf61] hover:text-black hover:rounded">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"/></svg>
<svg class="w-3 h-3 ml-1" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"/></svg>
</button>
<div x-show="open" x-transition class="lg:absolute right-0 mt-1 w-16 bg-[#eae9e9] rounded shadow-lg py-1 z-50">
{# German #}
{% if attribute(menuLinksEn2De, targetPath) is defined %}
<a class="block px-3 py-2 hover:bg-[#aacf61]" href="{{ attribute(menuLinksEn2De, targetPath) }}">
<img src="/bundles/startplatzstyle/images/german_language.png" class="h-5" alt="Deutsch">
</a>
{% elseif attribute(menuLinksFr2De, targetPath) is defined %}
<a class="block px-3 py-2 hover:bg-[#aacf61]" href="{{ attribute(menuLinksFr2De, targetPath) }}">
<img src="/bundles/startplatzstyle/images/german_language.png" class="h-5" alt="Deutsch">
</a>
{% else %}
<a class="block px-3 py-2 hover:bg-[#aacf61]" href="/">
<img src="/bundles/startplatzstyle/images/german_language.png" class="h-5" alt="Deutsch">
</a>
{% endif %}
{# English #}
{% if attribute(menuLinksDe2En, targetPath) is defined %}
<a class="block px-3 py-2 hover:bg-[#aacf61]" href="{{ attribute(menuLinksDe2En, targetPath) }}">
<img src="/bundles/startplatzstyle/images/english_language.png" class="h-5" alt="English">
</a>
{% elseif attribute(menuLinksFr2En, targetPath) is defined %}
<a class="block px-3 py-2 hover:bg-[#aacf61]" href="{{ attribute(menuLinksFr2En, targetPath) }}">
<img src="/bundles/startplatzstyle/images/english_language.png" class="h-5" alt="English">
</a>
{% else %}
<a class="block px-3 py-2 hover:bg-[#aacf61]" href="/en">
<img src="/bundles/startplatzstyle/images/english_language.png" class="h-5" alt="English">
</a>
{% endif %}
{# French #}
{% if attribute(menuLinksDe2Fr, targetPath) is defined %}
<a class="block px-3 py-2 hover:bg-[#aacf61]" href="{{ attribute(menuLinksDe2Fr, targetPath) }}">
<img src="/bundles/startplatzstyle/images/french_language.png" class="h-5" alt="Français">
</a>
{% elseif attribute(menuLinksEn2Fr, targetPath) is defined %}
<a class="block px-3 py-2 hover:bg-[#aacf61]" href="{{ attribute(menuLinksEn2Fr, targetPath) }}">
<img src="/bundles/startplatzstyle/images/french_language.png" class="h-5" alt="Français">
</a>
{% else %}
<a class="block px-3 py-2 hover:bg-[#aacf61]" href="/fr/">
<img src="/bundles/startplatzstyle/images/french_language.png" class="h-5" alt="Français">
</a>
{% endif %}
</div>
</li>
{# ── User / Login ── #}
{% if app.user %}
<li x-data="{ open: false }" @click.away="open = false" @mouseenter="open = true" @mouseleave="open = false" class="relative my-1 ml-3">
{# Desktop: Avatar circle #}
<button @click="open = !open" class="hidden lg:block w-[45px] h-[45px] rounded-full overflow-hidden bg-gray-200">
<img src="{{ app.user.member.imageLink }}"
alt="" class="w-full h-full object-cover rounded-full border-2 border-white shadow-inner">
</button>
{# Mobile: Text link #}
<button @click="open = !open" class="lg:hidden flex items-center px-2 py-1.5 text-white hover:bg-[#aacf61] hover:text-black hover:rounded">
<svg class="w-4 h-4 mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" 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>
{{ app.user }}
</button>
<div x-show="open" x-transition class="lg:absolute right-0 mt-1 w-48 bg-[#eae9e9] rounded shadow-lg py-1 z-50">
<span class="block px-4 py-2 text-sm font-semibold text-gray-800" style="background-color: rgba(170,207,97,0.6);">
{{ app.user.username }}
</span>
<a href="{{ path('connect_member_show') }}" class="block px-4 py-2 text-sm text-gray-800 hover:bg-[#aacf61]">My Profile</a>
<a href="{{ path('x_home') }}" class="block px-4 py-2 text-sm text-gray-800 hover:bg-[#aacf61]">SP-Connect</a>
{% if is_granted('ROLE_ADMIN') %}
<a href="{{ path('allmeda_home') }}" class="block px-4 py-2 text-sm text-gray-800 hover:bg-[#aacf61]">Allmeda</a>
{% endif %}
<hr class="my-1 border-gray-400">
<a href="{{ path('logout') }}" class="block px-4 py-2 text-sm text-gray-800 hover:bg-[#aacf61]">Logout</a>
</div>
</li>
{% else %}
<li class="my-1 ml-4">
<a href="{{ path('login') }}"
class="block px-4 py-1.5 text-white rounded bg-[#7ab800] hover:bg-[#5a8c00] transition-colors">
Login
</a>
</li>
{% endif %}
</ul>
</div>
</nav>