{% extends 'home/homeLayout.html.twig' %}
{% block stylesheets %}
{{ parent() }}
<link rel="stylesheet" href="{{ asset('css/cours_page.css') }}?v={{ random() }}">
{% endblock %}
{% block body %}
<div class="cours_page">
<div class="content">
<div class="container">
<div class="row">
<div class="col-md-9">
<div class="core">
<div class="cours_content single">
<div class="thumbnail">
<img src="{{ asset('images/cours/coursThumb.png') }}" alt="">
<div class="category_chimp">
{{ singleCours.subcategoryid.nom }}
</div>
</div>
<div class="infos">
<div class="top_head">
<span class="teacher">{{singleCours.enseignantid.username}}</span>
</div>
<div class="title">
<h2 class="">{{singleCours.nom}}</h2>
</div>
<div class="rating">
<div class="list_stars">
{% for i in 1..5 %}
{% if singleCours.getAverageRating() is not null and i <= singleCours.getAverageRating() %}
<div class="star">
<i class="fa-solid fa-star"></i>
</div>
{% else %}
<div class="star">
<i class="fa-regular fa-star"></i>
</div>
{% endif %}
{% endfor %}
</div>
<small>({{singleCours.getAverageRating()}})</small>
</div>
<div class="description">
<p>{{singleCours.description}}.</p>
</div>
</div>
</div>
<div class="single s lesson_content">
<div>
<h3>Contenu</h3>
</div>
<div class="list_lessosn">
{% for lesson in singleCours.lessons %}
<div class="single">
<div class="circle"></div>
<div class="title">{{lesson.titre}}</div>
<div class="duration">{{lesson.duree}} Heures</div>
</div>
{% endfor %}
<div class="single quizz">
<div class="circle"></div>
<div class="title">Quizz</div>
<div class="duration"></div>
</div>
</div>
</div>
{% include 'home/avis/coursAvisSection.html.twig' with {'courId':singleCours.id,'courSlug':singleCours.slug} %}
</div>
</div>
<div class="col-md-3">
<div class="right_side">
<div class="top_btn_holder">
{% if getCurrentUser() is null %}
<a class="btn_main" type="button" data-bs-toggle="modal" data-bs-target="#authModel" href="#" id="openLogin">Accéder à ce cous</a>
{% else %}
<a class="btn_main" href="{{ path('home_cours_lessons_index', {'slug': singleCours.slug}) }}">Accéder à ce cous</a>
{% endif %}
</div>
<div class="info_holder">
<div class="single_info_side">
<div class="icon">
<i class="fa-solid fa-hourglass-half"></i>
</div>
<span class="txt">Duration :</span>
<span class="txt_info">
{{singleCours.getLessonsDuration()}} heures</span>
</div>
<div class="single_info_side">
<div class="icon">
<i class="fa-solid fa-bookmark"></i>
</div>
<span class="txt">Leçons :</span>
<span class="txt_info">
{{singleCours.lessons|length}}</span>
</div>
<div class="single_info_side">
<div class="icon">
<i class="fa-solid fa-gauge"></i>
</div>
<span class="txt">Niveau :</span>
<span class="txt_info">{{ singleCours.niveauid.niveau }}</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
{% endblock %}