{% extends 'layout_website.html.twig' %}
{% block title %}FAQ
{% endblock %}
{% block stylesheets %}
{{parent()}}
<style>
.faq {
border-radius: 4px;
margin:2rem 0;
}
.faq .card {
border: none;
background: none;
border-bottom: 1px solid #DADADA;
}
.faq .card .card-header {
padding: 0px;
border: none;
background: none;
-webkit-transition: all 0.3s ease 0s;
-moz-transition: all 0.3s ease 0s;
-o-transition: all 0.3s ease 0s;
transition: all 0.3s ease 0s;
}
.faq .card .card-header:hover {
background: #fffd6a60;
padding-left: 10px;
}
.faq .card .card-header .faq-title {
width: 100%;
text-align: left;
padding: 0px;
padding-left: 5px;
padding-right: 5px;
font-weight: bold;
font-size: 1.2rem;
letter-spacing: 1px;
color: #000;
text-decoration: none !important;
-webkit-transition: all 0.3s ease 0s;
-moz-transition: all 0.3s ease 0s;
-o-transition: all 0.3s ease 0s;
transition: all 0.3s ease 0s;
cursor: pointer;
padding-top: 20px;
padding-bottom: 20px;
display: flex;
align-content: center;
align-items: center;
margin-top: 0;
}
.faq .card .card-header .faq-title .badge {
display: inline-block;
width: 20px;
height: 20px;
line-height: 14px;
float: left;
-webkit-border-radius: 100px;
-moz-border-radius: 100px;
border-radius: 100px;
text-align: center;
background: #337ab7;
color: #fff;
font-size: 12px;
margin-right: 20px;
}
.faq .card .card-body {
padding: 0;
font-weight: 400;
font-size: 16px;
color: #000;
line-height: 28px;
letter-spacing: 1px;
text-align: left;
padding-left: 30px;
padding-right: 30px;
}
.faq .card .card-body p {
margin-top: 4px;
margin-bottom: 14px;
font-size: 1.1rem;
}
@media (max-width: 991px) {
.faq {
margin-bottom: 30px;
}
.faq .card .card-header .faq-title {
line-height: 26px;
margin-top: 10px;
}
}
.body-faq h2{
text-align:center;
color: #33e599;
}
.blockFaq{
margin-bottom: 2rem;
}
.titre{
width: 100%;
text-align: left;
color: #33e599;
font-size: 1.6rem;
}
.faqdet{
width: 100%;
}
</style>
<link rel="stylesheet" type="text/css" media="all" href="{{ asset('css/style.css') }}">
{% endblock %}
{% block body_container %}
<div id="pages" class="body-faq">
<div class="container">
<div class="faq col-md-12">
<h2>FAQ</h2>
{% for Faqm in Faqmod %}
<div class="blockFaq">
<div class="titre">{{ Faqm.Titre }}</div>
<div class="faqdet">
{% for Faq in Faqm.Liste %}
<div class="card">
<div class="card-header" id="faqHeading-{{ Faq.id }}">
<div class="mb-0">
<h5 class="faq-title" data-toggle="collapse" data-target="#faqCollapse-{{ Faq.id }}" data-aria-expanded="false" data-aria-controls="faqCollapse-{{ Faq.id }}" data-urltar="{{ Faq.Titre|slugify }}">{{ Faq.Titre | raw }}</h5>
</div>
</div>
<div id="faqCollapse-{{ Faq.id }}" class="collapse" aria-labelledby="faqHeading-{{ Faq.id }}" data-parent="#accordion">
<div class="card-body">
{{ Faq.Detail | raw }}
</div>
</div>
</div>
{% endfor %}
</div>
</div>
{% endfor %}
</div>
</div>
</div>
{% endblock %}
{% block javascripts %}
<script>
$("a[href$='#']").on('click', function () {
openreduc()
})
$('.faq-title').on('click', function () {
let trg = $(this).attr('data-target')
let text = $(this).attr('data-urltar')
if( $( trg ).hasClass( "collapse" ) ){
$( trg ).removeClass('collapse')
window.location.hash = text
}else{
$( trg ).addClass('collapse')
let nurl = window.location.href.replace(window.location.hash, '');
// window.location.hash = ''
window.history.pushState("", "", nurl);
}
});
$(document).ready(function () {
var hash = window.location.hash;
hash = hash.substring(1)
$( ".faq-title" ).each(function( index ) {
if( hash == $( this ).attr('data-urltar') ){
// deplier l'élément
$( $(this).attr('data-target') ).removeClass('collapse')
// scroll jusqu'a l'élément
$('html,body').animate({
scrollTop: $(this).offset().top - 50
}, 'slow');
}
});
});
</script>
{% endblock %}