{% extends 'FrontBundle/layout.html.twig' %}
{% block title %}{{ app_sitename }} - {{ page.metaTitle }}{% endblock %}
{% block description %}{{ page.metaDescription }}{% endblock %}
{% block extra_class %}native{% endblock %}
{% block menu_min %}969{% endblock %}
{% block menu_max %}2624{% endblock %}
{% block stylesheets %}
<link href="/front/css/owl.carousel.min.css" rel="stylesheet">
<link href="/front/css/owl.theme.default.min.css" rel="stylesheet">
{% endblock %}
{% block json_ld %}
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "WebPage",
"name": "{{ page.metaTitle | escape('js') }}",
"description": "{{ page.metaDescription | escape('js') }}",
"thumbnailUrl": "{{ asset ('/front/img/actu-bg.jpg') }}"
}
</script>
{% endblock %}
{% block body %}
<section class="actu-header" style="background-image: url('/front/img/actu-bg.jpg');">
<div class="content">
<h1>{{ 'actu_title'|tr(tr)|upper|raw }}</h1>
<p>{{ 'actu_subtitle'|tr(tr)|raw }}</p>
</div>
</section>
<section class="actu-header-content">
<div class="content">
<div class="row">
<div class="col-md-6">
<div class="owl-carousel">
{% for post in posts %}
{% if post.slider %}
<div class="item" style="background-image: url('/uploads/posts/{{post.id}}/{{post.getMainImage}}');" href="/{{app.request.locale }}/actualite/{{post.slug}}">
<div class="gradient">
<a href="/{{app.request.locale }}/actualite/{{post.slug}}" class="title mb-2">{{post.metaTitle}}</a>
<span class="preview mb-5">{{post.metaDescription}}</span>
<span class="date">{{post.dateStr(app.request.locale)}}</span>
<span class="time">{{post.timeRead(app.request.locale)}}</span>
<span class="author">RP</span>
</div>
</div>
{% endif %}
{% endfor %}
</div>
</div>
<div class="col-md-6 pinned">
{% set counter = 1 %}
{% for post in posts %}
{% if post.pinned and counter < 3 %}
<div class="post">
<div class="img" style="background-image: url('/uploads/posts/{{post.id}}/{{post.getMainImage}}');" href="/{{app.request.locale }}/actualite/{{post.slug}}"></div>
<a href="/{{app.request.locale }}/actualite/{{post.slug}}" class="title mb-2">{{post.metaTitle}}</a>
<span class="preview mb-5">{{post.metaDescription}}</span>
<div class="desc">
<span class="date">{{post.dateStr(app.request.locale)}}</span>
<span class="time">{{post.timeRead(app.request.locale)}}</span>
<span class="author">RP</span>
</div>
</div>
{% set counter = counter + 1 %}
{% endif %}
{% endfor %}
</div>
</div>
</div>
<a href="#a-la-une" class="next-arrow mb-0"><img src="/front/img/espaces-arrow-bk-l.svg" alt="suivant" /></a>
</section>
<section class="actu-content featured pt-5 mt-5" id="a-la-une">
<div class="content">
<h2 id="">{{ 'actu_title2'|tr(tr)|upper|raw }}</h2>
</div>
<div class="slider">
<div class="owl-carousel">
{% for post in posts %}
{% if post.featured %}
<div class="item">
<a href="/{{app.request.locale }}/actualite/{{post.slug}}">
<div class="img" style="background-image: url('/uploads/posts/{{post.id}}/{{post.getMainImage}}');" href="/{{app.request.locale }}/actualite/{{post.slug}}"></div>
</a>
<div class="desc">
<span class="date">{{post.dateStr(app.request.locale)}}</span>
<span class="time">{{post.timeRead(app.request.locale)}}</span>
<span class="author">RP</span>
</div>
<a href="/{{app.request.locale }}/actualite/{{post.slug}}" class="title">{{post.metaTitle}}</a>
</div>
{% endif %}
{% endfor %}
</div>
</div>
</section>
<section class="actu-content news">
<div class="content mt-5 pt-5">
<h2 class="mb-5 no-bar">{{ 'actu_title3'|tr(tr)|upper|raw }}<span class="full-bar"></span></h2>
<div class="pt-5">
{% for post in posts %}
<div class="post mt-5 row {{ (loop.index > 3) ? 'hidden' : '' }}">
<div class="col-md-3">
<div class="img" style="background-image: url('/uploads/posts/{{post.id}}/{{post.getMainImage}}');" href="/{{app.request.locale }}/actualite/{{post.slug}}"></div>
</div>
<div class="col-md-9">
<a href="/{{app.request.locale }}/actualite/{{post.slug}}" class="title">{{post.metaTitle}}</a>
<span class="preview">{{ post.contentPreview|raw }}</span>
<div class="desc">
<span class="date">{{post.dateStr(app.request.locale)}}</span>
<span class="time">{{post.timeRead(app.request.locale)}}</span>
<span class="author">RP</span>
</div>
</div>
</div>
{% endfor %}
</div>
<a href="#" class="mt-5 load">{{ 'actu_load'|tr(tr)|raw }}</a>
</div>
</section>
<section class="actu-content newsletter" style="margin-bottom: 180px;">
<div class="content mt-5 pt-5">
<h2 class="mb-5 no-bar">{{ 'newsletter_title'|tr(tr)|upper|raw }}<span class="full-bar"></span></h2>
<div class="pt-5">
<form>
<p class="title">{{ 'newsletter_subtitle'|tr(tr)|raw }}</p>
<p class="desc">{{ 'newsletter_desc'|tr(tr)|raw }}</p>
<div class="email-input">
<input type="text" value="" placeholder="{{ 'newsletter_email'|tr(tr)|raw }}" class="email mt-3" />
<a href="#" class="register"> </a>
</div>
<div class="row">
<div class="col-12 mt-4">
<input type="checkbox" id="confirm" class="apple-switch" checked="checked" />
<label for="confirm">{{ 'newsletter_agree'|tr(tr)|raw }}</label>
<p class="text-center mt-4" id="message_newsletter"></p>
</div>
</div>
</form>
</div>
</div>
</section>
{% include 'FrontBundle/Partial/footer.html.twig' %}
{% endblock %}
{% block javascripts %}
<script src="/front/js/owl.carousel.min.js"></script>
<script type="text/javascript">
$( document ).ready(function() {
$('.actu-header-content .item').on('click', function(){
window.location.href = $(this).attr('href');
});
$('.actu-content.featured .img').on('click', function(){
window.location.href = $(this).attr('href');
});
$('.actu-header-content .pinned .img').on('click', function(){
window.location.href = $(this).attr('href');
});
$('.actu-content.news .img').on('click', function(){
window.location.href = $(this).attr('href');
});
$('.actu-content.news a.load').on('click', function(e){
e.preventDefault();
$('.actu-content.news .hidden').css("display", "flex").hide().fadeIn();
$(this).fadeOut();
});
$('.actu-content.newsletter .register').on('click', function(e){
e.preventDefault();
console.log('register')
});
});
$('.actu-header-content .owl-carousel').owlCarousel({
loop:true,
margin:0,
nav:false,
dots:true,
autoplay:true,
responsive:{
0:{
items:1
},
600:{
items:1
},
1920:{
items:1
}
}
});
$('.actu-content.featured .owl-carousel').owlCarousel({
loop:false,
margin:95,
nav:true,
dots:false,
responsive:{
0:{
items:1
},
768:{
items:2
},
1920:{
items:3
}
}
});
</script>
{% endblock %}