templates/header.html.twig line 1
{% set navLinks = [{title: 'About',url: '/about'},{title: 'Team',url: '/team'},{title: 'News & Events',url: '/news'},{title: 'Help Desk',url: '/help-desk'},{title: 'Party Pillar',url: '/party-pillar'},{title: 'Contact',url: '/contact'}] %}{% set avatar = null %}{% if app.user is not null %}{% if app.user.getUserImagesByuserImageTypeCode('LG') is not null %}{% set avatar = '/uploads/media/' ~ app.user.getUserImagesByuserImageTypeCode('LG').getImageMetaData().getName() %}{% else %}{% set avatar = 'https://avatar.uimaterial.com/?setId=7Jt5O28RnCHPENR1Cvr4&name=' ~ app.user.firstName ~ '&size=512' %}{% endif %}{% endif %}<div class="fixed z-50 top-0 w-full backdrop-blur-xl bg-white/60"><nav class="flex lg:px-8 py-2 px-4 justify-between mx-auto"><div class="flex w-full items-center justify-between"><div class="md:w-1/3 w-1/2"><a class="max-w-max inline-flex items-center" href="/"><img class="h-12" src="{{ asset('/images/logo.svg') }}" alt="RSP"/><span class="xl:inline-block lg:hidden whitespace-nowrap text-brand md:text-2xl text-base font-bold">ONLD UK</span></a></div><divclass="menulg:w-automd:w-96w-72max-w-fulllg:flexhiddenlg:flex-rowflex-collg:relativefixedlg:bg-transparentbg-whitez-30lg:items-centerlg:justify-aroundlg:h-autoh-screentext-whitetop-0bottom-0lg:left-0-left-fulltransition-alllg:pt-0pt-12lg:px-0px-6"><button class="lg:hidden navbar-close absolute right-3 top-5 p-4" href="#"><svg class="w-4 h-4" viewbox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6.94004 6L11.14 1.80667C11.2656 1.68113 11.3361 1.51087 11.3361 1.33333C11.3361 1.1558 11.2656 0.985537 11.14 0.860002C11.0145 0.734466 10.8442 0.66394 10.6667 0.66394C10.4892 0.66394 10.3189 0.734466 10.1934 0.860002L6.00004 5.06L1.80671 0.860002C1.68117 0.734466 1.51091 0.663941 1.33337 0.663941C1.15584 0.663941 0.985576 0.734466 0.860041 0.860002C0.734505 0.985537 0.66398 1.1558 0.66398 1.33333C0.66398 1.51087 0.734505 1.68113 0.860041 1.80667L5.06004 6L0.860041 10.1933C0.797555 10.2553 0.747959 10.329 0.714113 10.4103C0.680267 10.4915 0.662842 10.5787 0.662842 10.6667C0.662842 10.7547 0.680267 10.8418 0.714113 10.9231C0.747959 11.0043 0.797555 11.078 0.860041 11.14C0.922016 11.2025 0.99575 11.2521 1.07699 11.2859C1.15823 11.3198 1.24537 11.3372 1.33337 11.3372C1.42138 11.3372 1.50852 11.3198 1.58976 11.2859C1.671 11.2521 1.74473 11.2025 1.80671 11.14L6.00004 6.94L10.1934 11.14C10.2554 11.2025 10.3291 11.2521 10.4103 11.2859C10.4916 11.3198 10.5787 11.3372 10.6667 11.3372C10.7547 11.3372 10.8419 11.3198 10.9231 11.2859C11.0043 11.2521 11.0781 11.2025 11.14 11.14C11.2025 11.078 11.2521 11.0043 11.286 10.9231C11.3198 10.8418 11.3372 10.7547 11.3372 10.6667C11.3372 10.5787 11.3198 10.4915 11.286 10.4103C11.2521 10.329 11.2025 10.2553 11.14 10.1933L6.94004 6Z" fill="#556987"></path></svg></button>{% for link in navLinks %}<div class="inline-block leading-[3rem] group overflow-hidden max-w-fit lg:mr-8"><a href="{{ link.url }}" class="group-hover:text-brand inline-block text-base font-normal leading-[3rem] text-gray-900 whitespace-nowrap">{{ link.title }}</a><div class="w-full h-0.5 bg-brand mt-1.5 transition-all -translate-x-full scale-100 group-hover:translate-x-0 duration-500"></div></div>{% endfor %}{% if app.user is null %}<div class="inline-block leading-[3rem] group overflow-hidden lg:mr-8 max-w-fit"><a href="/login" class="group-hover:text-brand inline-block text-base font-normal leading-[3rem] text-gray-900 whitespace-nowrap">Login</a><div class="w-full h-0.5 bg-brand mt-1.5 transition-all -translate-x-full scale-100 group-hover:translate-x-0 duration-500"></div></div><ahref="/donate"class="bg-brandhover:bg-transparentborderborder-brandtransition-allduration-300py-2px-5rounded-fulltext-basefont-semiboldleading-6text-whitehover:text-brandlg:w-autow-fulltext-centerlg:mt-0mt-autolg:mb-0mb-4">Donate</a>{% else %}<ahref="/donate"class="lg:inlinehiddenbg-brandhover:bg-transparentborderborder-brandtransition-allduration-300py-2px-5rounded-fulltext-basefont-semiboldleading-6text-whitehover:text-brandlg:w-autow-fulltext-centerlg:mr-5">Donate</a><div class="relative inline-flex h-12 group lg:mt-0 mt-4" role="button"><a href="/user/profile" class="inline-flex items-center gap-x-4 lg:w-10 lg:h-10"><imgsrc="{{ avatar }}"alt="{{ app.user.firstName }}"class="lg:w-full lg:h-full w-10 h-10 object-cover object-center rounded-full bg-brand"><span class="lg:hidden group-hover:text-brand inline-block text-base font-normal leading-[3rem] text-gray-900 whitespace-nowrap">Account</span></a><div class="lg:hidden hidden lg:group-hover:block lg:absolute z-10 lg:top-12 lg:-right-1 lg:bg-white min-w-max lg:w-48 flex flex-col w-full rounded-xl shadow-xl py-6"><a href="/user/profile" class="block hover:bg-slate-200 py-2.5 px-4 text-base font-normal text-neutral-600">My Account</a><a href="/user/payment-history" class="block hover:bg-slate-200 py-2.5 px-4 text-base font-normal text-neutral-600">My Payment History</a><a href="/user/messages" class="block hover:bg-slate-200 py-2.5 px-4 text-base font-normal text-neutral-600">My Messages</a><a href="/logout" class="block hover:bg-slate-200 py-2.5 px-4 text-base font-normal text-neutral-600">Logout</a></div></div><div class="lg:hidden inline-block leading-[3rem] overflow-hidden lg:mr-8 mt-4 relative"><ahref="/donate"class="inline-blockw-fulllg:hiddenbg-brandhover:bg-transparentborderborder-brandtransition-allduration-300py-2px-5rounded-fulltext-basefont-semiboldleading-6text-whitehover:text-brandlg:w-autotext-centerlg:mr-5">Donate</a><a href="/logout" class="w-full text-center hover:text-brand inline-block text-base font-normal leading-[3rem] text-gray-900 whitespace-nowrap">Logout</a></div>{% endif %}</div><div class="ml-auto justify-end flex lg:hidden"><button class="navbar-open w-10 h-10 bg-transparent transition-all inline-flex items-center justify-center rounded"><svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" class="fill-brand w-6 h-6" viewBox="0 0 50 50"><path d="M 0 9 L 0 11 L 50 11 L 50 9 Z M 0 24 L 0 26 L 50 26 L 50 24 Z M 0 39 L 0 41 L 50 41 L 50 39 Z"></path></svg></button></div></div></nav></div><script>const menu = document.querySelector('.menu')const opener = document.querySelector('.navbar-open')const closer = document.querySelector('.navbar-close')const backdrop = document.querySelector('.backdrop')const closeMenu = () => {document.body.classList.remove('overflow-hidden')menu.classList.add('hidden')menu.classList.remove('flex')menu.classList.remove('-left-full')menu.classList.remove('left-0')backdrop.classList.add('hidden')}backdrop.addEventListener('click', () => {closeMenu()})opener.addEventListener('click', () => {document.body.classList.add('overflow-hidden')menu.classList.remove('hidden')menu.classList.add('flex')menu.classList.remove('-left-full')menu.classList.add('left-0')backdrop.classList.remove('hidden')})window.addEventListener('resize', (e) => {e.preventDefault()if (window.innerWidth >=1536)document.body.classList.remove('overflow-hidden')})closer.addEventListener('click', () => {closeMenu()})</script>