templates/Default/macros.html.twig line 18
{% macro article(o,last = false,home = false) %}
<article class="new w100 {{desktop('bottom-70')}} {{mobile('bottom-30')}}">
<div class="flex row w100 {{desktop('bottom-70')}} {{mobile('bottom-30')}}">
<div class="third {{desktop('')}} {{mobile('')}}" >
<figure class="relative w100 hoverflow mrect {{desktop('')}} {{mobile('')}}" >
<img src='{{asset(o.banner ? o.banner.thumbnail? o.banner.thumbnail: o.banner.file : "images/armoiries.jpg")}}' class="cover">
</figure>
<div class="flex row space">
<i class="third"></i>
<div class="w100 right bg-success top-10-in {{desktop("")}} {{mobile("")}}"><span class="top-2-in {{desktop("")}} {{mobile("")}}"></span></div>
</div>
</div>
<div class="flex col space {{desktop('left-70 left-2-in')}} {{mobile('')}}">
<div class="h100 {{desktop('bottom-50 bottom-2-in')}} {{mobile('bottom-20-in')}}">
<div class="flex row middle {{desktop('bottom-25')}} {{mobile('bottom-15')}}">
<div class="p-alt flex row middle upper {{desktop('right-30 right-5-in')}} {{mobile('right-20')}}">
<i class="circle bg-warning {{desktop('padding-4 right-10')}}{{mobile('padding-3 right-5')}}"></i>
<time class="warning">{{o.date ? o.date|frdate}}</time>
</div>
<div class="p-alt flex row middle ">
<i class="circle bg-warning {{desktop('padding-4 right-10')}}{{mobile('padding-3 right-5')}}"></i>
<span class="upper warning">{{o.category.name}}</span>
</div>
</div>
<h3 class="success bold flex row {{desktop('h2 bottom-15 right-40-in')}} {{mobile('bottom-8')}}">
<a href="{{url('article',{'id': o.id,'slug': o.slug})}}" class="{{desktop('lh-3x')}} {{mobile('lh-10x')}}">{{o.title}}</a>
</h3>
{%if o.description%}<p class="h4 success medium {{desktop('')}} {{mobile('')}}">{{o.description|raw}}</p>{%endif%}
</div>
<div class="flex row space w100">
<a href="{{url('article',{'id': o.id,'slug': o.slug})}}" class='flex row middle extrabold {{desktop("")}} {{mobile("")}}'>
<span class='p warning upper {{desktop("")}}{{mobile("")}}'>+ Lire l'article</span>
</a>
</div>
</div>
</div>
{%if not last %}<div class="w100 bg-success top-1-in"></div>{%endif%}
</article>
{% endmacro %}
{% macro video(o, alt = false) %}
<article class="video relative flex col success {{desktop('third-40 vt-25')}} {{mobile('w100 vt-15')}}">
<figure class="relative shadow w100 hoverflow mrect scale-hover-img {{desktop('')}} {{mobile('')}}">
<img class="cover transition" src="{{asset(o.banner ? o.banner.thumbnail : o.youtube ? o.youtube|youtubeThumbnail : 'images/about.jpg')}}" alt="{{o.title}}">
<div class="absolute fill top left">
<a class="relative fill flex col middle center hover scale-hover mask-alt transition" href='{{path("video",{id:o.id})}}'>
<i class="h1 fa fa-play-circle white relative {{desktop('')}}{{mobile('')}}">
</i>
</a>
</div>
</figure>
<h3 class="p {{not alt ? 'black' : 'white'}} {{desktop('medium top-10')}} {{mobile('medium top-10')}}">{{o.title}}</h3>
</article>
{% endmacro %}
{% macro event(o, home=true) %}
<div class="shadow bg-white black border-bottom border-solid border-success {{desktop((home ? 'w100' : 'half-25 ')~' flex row vt-20 padding-25 border-8x')}} {{mobile('w100 vt-10 padding-15 border-5x')}}">
<figure class="relative hoverflow shadow-alt {{mobile('mrect')}}" {%if isDesktop() %} style="width : 11.67vw; height: 11.09375vw; min-width : 11.67vw; min-height: 11.09375vw;"{%endif%}>
<img src='{{asset(o.banner ? o.banner.thumbnail ? o.banner.thumbnail : o.banner.file : "images/armoiries.png")}}' class="{{o.banner ? "cover" : "contain"}}">
</figure>
<div class="flex col {{desktop('left-20 left-6-in')}} {{mobile('top-10')}}">
<h4 class="p h100 success-alt {{desktop('')}} {{mobile('')}}">{{o.name}}</h4>
<div class="bottom top-10">
<div class="">
<span class="block p-alt">Date :</span>
<span class="block medium p">{{o.startDate ? o.startDate|frdate}} {{o.endDate ? " au "~o.endDate|frdate}} </span>
</div>
{%if o.place %}
<div class="top-10">
<span class="block p-alt">Lieu :</span>
<span class="block medium p">{{o.place}}</span>
</div>
{%endif%}
</div>
</div>
</div>
{% endmacro %}
{% macro ministries(o) %}
<div class="relative {{desktop('half-40 vt-40')}} {{mobile('w100 vt-20')}}">
<div class="absolute fill flex col">
<div class="vt-40-in bg-white"></div>
<div class="h100 bg-gradient {{desktop('radius-top-20')}} {{mobile('radius-top-15')}}"></div>
</div>
<div class="relative w100 flex col left {{desktop('hz-50-in')}} {{mobile('hz-25-in')}}">
<figure class="relative bg-gray ministries-fig {{desktop('padding-5')}} {{mobile('padding-5')}}" >
<img src='{{asset(o.logo ? o.logo.thumbnail)}}' class="h100 {{desktop('')}} {{mobile('')}}">
</figure>
</div>
<div class="relative {{desktop('top-30-in hz-50-in')}} {{mobile('top-15-in hz-25-in')}}">
<div class="">
<span class="block upper medium white {{desktop('p-alt')}} {{mobile('p-alt')}} ">MINISTRE :</span>
<span class="block bold white {{desktop('h6')}} {{mobile('p')}}">{{o.director}}</span>
</div>
<div class="{{desktop('flex row space')}}">
<div class="">
<span class="block medium upper white p-alt {{desktop('p top-30')}} {{mobile('top-15')}} ">SIGLE :</span>
<span class="block bold white {{desktop('h6')}} {{mobile('p')}}">{{o.abbreviation}}</span>
</div>
{%if o.website %}
{% set website = o.website|split("https://") %}
<div class="">
<span class="block medium upper white p-alt {{desktop('top-30')}} {{mobile('top-15')}} ">SITE WEB :</span>
<span class="block bold white {{desktop('h6')}} {{mobile('p')}}">{{o.website}}</span>
</div>
{%endif%}
</div>
<div class="flex row bottom right" style="transform: translateY(50%);">
<a href="{{o.website}}" title="En savoir plus" class="circle bg-gradient border border-white {{desktop('border-7x padding-30')}} {{mobile('padding-10 border-3x')}}">
<span class="fa fa-eye white {{desktop('h2')}} {{mobile('p')}}"></span>
</a>
</div>
</div>
</div>
{% endmacro %}
{% macro members(o) %}
<article class="relative flex row {{desktop('third-30 bottom-80')}} {{mobile('w100 bottom-30')}}">
<div class="absolute fill flex col">
<div class="hhalf bg-white"></div>
<div class="h100 bg-gradient {{desktop('radius-top-20')}} {{mobile('radius-top-15')}}"></div>
</div>
<div class="relative w100 flex col space {{desktop('hz-25-in bottom-25-in hz-5 bottom-5')}} {{mobile('padding-20')}}">
<div class="h100 {{desktop('')}} {{mobile('')}}">
<figure class="relative hoverflow members-fig flex row {{desktop('')}} {{mobile('')}}" >
<img src='{{asset(o.directorPicture ? o.directorPicture.thumbnail ? o.directorPicture.thumbnail : o.directorPicture.file)}}' class="h100 {{desktop('')}} {{mobile('')}}">
</figure>
<div class="">
<h4 class="bold white {{desktop('top-30 bottom-20')}} {{mobile('top-15 bottom-10')}} ">{{o.director}}</h4>
<span class="p block medium white {{desktop('')}} {{mobile('')}}">{{o.directorTitle}}</span>
</div>
</div>
<div class="flex {{desktop('row top-20')}} {{mobile('col top-20')}}">
<a href="" class="bg-warning medium white {{desktop('vt-15-in hz-25-in right-25 radius-5')}} {{mobile('text-center vt-10-in hz-20-in radius-3')}}">Biographie</a>
<div class="flex row middle {{desktop('left-20')}} {{mobile('top-10')}}">
<a class='icon h5 flex row middle center bg-white success circle {{desktop("")}} {{mobile("")}}' href='{{o.directorFacebook}}' target="_blank" title="Compte Facebook"><i class="fab fa-facebook-f"></i></a>
<a class='icon h5 flex row middle center bg-white success circle {{desktop("left-10")}} {{mobile("left-5")}}' href='{{o.directorTwitter}}' target="_blank" title="Compte Twitter"><i class="fab fa-twitter"></i></a>
<a class='icon h5 flex row middle center bg-white success circle {{desktop("left-10")}} {{mobile("left-5")}}' href='{{o.directorTwitter}}' target="_blank" title="Compte LinkedIn"><i class="fab fa-linkedin"></i></a>
</div>
</div>
</div>
</article>
{% endmacro %}
{% macro membersOld(o,index,length) %}
<article class="{{desktop(not index ? 'flex row center w100' : 'flex row space half')}} top-60 {{mobile('w100 bottom-40')}} transition-1s anim-scroll {{index is even ? 'anim-from-right' : 'anim-from-left'}}">
<div class="{{not index and isDesktop() ? 'half' : 'w100'}}" {% if index is even and index and isDesktop() %} style="transform: translateY(20%);" {%endif%}>
<div class=" w100 flex row relative {{index is even and index ? 'reverse' : 'center'}}" >
<div class="relative {{mobile('fill')}}" {%if isDesktop() %}style="min-width: calc(100% - var(--content-margin)); width: calc(100% - var(--content-margin));" {%endif%}>
<div class="bg-gradient relative flex col center {{desktop('radius-top-20 hz-40-in vt-40-in')}} {{mobile('flex col radius-top-15 padding-10')}}">
<figure class="relative members-fig hoverflow flex row center {{desktop('half-40')}} {{mobile('')}}" >
<img src='{{asset(o.picture ? o.picture.thumbnail)}}' class="contain {{desktop('')}} {{mobile('')}}">
</figure>
<div class="w100 text-center {{desktop('top-20')}} {{mobile('top-10')}}">
<div class="">
<h4 class="bold white {{desktop('')}} {{mobile('')}} ">{{o.title? o.title~" "~o.fName~" "~o.lName : o.fName~" "~o.lName}}</h4>
<span class="block warning bold {{desktop('h5 top-7')}} {{mobile('')}}">{{o.startAt ? o.startAt|frmonth(o.startAt,1)|capitalize~" "~o.startAt|date('Y')}} - {{o.endAt ? o.endAt|frmonth(o.endAt,1)|capitalize~" "~o.endAt|date('Y') : 'ce jour'}}</span>
</div>
{% if o.startAt %}
<div class="white {{desktop('vt-15')}} {{mobile('vt-10')}}">
<span class="p-alt block {{desktop('')}} {{mobile('')}}">Prise de pouvoir :</span>
<span class="block bold {{desktop('h6')}} {{mobile('p')}}">{{o.startAt|frdate}}</span>
</div>
{%endif%}
{% if o.profession %}
<div class="white {{desktop('')}} {{mobile('')}}">
<span class="p-alt block {{desktop('')}} {{mobile('')}}">Pouvoir :</span>
<span class="block bold {{desktop('h6')}} {{mobile('p')}}">{{o.profession}}</span>
</div>
{%endif%}
</div>
</div>
</div>
{%if index and isDesktop() %}
<div class="gwidth flex col">
<i class="h100 {{index is odd ? 'border border-1x border-notop border-noleft' : 'border border-1x border-notop border-noleft border-noright'}}"></i>
{% if length is even and index == (length - 1) %}
<i class="hquarter"></i>
{%else%}
{#<i class="hquarter border {{index is even ? 'border border-1x border-notop border-nobottom border-noleft border-noright' : 'border-1x border-notop border-noright '}}" {% if index is odd %} style="transform: translateX(50%);" {%endif%}></i>#}
<i class="hquarter {{index is even ? 'border border-1x border-notop border-nobottom border-noleft border-noright' : 'noborder flex row right '}}" >
{%if index is odd %}
<i class="half border border-1x border-notop border-noright '}}" >
</i>
{%endif%}
</i>
{%endif%}
</div>
{%endif%}
</div>
</div>
</article>
{% endmacro %}
{% macro partner(o) %}
<article class="bg-white shadow-alt {{desktop('w100 flex row space middle padding-40 bottom-60')}} {{mobile('w100 flex col reverse hz-20-in bottom-40')}}">
<div class="{{desktop('left-20 vt-30 right-80-in')}} {{mobile('vt-15')}}">
<div class="h100">
<h3 class="gradient {{desktop('h2')}} {{mobile('h4')}}">{{o.name}}</h3>
<div class="w100 top-30 {{desktop('')}} {{mobile('')}}">
<article class="article {{desktop('h4')}} {{mobile('p')}}">{{o.description|raw}}</article>
</div>
</div>
<div class='flex row middle {{desktop("h4 top-60")}} {{mobile("p top-15")}}'>
<a href="" target="_blank" class='bg-gradient white {{desktop("vt-20-in hz-40-in ")}}'>
Aller sur le site
<i class="fa fa-link white {{desktop('left-8')}} {{mobile('left-5')}}"></i>
</a>
</div>
</div>
<div class="quarter">
<figure class='w100 relative hoverflow' style="height: 12vw;">
<img src="{{asset(o.logo ? o.logo.thumbnail ? o.logo.thumbnail : o.logo.file)}}" class='contain {{desktop("")}} {{mobile("")}}' />
{#<img src="{{asset(o.logo)}}" class='contain {{desktop("")}} {{mobile("")}}' />#}
</figure>
</div>
</article>
{% endmacro %}
{% macro structure(o, alt = false) %}
<article class="bg-gray-alt {{desktop('flex row vt-25-in hz-25-in radius-20 top-40')}} {{mobile('w100 hz-20-in radius-10 bottom-40')}}">
{%if isDesktop() %}
<figure class='structure-fig relative hoverflow'>
<img src="{{asset(o.directorPicture ? o.directorPicture : 'images/armoiries.png')}}" class='contain {{desktop("radius-20")}} {{mobile("radius-10")}}' />
</figure>
{%endif%}
<div class="{{desktop('left-20 vt-30')}} {{mobile('vt-15')}}">
<h3 class="success">{{o.name}}({{o.abbreviation}})</h3>
<div class="top-30 {{desktop('gright-in')}} {{mobile('')}}">
<div class="{{desktop('')}} {{mobile('')}}">
<span class="block success p-alt medium upper">Directeur</span>
<span class="block success bold {{desktop('h4')}} {{mobile('p')}}">{{o.director}}</span>
</div>
{% if o.content %}
<div class="w100 top-30 {{desktop('')}} {{mobile('')}}">
<span class="block success p-alt medium upper">Mission</span>
<article class="article success semibold text-justify {{desktop('h4')}} {{mobile('p')}}">{{o.content|raw}}</article>
</div>
{% endif %}
{#{% if o.phone %}
<span class='flex row middle vt-15-in hz-20-in white semibold shadow radius-15 bg-white left-20'>
<i class="fa fa-phone h5 success-alt"></i>
</span>
{% endif %}
{% if o.email %}
<span class='flex row middle vt-15-in hz-20-in white semibold shadow radius-15 bg-white left-20'>
<i class="fa fa-envelope h5 success-alt"></i>
</span>
{% endif %}#}
</div>
</div>
</article>
{% endmacro %}
{% macro project(o,last=false, home = false) %}
<article class="new w100 {{desktop('bottom-70')}} {{mobile('bottom-30')}}">
<div class="flex row w100 {{desktop('bottom-70')}} {{mobile('bottom-30')}}">
<div class="half {{desktop('')}} {{mobile('')}}" >
<figure class="relative w100 hoverflow mrect {{desktop('')}} {{mobile('')}}" >
<img src='{{asset(o.banner.thumbnail)}}' class="cover">
</figure>
</div>
<div class=" flex col space {{desktop('left-70 left-2-in')}} {{mobile('')}}">
<div class="h100 {{desktop('')}} {{mobile('')}}">
<div class="{{desktop('bottom-25')}} {{mobile('bottom-15')}}">
{#<div class="flex row middle bottom-15 {{desktop('')}} {{mobile('')}}">
<svg class="icon min" viewBox="0 0 20 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M10.0001 0.333374C7.54081 0.333251 5.18088 1.30376 3.4332 3.03396C1.68552 4.76417 0.691341 7.11423 0.666748 9.57337C0.666748 15.9667 8.89175 23.0834 9.24175 23.3867C9.45307 23.5675 9.722 23.6668 10.0001 23.6668C10.2782 23.6668 10.5471 23.5675 10.7584 23.3867C11.1667 23.0834 19.3334 15.9667 19.3334 9.57337C19.3088 7.11423 18.3146 4.76417 16.567 3.03396C14.8193 1.30376 12.4593 0.333251 10.0001 0.333374ZM10.0001 13.1667C9.19248 13.1667 8.403 12.9272 7.7315 12.4785C7.06 12.0299 6.53663 11.3921 6.22757 10.646C5.91852 9.89987 5.83765 9.07884 5.99521 8.28675C6.15276 7.49467 6.54167 6.76709 7.11273 6.19602C7.68379 5.62496 8.41137 5.23606 9.20346 5.0785C9.99555 4.92094 10.8166 5.00181 11.5627 5.31087C12.3088 5.61992 12.9466 6.14329 13.3953 6.8148C13.8439 7.4863 14.0834 8.27577 14.0834 9.08337C14.0834 10.1663 13.6532 11.205 12.8874 11.9707C12.1217 12.7365 11.083 13.1667 10.0001 13.1667Z" fill="#1F4878"/>
</svg>
<span class="left-15 p medium upper white">{{o.place}}</span>
</div>
<div class="flex row middle bottom-15 {{desktop('')}} {{mobile('')}}">
<svg class="icon min" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M10.5 15.1667H10.4405C10.1469 15.1667 9.86525 15.05 9.65761 14.8424C9.44998 14.6348 9.33333 14.3531 9.33333 14.0595C9.33333 13.7501 9.21042 13.4533 8.99162 13.2345C8.77283 13.0157 8.47609 12.8928 8.16667 12.8928C7.85725 12.8928 7.5605 13.0157 7.34171 13.2345C7.12292 13.4533 7 13.7501 7 14.0595C7 14.972 7.36248 15.8471 8.0077 16.4923C8.65292 17.1375 9.52802 17.5 10.4405 17.5H10.5V18.6667C10.5 18.9761 10.6229 19.2728 10.8417 19.4916C11.0605 19.7104 11.3572 19.8333 11.6667 19.8333C11.9761 19.8333 12.2728 19.7104 12.4916 19.4916C12.7104 19.2728 12.8333 18.9761 12.8333 18.6667V17.5C13.7616 17.5 14.6518 17.1313 15.3082 16.4749C15.9646 15.8185 16.3333 14.9283 16.3333 14C16.3333 13.0717 15.9646 12.1815 15.3082 11.5251C14.6518 10.8687 13.7616 10.5 12.8333 10.5V8.16667H12.859C13.489 8.16667 14 8.67767 14 9.30767C14 9.61709 14.1229 9.91383 14.3417 10.1326C14.5605 10.3514 14.8572 10.4743 15.1667 10.4743C15.4761 10.4743 15.7728 10.3514 15.9916 10.1326C16.2104 9.91383 16.3333 9.61709 16.3333 9.30767C16.3333 8.38622 15.9673 7.50251 15.3157 6.85094C14.6642 6.19938 13.7805 5.83333 12.859 5.83333H12.8333V4.66667C12.8333 4.35725 12.7104 4.0605 12.4916 3.84171C12.2728 3.62292 11.9761 3.5 11.6667 3.5C11.3572 3.5 11.0605 3.62292 10.8417 3.84171C10.6229 4.0605 10.5 4.35725 10.5 4.66667V5.83333C10.0404 5.83333 9.58525 5.92386 9.16061 6.09975C8.73597 6.27565 8.35013 6.53345 8.02513 6.85846C7.70012 7.18346 7.44231 7.5693 7.26642 7.99394C7.09053 8.41858 7 8.87371 7 9.33333C7 9.79296 7.09053 10.2481 7.26642 10.6727C7.44231 11.0974 7.70012 11.4832 8.02513 11.8082C8.35013 12.1332 8.73597 12.391 9.16061 12.5669C9.58525 12.7428 10.0404 12.8333 10.5 12.8333V15.1667ZM12.8333 15.1667V12.8333C13.1428 12.8333 13.4395 12.9562 13.6583 13.175C13.8771 13.3938 14 13.6906 14 14C14 14.3094 13.8771 14.6062 13.6583 14.825C13.4395 15.0437 13.1428 15.1667 12.8333 15.1667ZM10.5 8.16667V10.5C10.1906 10.5 9.89383 10.3771 9.67504 10.1583C9.45625 9.9395 9.33333 9.64275 9.33333 9.33333C9.33333 9.02391 9.45625 8.72717 9.67504 8.50838C9.89383 8.28958 10.1906 8.16667 10.5 8.16667ZM11.6667 23.3333C5.22317 23.3333 0 18.1102 0 11.6667C0 5.22317 5.22317 0 11.6667 0C18.1102 0 23.3333 5.22317 23.3333 11.6667C23.3333 18.1102 18.1102 23.3333 11.6667 23.3333Z" fill="#1F4878"/>
</svg>
<span class="left-15 p medium upper white">{{o.cost}}</span>
</div>
<div class="flex row middle bottom-15 {{desktop('')}} {{mobile('')}}">
<svg class="icon min" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M11.6667 0C5.23367 0 0 5.23367 0 11.6667C0 18.0997 5.23367 23.3333 11.6667 23.3333C18.0997 23.3333 23.3333 18.0997 23.3333 11.6667C23.3333 5.23367 18.0997 0 11.6667 0ZM15.5085 17.1582L10.5 12.1497V4.66667H12.8333V11.1837L17.1582 15.5085L15.5085 17.1582Z" fill="#1F4878"/>
</svg>
<span class="left-15 p medium upper white">{{o.runtime}}</span>
</div>#}
<div class="flex row middle bottom-15 {{desktop('')}} {{mobile('')}}">
<svg class="icon min" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M22.5047 7.31153L14.8266 15.074L8.73282 8.98028L14.1609 3.55684L13.5047 2.94325C13.1063 2.50403 12.3938 2.50403 11.9531 2.94325L7.87969 6.93653C7.48125 7.41465 6.76875 7.41465 6.32813 6.93653C5.89219 6.53809 5.89219 5.82559 6.32813 5.38496L10.3641 1.35231C11.6813 0.0343242 13.8188 0.0343242 15.1359 1.35231L15.75 1.9659L16.4531 1.26137C18.1359 -0.420457 20.8641 -0.420457 22.5047 1.26137C24.2297 2.94325 24.2297 5.6709 22.5047 7.31153ZM10.7578 19.1428C8.50782 21.3928 5.63907 22.9256 2.51719 23.549L1.34579 23.7834C0.976879 23.8584 0.595317 23.7412 0.329536 23.4365C0.0635669 23.2115 -0.0518862 22.8318 0.0218481 22.4615L0.256176 21.2896C0.880317 18.1678 2.415 15.299 4.66594 13.049L7.67344 10.0397L13.7672 16.1334L10.7578 19.1428Z" fill="#1F4878"/>
</svg>
<span class="left-15 p medium upper white">{{"En cours d'exécution"}}</span>
</div>
</div>
<h3 class="white bold flex row {{desktop('h2 bottom-15')}} {{mobile('bottom-8')}}">
<a class="{{desktop('lh-3x')}} {{mobile('lh-10x')}}">{{o.name}}</a>
</h3>
</div>
<div class="flex row space w100">
<a href="{{url('project',{'id': o.id,'slug': o.slug})}}" class='flex row middle extrabold {{desktop("")}} {{mobile("")}}'>
<span class='p white upper {{desktop("")}}{{mobile("")}}'>+ Lire le projet</span>
</a>
</div>
</div>
</div>
{%if not last %}<div class="w100 bg-white top-1-in"></div>{%endif%}
</article>
{% endmacro %}
{% macro service(o, index, alt = false) %}
<article class="relative service pole-mask {{desktop('quarter-10')}} {{mobile('w100 bottom-20')}} {{index==2? 'hz-10'}}">
<div class="service-fig flex row space relative">
<i class="w100"></i>
{# <span class="nopadding h100 bold warning right {{desktop('')}} {{mobile('')}}" style="opacity:.3;font-size : 12.39583vw;line-height: 71%;" >{{0~index}}</span> #}
<div class="w100 h100 absolute left top {{desktop('')}} {{mobile('mrect')}}">
<img src='{{asset(index==1 ? "images/pole1.jpg" : index==2 ? "images/pole2.jpg" : "images/pole3.jpg")}}' class="cover">
</div>
</div>
<div class="flex col space {{desktop('left-50-in right-15-in top-60-in top-6 bottom-50-in')}} {{mobile('hz-30-in top-30-in bottom-25-in')}}">
<h3 class="h100 success {{desktop('bottom-70-in bottom-8')}} {{mobile('h3')}}"><span class="{{desktop('lh-3x')}} ">{{o.title}}</span></h3>
<a href="{{url('service',{'id': o.id,'slug': o.slug})}}" class="bottom success p upper extrabold {{desktop('')}} {{mobile('')}}">+ En savoir plus</a>
</div>
</article>
{#<article class="relative service bg-success {{desktop('third-5')}} {{mobile('w100 bottom-20')}}">
<div class="service-fig flex row space relative">
<i class="w100"></i>
<span class="nopadding h100 success bold right {{desktop('')}} {{mobile('')}}" style="font-size : 18.59375vw;line-height: 71%; color: #183C66;" >{{0~index}}</span>
<figure class="h100 absolute left top {{desktop('')}} {{mobile('')}}">
<img src='{{asset(index==1 ? "images/pole1.jpg" : index==2 ? "images/pole2.jpg" : "images/pole3.jpg")}}' class="cover">
</figure>
</div>
<div class="flex col space {{desktop('left-50-in left-2 right-80 right-15-in top-60-in top-6 bottom-50-in')}} {{mobile('hz-30-in top-30-in bottom-25-in')}}">
<h3 class="h100 white {{desktop('h2 lh-10x bottom-70-in bottom-8')}} {{mobile('h3')}}">{{o.title}}</h3>
<a href="{{url('service',{'id': o.id,'slug': o.slug})}}" class="bottom white p upper extrabold {{desktop('')}} {{mobile('')}}">+ En savoir plus</a>
</div>
</article>#}
{% endmacro %}
{% macro opportunity(o, type=false, home = false) %}
{% if home %}
<a href="{{url('opportunity',{'id': o.id,'slug': o.slug})}}" class="relative opportunity {{desktop(home ? 'third-5' : 'half-40 bottom-60')}} {{mobile('w100 bottom-20')}}">
{%else%}
<article class="relative opportunity {{desktop(home ? 'third-5' : 'third-20 bottom-60')}} {{mobile('w100 bottom-20')}}">
{%endif%}
<figure class="fill absolute left top {{desktop('')}} {{mobile('')}}">
<img src='{{asset("images/emp1.jpg")}}' class="cover">
<div class="relative fill job-mask"></div>
</figure>
<div class="fill relative top-25-in {{desktop(home ? 'hz-30-in top-4 bottom-80-in' : 'hz-30-in top-4 bottom-60-in')}} {{mobile('hz-20-in bottom-30-in')}}">
{%if o.closingDate %}
<div class="flex row middle">
<svg class="icon min" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 0.333252C5.56699 0.333252 0.333328 5.56692 0.333328 11.9999C0.333328 18.4329 5.56699 23.6666 12 23.6666C18.433 23.6666 23.6667 18.4329 23.6667 11.9999C23.6667 5.56692 18.433 0.333252 12 0.333252ZM15.8418 17.4914L10.8333 12.4829V4.99992H13.1667V11.5169L17.4915 15.8418L15.8418 17.4914Z" fill="white"/>
</svg>
<span class="white upper h6 left-10 left-3-in">{{o.closingDate|date("m/d/Y H:i") >= "now"|date("m/d/Y H:i") ? "En cours" : "Clôturé" }}</span>
</div>
{%endif%}
<div class="{{desktop(not type ? 'hz-25-in hz-2 top-70-in top-3 bottom-3' :'top-70-in top-3 bottom-3')}} {{mobile('top-30-in bottom-25-in')}}">
{%if not type%}
<div class="{{desktop('flex row middle')}} {{mobile('')}}">
{%if o.closingDate %}
<div class="flex row middle bottom-9 {{desktop('right-25 right-2-in')}} {{mobile('bottom-15')}}">
<span class="iflex bg-white radius-half right-8 {{desktop('padding-10')}} {{mobile('padding-5')}}"></span>
<span class="white upper p">{{o.openingDate|frdate}}</span>
</div>
{%endif%}
<div class="flex row middle bottom-9 {{desktop('')}} {{mobile('')}}">
<span class="iflex bg-white radius-half right-8 {{desktop('padding-10')}} {{mobile('padding-5')}}"></span>
<span class="white upper p">{{o.structure}}</span>
</div>
</div>
{%endif%}
<div class="flex col space">
<h3 class="semibold white h100 {{desktop(home ? 'h3' : 'h3 ')}} {{mobile('h2')}}">{{o.title}}</h3>
{%if not home %}
<div class="flex row {{desktop('top-50 top-5-in')}} {{mobile('top-30')}}">
<a href="{{url('opportunity',{'id': o.id,'slug': o.slug})}}" class="p bg-white success upper {{desktop('extrabold hz-40-in vt-30-in')}} {{mobile('bold hz-20-in vt-15-in')}}"><span class="{{desktop('hz-3-in vt-7-in')}} {{mobile('')}}">En savoir plus</span></a>
</div>
{%endif%}
</div>
</div>
</div>
{%if home %}
</a>
{%else%}
</article>
{%endif%}
{% endmacro %}
{% macro opportunityAlt(o,index) %}
<aside class="job relative flex space border border-warning shadow-alt {{desktop('row w100 vt-20 ')}}{{mobile('col w100 vt-10')}}">
<header class="{{desktop('hz-30-in vt-20-in ')}}{{mobile('hz-25-in vt-10-in ')}}">
<h3 class="">{{o.title}}</h3>
<p class="p">{{o.description|nl2br}}</p>
</header>
<div class="flex bg-gray {{desktop('col third-40 hz-30-in vt-20-in ')}}{{mobile('col hz-25-in vt-10-in ')}}">
<div class="flex col h4">
<span>Type : <span class="success">{{o.type ? o.type.label}}</span></span>
<span>Clôture : <span class="error semibold">{{o.closingDate|frdatetime}}</span></span>
</div>
<div class="flex row middle top-20">
<a href="{{path('opportunity',{id:o.id,slug:o.slug})}}" class="h4 hz-20-in bg-warning white semibold upper radius-25 {{desktop('vt-10-in')}}{{mobile('top-10 vt-8-in')}}">Découvrir</a>
</div>
</div>
</aside>
{% endmacro %}
{% macro doc(o, alt = false) %}
{% set doc = o.document %}
{% set t = doc.target|split(".") %}
{% set ext = t[t|length-1]|upper %}
{% set readLink = path("file-read",{id:doc.id}) %}
{% set downloadLink = path("file-download",{id:doc.id}) %}
{% set action = null %}
{% if doc.mimetype|lower == 'application/pdf' %}
{% set action = 'os-read' %}
{% elseif 'image' in doc.mimetype|lower %}
{% set action = 'os-image' %}
{% elseif 'video' in doc.mimetype|lower %}
{% set action = 'os-video' %}
{% endif %}
{% set alt = isMobile() ? false : alt %}
<div class='bg-gray flex row middle w100 relative border border-2x border-warning {{desktop("vt-20 hz-30-in vt-25-in")}}{{mobile('vt-10 hz-15-in vt-10-in')}}'>
<div class="">
<figure class="relative icon big">
<img src="{{asset(o.cover ? o.cover.thumbnail : 'images/thumbnail.png')}}" class="contain">
</figure>
</div>
<div class='w100 relative left-20'>
<div class="">
<h3 class='black medium lh-1x'><a href="">{{o.title}}</a></h3>
{% if o.description %}
<p class="p-alt-2 {{desktop('h4 vt-15')}} {{mobile('h6 vt-7')}}">{{o.description|nl2br}}</p>
{% endif %}
</div>
<div class="flex row middle right-20">
<div class='p-alt-2 italic flex row middle top-5'>
<span class=''>{{ext}}</span>
<i class="circle padding-2 bg-black hz-10"></i>
<span class=''>{{doc.formatSize}}</span>
<i class="circle padding-2 bg-black hz-10"></i>
<span class=''>{{doc.reading|number_format}} lect.</span>
<i class="circle padding-2 bg-black hz-10"></i>
<span>{{doc.downloads|number_format}} téléch.</span>
</div>
<div class='flex row p-alt upper semibold nowrap'>
{% if action %}
<span data-target="{{path('file-read',{id:doc.id})}}" class='{{action}} flex row bg-success {{desktop("right-10")}} {{mobile("top-7")}}'>
<i class="white flex row middle {{desktop('vt-10-in hz-15-in')}}{{mobile('radius-right-3')}}"><i class="fa fa-eye"></i></i>
</span>
{% endif %}
<a href="{{path('file-download',{id:doc.id})}}" class='flex row bg-warning {{desktop("")}} {{mobile("top-7")}}'>
<span class='white upper {{desktop("vt-10-in hz-20-in")}}'>Télécharger</span>
<i class="white flex row middle shadow {{desktop('vt-10-in hz-15-in')}}{{mobile('radius-right-3')}}"><i class="fa fa-download"></i></i>
</a>
</div>
</div>
</div>
</div>
{% endmacro %}
{% macro biblio(o) %}
{% for doc in o.files %}
{% set action = null %}
{% if doc.mimetype|lower == 'application/pdf' %}
{% set action = 'os-read' %}
{% elseif 'image' in doc.mimetype|lower %}
{% set action = 'os-image' %}
{% elseif 'video' in doc.mimetype|lower %}
{% set action = 'os-video' %}
{% endif %}
<div class='bg-gray flex row middle w100 relative border border-5x border-success bottom-20 hz-25-in vt-15-in {{desktop("")}} {{mobile('radius-8')}}'>
<span class="bg-white padding-15">
<i class="fa fa-file gradient fa-2x"></i>
</span>
<div class='w100 flex row space middle relative left-20'>
<div class="">
<h3 class='black medium p lh-1x'>{{doc.name ? doc.name : doc.source}}</h3>
<div class='p-alt-2 italic flex row middle top-5'>
<span class=''>{{doc.mimetype}}</span>
<i class="circle padding-2 bg-black hz-10"></i>
<span class=''>{{doc.formatSize}}</span>
<i class="circle padding-2 bg-black hz-10"></i>
<span class=''>{{doc.reading|number_format}} lect.</span>
<i class="circle padding-2 bg-black hz-10"></i>
<span>{{doc.downloads|number_format}} téléch.</span>
</div>
</div>
<div class="flex col middle space left-20">
<div class='flex row p-alt upper semibold nowrap'>
{% if action %}
<span data-target="{{path('file-read',{id:doc.id})}}" class='{{action}} flex row bg-gradient-warning {{desktop("radius-3 right-10")}} {{mobile("top-7 radius-3")}}'>
<i class="white flex row middle {{desktop('vt-10-in hz-15-in')}}{{mobile('radius-right-3')}}"><i class="fa fa-eye"></i></i>
</span>
{% endif %}
<a href="{{path('file-download',{id:doc.id})}}" class='flex row bg-gradient {{desktop("radius-3")}} {{mobile("top-7 radius-3")}}'>
<span class='white upper {{desktop("vt-10-in hz-20-in")}}'>Télécharger</span>
<i class="white flex row middle shadow {{desktop('vt-10-in hz-15-in')}}{{mobile('radius-right-3')}}"><i class="fa fa-download"></i></i>
</a>
</div>
</div>
</div>
</div>
{% endfor %}
{% endmacro %}
{% macro page(o) %}
<div class='bg-white vt-20 vt-20-in hz-20-in border border-gray-alt border-notop border-noleft border-noright'>
<h4 class=''>{{o.title}}</h4>
<p class='bottom-10'>{{o.description}}</p>
<a href='{{path("page",{slug:o.slug})}}' class='success bold upper scale-hover transition'>En savoir +</a>
</div>
{% endmacro %}