{% import 'macros/button.macro.twig' as button %}<div class="relative" class="{{ profile.color ?? 'bg-neutral-400' }}" style="background-color: {{ profile.color }};" id="profile_hero_banner"> <div class="absolute top-0 block w-full h-full"> {{ profile.banner ? profile.banner.thumbnail('profile-banner-hero').html({ pictureAttributes: { class: 'w-full h-full max-w-full object-cover', id: 'profile-banner' }, imgAttributes: { class: 'w-full h-full max-w-full object-cover' } })|raw }} </div> <div class="absolute top-0 left-0 w-full h-full opacity-75 {{ profile.color ?? 'bg-neutral-400' }}" style="background-color: {{ profile.color }};"></div> {% if profile.banner and user.id is defined and user.id == profile.id %} <div class="absolute top-0 left-0 z-30 banner-edit-button"> <form action="{{ path('network_profile_crop_banner_frame') }}" method="POST"> <button type="submit" class="p-2 bg-neutral-100" title="{{ 'banner-edit'|trans }}"> {% include 'icons/edit.svg.twig' with { class: 'w-4 h-4 text-black' } only %} </button> </form> </div> {% endif %} <div class="container relative z-10 pt-8 pb-5 mx-auto md:pb-12 md:pt-24 lg:pb-16 lg:pt-28"> <div class="flex flex-col w-full sm:flex-row gap-x-3 md:gap-x-7 lg:gap-x-14 gap-y-10"> <div class="relative flex w-20 h-20 col-span-9 group md:w-36 md:h-36 lg:w-56 lg:h-56 lg:col-span-2" id="profile_hero_avatar"> {% include 'component/avatar.html.twig' with { avatar: profile.avatar, initials: profile.name|initials, size: 'hero', rounded: true, id: 'profile-avatar' } only %} {% if 'ROLE_STAFF' in profile.roles %} <div class="absolute z-30 flex items-center text-white transform -translate-y-1/2 top-full -right-3 md:gap-2 md:p-1 md:px-3 bg-primary-500"> <span class="block p-1" title="staff"> {% include 'icons/users.svg.twig' with { class: 'w-4 h-4' } %} </span> <span class="text-sm tracking-wide uppercase font-headline">staff</span> </div> {% elseif 'ROLE_CLUB_HORSE' in profile.roles %} <div class="absolute z-30 flex items-center text-white transform -translate-y-1/2 top-full -right-3 md:gap-2 md:p-1 md:px-3 bg-primary-500"> <span class="block p-1" title="horse"> {% include 'icons/users.svg.twig' with { class: 'w-4 h-4' } %} </span> <span class="text-sm tracking-wide uppercase font-headline"> {{ 'profile.horse.club'|trans }} </span> </div> {% elseif 'ROLE_CLUB_BUSINESS' in profile.roles %} <div class="absolute z-30 flex items-center text-white transform -translate-y-1/2 top-full -right-3 md:gap-2 md:p-1 md:px-3 bg-primary-500"> <span class="block p-1" title="business"> {% include 'icons/users.svg.twig' with { class: 'w-4 h-4' } %} </span> <span class="text-sm tracking-wide uppercase font-headline"> {{ 'profile.business.club'|trans }} </span> </div> {% elseif 'ROLE_CLUB_JOCKEY' in profile.roles %} <div class="absolute z-30 flex items-center text-white transform -translate-y-1/2 top-full -right-3 md:gap-2 md:p-1 md:px-3 bg-primary-500"> <span class="block p-1" title="jockey"> {% include 'icons/users.svg.twig' with { class: 'w-4 h-4' } %} </span> <span class="text-sm tracking-wide uppercase font-headline"> {{ 'profile.jockey.club'|trans }} </span> </div> {% endif %} {% if profile.avatar and user and user.id is defined and user.id == profile.id %} <div class="absolute inset-0 z-30 items-center justify-center hidden group-hover:flex"> <form action="{{ path('network_profile_crop_avatar_frame') }}" method="POST"> <button type="submit" class="p-2 bg-neutral-100" title="{{ 'avatar-edit'|trans }}"> {% include 'icons/edit.svg.twig' with { class: 'w-4 h-4 text-black' } only %} </button> </form> </div> {% endif %} </div> <div class="flex-1 min-w-0"> <div class="flex flex-col h-full min-w-0 tracking-wide text-white font-headline"> <ul class="flex flex-wrap mb-2 gap-x-3 gap-y-1"> {% for subprofile in profile.profiles.items %} {% if is_primary_profile(profile, subprofile) %} <li class="relative"> <div class="relative z-30 flex items-center md:gap-2 md:p-1 md:px-3"> {% include 'network/profile/components/subprofile_icon.html.twig' with { subprofile: subprofile } only %} <span class="text-sm font-medium tracking-widest text-white uppercase font-headline"> {{ subprofile.identifier|trans }} </span> </div> <div class="absolute inset-0 z-10 hidden pointer-events-none bg-primary-500 md:block"></div> </li> {% else %} <li class="relative"> <div class="relative z-30 flex items-center md:gap-2 md:p-1 md:px-3"> {% include 'network/profile/components/subprofile_icon.html.twig' with { subprofile: subprofile } only %} <span class="text-sm tracking-wide text-white uppercase font-headline"> {{ subprofile.identifier|trans }} </span> </div> <div class="absolute inset-0 z-10 hidden pointer-events-none md:block" style="background-color: {{ profile.color }}"></div> </li> {% endif %} {% endfor %} </ul> {% if profile.name %} <h1 class="text-2xl font-medium leading-tight uppercase md:font-light md:text-4xl lg:text-5xl"> {{ profile.name }} </h1> {% endif %} <p class="text-xl"> @{{ profile.username }} </p> {% if profile.description %} <p> {{ profile.description|u.truncate(300, '...')|nl2br }} </p> {% endif %} {% if profile.languages %} <ul class="flex flex-wrap my-4 gap-x-4 gap-y-1"> {% for language in profile.languages %} {% set name = language|language_name(app.request.locale) %} <li class="flex items-start gap-2" title="{{ name }}"> <img class="w-4 h-4 mt-1 rounded-full md:mt-1" loading="lazy" src="{{ language|language_flag }}" alt="{{ name }}" /> <span>{{ name }}</span> </li> {% endfor %} </ul> {% endif %} </div> </div> </div> </div></div>