templates/network/horse/sections/horse_section_hero.html.twig line 1

Open in your IDE?
  1. {% set background = horse.owner and horse.owner.color ? horse.owner.color : 'bg-primary-500' %}
  2. <div class="relative">
  3.   <div class="absolute top-0 left-0 w-full h-full opacity-75 {{ background }}"
  4.     style="background-color: {{ background }};"></div>
  5.   <div class="container relative z-10 pt-8 pb-5 md:pb-12 md:pt-24 lg:pb-16 lg:pt-32">
  6.     <div class="flex w-full gap-x-3 md:gap-x-7 lg:gap-x-14 gap-y-10">
  7.       <div class="grid items-center flex-none w-16 h-16 grid-cols-4 col-span-9 grid-rows-4 md:w-36 md:h-36 lg:w-56 lg:h-56 lg:col-span-2">
  8.         {% if horse.image is not null or horse.originCountry is null %}
  9.           <div class="flex col-span-4 col-start-1 row-span-4 row-start-1">
  10.             {% include 'component/avatar.html.twig' with {
  11.               avatar: horse.image,
  12.               initials: horse.name|initials,
  13.               size: 'hero',
  14.               rounded: false
  15.             } only %}
  16.           </div>
  17.           <img class="relative self-end object-contain col-start-1 row-start-4 m-px z-60"
  18.             loading="lazy"
  19.             src="https://flagcdn.com/w320/{{ horse.originCountry|lower }}.png"
  20.             alt="{{ horse.originCountry }}"
  21.             title="{{ horse.originCountry|country_name }}" />
  22.         {% else %}
  23.           <div class="flex col-span-4 col-start-1 row-span-4 row-start-1">
  24.             <img class=""
  25.               loading="lazy"
  26.               src="https://flagcdn.com/w320/{{ horse.originCountry|lower }}.png"
  27.               alt="{{ horse.originCountry }}"
  28.               title="{{ horse.originCountry|country_name }}" />
  29.           </div>
  30.         {% endif %}
  31.       </div>
  32.       <div class="grid flex-1 gap-2">
  33.         <div class="flex flex-col tracking-wide text-white font-headline">
  34.           <h1 class="text-2xl font-medium leading-tight uppercase md:font-light md:text-4xl lg:text-5xl">
  35.             {{ horse.displayName }}
  36.           </h1>
  37.           {% set pedigree = horse.modules.pedigree %}
  38.           {% if pedigree and (pedigree.father or pedigree.mother) %}
  39.             <div class="text-xl font-medium uppercase md:font-light md:text-3xl">
  40.               <span>{{ horse.modules.Pedigree.father|default('/') }}</span>
  41.               <span>-</span>
  42.               <span>{{ horse.modules.Pedigree.mother|default('/') }}</span>
  43.             </div>
  44.           {% else %}
  45.             <div class="text-xl font-medium uppercase md:font-light md:text-3xl">
  46.               <span>{{ horse.father|default('/') }}</span>
  47.               <span>-</span>
  48.               <span>{{ horse.mother|default('/') }}</span>
  49.             </div>
  50.           {% endif %}
  51.           <div class="hidden gap-4 my-4 sm:flex">
  52.             {% for item in section_navigation_get() %}
  53.               <a target="_top" href="{{ '#' ~ item.anchor }}" class="btn-sm btn btn-neutral">
  54.                 {{ item.name|trans }}
  55.               </a>
  56.             {% endfor %}
  57.           </div>
  58.         </div>
  59.       </div>
  60.     </div>
  61.   </div>
  62. </div>