{% extends "site/base.html.twig" %}
{% block title %}ABCM - Détail d'une actualité{% endblock %}
{% block content %}
{% set hasPhoto = (actualite.photo is not empty) %}
<section id="banner" class="z-0 h-80 relative w-full">
<img class="w-full h-full object-cover object-bottom" src="{{ hasPhoto ? ('actualites/'~actualite.photo)|imagine_filter('tm'): asset('/img/tmp/actu-haguenau.jpg') }}" alt="">
<div class="z-10 md:top-40p lg:top-1/3 absolute y-center lg:transform-none sm:left-28 lg:left-24 xl:left-64 text-white
px-8 sm:px-0">
<h1 class="uppercase text-white text-3xl sm:text-4xl leading-8 tracking-wider mb-2">{{ actualite.titre }}</h1>
<p class="uppercase leading-6 text-xl tracking-wider">{{ actualite.date|format_datetime(locale='fr',pattern="d MMMM") }}</p>
</div>
</section>
<section id="detail-actu" class="pb-24 px-8 lg:px-4 xl:px-44 w-full">
<div id="page-type-content" class="flex flex-col">
<div id="text-actu" class="bg-white h-full pt-12 z-10 sm:-mt-20 sm:px-20 rounded-2xl font-body font-semibold tracking-wide leading-7">
{{ actualite.texte |raw }}
</div>
{% if hasPhoto %}
<div class="mt-12 sm:px-20 w-full h-112 lg:h-132">
<img alt="" class="w-full h-full object-contain object-left" src="{{ ('actualites/'~actualite.photo)|imagine_filter('tm') }}">
</div>
{% endif %}
</div>
<div class="w-full sm:px-20 lg:w-auto">
{% set route = (actualite.idCat1.id == '2')?'offres_emploi':'actualites' %}
<a href="{{ path(route) }}" class="btn mt-8 rounded-full transitioning">
{% if (actualite.idCat1.id == '2') %}
{{ 'LG_RETOUR_OFFRES'|trans({'fr':'Retour à la liste des offres d\'emploi'}) }}
{% else %}
{{ 'LG_RETOUR_ACTUALITES'|trans({'fr':'Retour à la liste des actualités'}) }}
{% endif %}
</a>
</div>
</section>
{% endblock %}