{% import "./macros_typography.html.twig" as macrosTypography %}
{% import "./macros_button.html.twig" as macrosButton %}
{% set article = sulu_content_load(content.heroSectionArticle, {'title': 'title', 'url': 'url', 'image': 'image', 'date': 'date'}) %}
<section
class="news-hero-section relative h-auto sm:h-[90vh] lg:h-screen sm:min-h-[600px] bg-white text-blue pt-[88px] lg:pt-28 pb-12 sm:pb-0">
<div class="grid grid-rows-[auto_1fr] lg:grid-rows-none lg:grid-cols-[1fr_2fr] h-full"
section-shade="light">
<div class="relative flex flex-col pl-8 xl:pl-12 pt-8 xl:pt-12 border-r border-gray">
<div class="news-hero-uppertitle uppertitle"
fade
fade-trigger="none">
<i></i>
{{ content.heroSectionSubTitle }}
</div>
<h1 class="news-hero-title h1 mt-6"
split-direction="bottom"
split-trigger="none">
{{ content.heroSectionTitle }}
</h1>
</div>
<div class="relative hidden sm:flex items-end justify-end p-8 xl:p-12 overflow-hidden">
<div class="absolute inset-8 xl:inset-12 overflow-hidden">
{# Image size 1700*1000 #}
{% if article.content.image|length > 0 %}
{% set image = article.content.image.thumbnails['1700x1000'] %}
<img class="news-hero-img w-full h-full object-cover opacity-0 scale-[1.4]"
src="{{ article.content.image.url }}"
alt="News">
{% endif %}
</div>
<div class="news-hero-content relative w-2/3 xl:w-1/2 bg-white z-10 pt-7 pl-12 pb-3 -mr-px -mb-px">
<div class="flex justify-between items-center gap-8"
fade
fade-trigger="none">
<time class="text-sm">
{% set activeLanguage = request.resourceLocatorPrefix|replace({'/': ''}) %}
{% if activeLanguage == 'fr' %}
{{ article.content.date|date('d M, Y')|replace({'Jan': 'Jan', 'Feb': 'Fév', 'Mar': 'Mar', 'Apr': 'Avr', 'May': 'Mai', 'Jun': 'Juin', 'Jul': 'Juil', 'Aug': 'Août', 'Sep': 'Sep', 'Oct': 'Oct', 'Nov': 'Nov', 'Dec': 'Déc'}) }}
{% elseif activeLanguage == 'en' %}
{{ article.content.date|date('d M, Y') }}
{% endif %}
</time>
{% set facebook = article.content.url|getShare %}
{% set linkedin = article.content.url|getShare %}
{% set whatsapp = article.content.url|getShare %}
{% set email = article.content.url|getShare %}
{{ macrosButton.share({
'facebook': {
'url': facebook,
},
'whatsapp': {
'text': 'Oaks Lane',
'url': whatsapp,
},
'linkedin': {
'url': linkedin,
},
'email': {
'title': 'Oaks Lane',
'url': email,
},
})}}
</div>
<a class="group outline-none"
href="{{ sulu_content_path(article.content.url) }}">
{# Title #}
<div class="title text-[2rem] mt-8 group-hover:underline group-focus-visible:underline"
fade
fade-trigger="none">
{{ article.content.title }}
</div>
{# Arrow #}
<div class="relative flex justify-start w-6 h-2 mt-8 overflow-hidden"
fade
fade-trigger="none">
<div
class="flex gap-6 -translate-x-12 group-hover:translate-x-0 group-focus-visible:translate-x-0 duration-500">
<svg class="shrink-0 w-6 h-2 stroke-2">
<use xlink:href="#arrow-next"></use>
</svg>
<svg class="shrink-0 w-6 h-2 stroke-2">
<use xlink:href="#arrow-next"></use>
</svg>
</div>
</div>
</a>
</div>
</div>
</div>
</section>