@php
$hero = get_field('hero');
$featured_article = TemplateHomepage::featured_article();
$layout_type = get_field('home_layout')['home_feed_type'];
@endphp
@if ($hero)
{!! wp_get_attachment_image($hero['hero_image'], 'full') !!}
@if ($hero['hero_text'])
{!! $hero['hero_text'] !!}
@endif
@if ($hero['hero_cta'])
{!! $hero['hero_cta']['title'] !!}
@endif
@endif
@include('partials.cat-menu')
@if ($featured_article !== false)
@switch($featured_article['type'])
@case('last_featured')
@case('specific_article')
@include('partials.featured-post', ['ID' => $featured_article['post']])
@break
@case('custom_content')
@switch($layout_type)
@case('selection')
@include('partials.home-layout-custom')
@break
@default
@include('partials.home-layout-automatic')
@endswitch