Files
dialog-relations-website/packages/base/ContentBlocks/ContentElements/hero/templates/frontend.html

60 lines
3.4 KiB
HTML

<f:layout name="Default" />
<!-- No extra heading from the parent layout -->
<f:section name="Header" />
<f:section name="Main">
<div class="py-12 px-4 max-w-6xl mx-auto">
<div class="flex flex-col items-start lg:grid lg:grid-cols-[1fr_auto_auto] lg:grid-rows-[auto_auto_1fr] lg:gap-x-8 lg:items-start lg:justify-items-start lg:text-left">
<h2 class="text-3xl text-primary mb-0 leading-none lg:text-5xl lg:col-start-1 lg:row-start-1">{data.subheader}</h2>
<h1 class="uppercase text-6xl text-primary leading-none mb-8 lg:text-7xl lg:col-start-1 lg:row-start-2">{data.header}</h1>
<div class="text-base text-gray-700 leading-snug mb-4 max-w-[45ch] lg:text-base lg:max-w-[40ch] lg:mb-6 lg:col-start-1 lg:row-start-3">
<f:format.html>{data.bodytext}</f:format.html>
</div>
<div class="flex gap-2 mb-4 lg:flex-col lg:gap-4 lg:mb-0 lg:items-start lg:self-center lg:col-start-3 lg:row-start-1 lg:row-span-3">
<a href="https://www.instagram.com/lena.ats/" target="_blank" aria-label="Lena Schillings Instagram" class="btn inline-flex items-center justify-center text-base p-4 rounded-full transition duration-300 bg-yellow text-primary hover:bg-primary-light hover:text-white md:p-6 md:text-3xl"><i class="ci ci-instagram"></i></a>
<a href="https://www.tiktok.com/@dieschilling" target="_blank" aria-label="Lena Schillings TikTok" class="btn inline-flex items-center justify-center text-base p-4 rounded-full transition duration-300 bg-yellow text-primary hover:bg-primary-light hover:text-white md:p-6 md:text-3xl"><i class="ci ci-tiktok"></i></a>
</div>
<div class="mt-4 self-end w-full lg:mt-0 lg:flex lg:items-center lg:justify-center lg:col-start-2 lg:row-start-1 lg:row-span-3">
<f:if condition="{data.image}">
<f:then>
<figure>
<!-- WEBP source -->
<source
type="image/webp"
srcset="
{f:uri.image(image:data.image.0, width:'320c', cropVariant:'default', fileExtension:'webp')} 320w,
{f:uri.image(image:data.image.0, width:'768c', cropVariant:'default', fileExtension:'webp')} 768w,
{f:uri.image(image:data.image.0, width:'430c', cropVariant:'default', fileExtension:'webp')} 1024w"
sizes="(max-width: 320px) 80vw,
(max-width: 768px) 80px,
430px" />
<!-- Fallback source -->
<source
srcset="
{f:uri.image(image:data.image.0, width:'320c', cropVariant:'default')} 320w,
{f:uri.image(image:data.image.0, width:'600c', cropVariant:'default')} 600w,
{f:uri.image(image:data.image.0, width:'430c', cropVariant:'default')} 1024w"
sizes="(max-width: 320px) 80vw,
(max-width: 768px) 80vw,
430px" />
<f:image
image="{data.image.0}"
treatIdAsReference="1"
fetchpriority="high"
cropVariant="default"
width="430c"
alt="Hero Image"
loading="lazy"
class="w-full h-auto rounded-lg" />
</figure>
</f:then>
<f:else>
<p>No image available</p>
</f:else>
</f:if>
</div>
</div>
</div>
</f:section>