templates/dashboard_free/lesson-video.html.twig line 1

Open in your IDE?
  1. {% extends 'dashboard_free/layout.html.twig' %}
  2. {% block head %}
  3.   <meta name="description" content="{{ video.metaDescription }}" />
  4.   <title>{{ find.title }} - Les Bons Profs</title>
  5.   <link rel="canonical" href="{{ base_url_front }}{{ path(app.request.attributes.get('_route'), app.request.attributes.get('_route_params')) }}" />
  6.   <!--Tags Facebook-->
  7.   <meta property="og:url"                content="{{ base_url_front }}{{ path(app.request.attributes.get('_route'), app.request.attributes.get('_route_params')) }}" />
  8.   <meta property="og:type"               content="website" />
  9.   <meta property="og:title"              content="{{ find.title }} - Les Bons Profs" />
  10.   <meta property="og:description"        content="{{ video.metaDescription }}" />
  11.   <meta property="og:image"              content="{{ base_url_front }}/static/img/dashboard-free/eleve-cours-gratuit.webp" />
  12.   <script type="application/ld+json">
  13.     {
  14.         "@context": "https://schema.org",
  15.               "@type": "VideoObject",
  16.               "name": "{{ course.title|capitalize }}",
  17.               "description": "{% if find.metadescription is not null %}{{ find.metadescription }}{% else %}Cours de {% if find %}{{ find.notion.library.discipline.title }}{% endif %} pour {{ course.title }} : vidéos pédagogiques, exercices corrigés et méthodologie. Par Les Bons Profs.{% endif %}",
  18.               "thumbnailUrl": "https://img.youtube.com/vi/{{ video.videoId }}/maxresdefault.jpg",
  19.               "uploadDate": "2025-06-16",
  20.               "duration": "{{ video.durationYoutube }}",
  21.               "contentUrl": "https://www.youtube.com/embed/{{ video.videoId }}",
  22.               "embedUrl": "https://www.youtube.com/embed/{{ video.videoId }}",
  23.               "publisher": {
  24.         "@type": "Organization",
  25.                 "name": "Les Bons Profs",
  26.                 "logo": {
  27.           "@type": "ImageObject",
  28.                   "url": "https://lesbonsprofs.com/static/img/dashboard-free/les-bons-profs-logo.svg"
  29.         }
  30.       },
  31.         "teachingMode": "online",
  32.               "educationalLevel": "{{ course.title|capitalize }}",
  33.               "inLanguage": "fr",
  34.               "learningResourceType": "VideoLesson",
  35.               "isAccessibleForFree": true,
  36.               "offers": {
  37.         "@type": "Offer",
  38.                 "price": "0",
  39.                 "priceCurrency": "EUR",
  40.                 "availability": "https://schema.org/InStock"
  41.       }
  42.     }
  43.   </script>
  44. {% endblock %}
  45. {% block content %}
  46.   <!-- Popup -->
  47.   <div x-cloak>
  48.     <!-- Fond noir transparent flouté -->
  49.     <div x-show="open"
  50.          x-transition:enter="transition ease-out duration-300"
  51.          x-transition:enter-start="opacity-0"
  52.          x-transition:enter-end="opacity-100"
  53.          x-transition:leave="transition ease-in duration-200"
  54.          x-transition:leave-start="opacity-100"
  55.          x-transition:leave-end="opacity-0"
  56.          class="fixed inset-0 bg-black/50 backdrop-blur-sm z-40"
  57.          @click="open = false">
  58.       <!-- Contenu du popup -->
  59.       <div class="fixed inset-0 z-50 flex items-center justify-center">
  60.         <div class="flex flex-col items-center bg-white border-8 border-miel rounded-lg p-4 sm:p-6 max-w-lg mx-4" @click.stop>
  61.           <!-- Contenu à personnaliser -->
  62.           <p class="text-2xl text-bleu font-bold text-center mb-4">Tous nos cours en ligne en accès gratuit</p>
  63.           <img src="{{ base_url }}/static/img/dashboard-free/hibou-popup1.webp" alt="Tous nos cours en ligne en accès gratuit" class="w-40 z-10">
  64.           <div class="flex justify-between bg-miel text-bleu font-bold rounded-lg columns-2 w-full sm:w-[90%] p-4 sm:p-5 -mt-[14px]">
  65.             <ul>
  66.               <li class="flex items-baseline"><img src="{{ base_url }}/static/img/dashboard-free/coche-grenat.webp" alt="Vidéos" class="w-4 sm:w-5 mr-1">Vidéos</li>
  67.               <li class="flex items-baseline"><img src="{{ base_url }}/static/img/dashboard-free/coche-grenat.webp" alt="Fiches" class="w-4 sm:w-5 mr-1">Fiches</li>
  68.               <li class="flex items-baseline"><img src="{{ base_url }}/static/img/dashboard-free/coche-grenat.webp" alt="QCM" class="w-4 sm:w-5 mr-1">QCM</li>
  69.             </ul>
  70.             <ul>
  71.               <li class="flex items-baseline"><img src="{{ base_url }}/static/img/dashboard-free/coche-grenat.webp" alt="Exercices corrigés" class="w-4 sm:w-5 mr-1">Exercices corrigés</li>
  72.               <li class="flex items-baseline"><img src="{{ base_url }}/static/img/dashboard-free/coche-grenat.webp" alt="Méthodologie" class="w-4 sm:w-5 mr-1">Méthodologie</li>
  73.               <li class="flex items-baseline"><img src="{{ base_url }}/static/img/dashboard-free/coche-grenat.webp" alt="Compte parent" class="w-4 sm:w-5 mr-1">Compte parent</li>
  74.             </ul>
  75.           </div>
  76.           <p class="text-lg sm:text-2xl text-bleu text-center font-bold mt-4">
  77.             Inscrivez-vous gratuitement
  78.           </p>
  79.           <p class="text-lg sm:text-xl text-center">
  80.             pour accéder à tous nos cours en ligne
  81.           </p>
  82.           <p class="flex text-lg sm:text-xl text-bleu font-bold">
  83.             pendant 7 jours <img src="{{ base_url }}/static/img/dashboard-free/emphase-miel-dr.webp" alt="Inscrivez-vous gratuitement" class="w-[24px] mt-[12px]">
  84.           </p>
  85.           <a href="{{ base_url_front }}/nos-offres/" class="bg-miel hover:bg-grenat text-bleu hover:text-white text-lg sm:text-xl font-bold py-2 px-4 rounded-full transition-colors mt-4">
  86.             Obtenir mon accès gratuit
  87.           </a>
  88.           <p class="text-base sm:text-xl mt-4">Déjà un compte ?
  89.             <a href="{{ url("app_login") }}" class="text-bleu hover:text-grenat">Je me connecte</a>
  90.           </p>
  91.         </div>
  92.       </div>
  93.     </div>
  94.   </div>
  95.   <!-- Fil d'arianne -->
  96.   <div class="flex justify-center px-5 pt-[80px] md:pt-[100px]">
  97.     <div class="text-[14px] w-[1160px]">
  98.       <a href="https://www.lesbonsprofs.com/" class="text-bleu"><span class="text-[21px]">⌂</span> Accueil</a> » <a href="" class="text-bleu">Terminale</a> » <a href="" class="text-bleu">Philosophie</a> » Vidéo Le bonheur
  99.     </div>
  100.   </div>
  101.   <!-- Bloc Contenu -->
  102.   <section class="flex justify-center px-5 pt-[120px]">
  103.     <div class="flex flex-col md:flex-row w-[1160px] relative">
  104.       <!-- Menu gauche -->
  105.       <aside id="menu-gauche" class="w-full md:w-[275px] absolute bg-rose md:bg-inherit mb-5 md:mb-0">
  106.         {% include 'dashboard_free/menu-gauche.html.twig' %}
  107.         <div class="hidden md:flex flex-col justify-center text-center text-sm items-center border-2 border-miel rounded-lg gap-4 my-5 py-5">
  108.           <img src="{{ base_url }}/static/img/dashboard-free/hibou-bons-profs.webp" alt="Les bons profs - Cours gratuits" class="w-20" />
  109.           <p>
  110.             Envie de tester gratuitement nos vidéos de cours enrichies de jeux interactifs ?
  111.           </p>
  112.           <a href="#" class="block bg-grenat hover:bg-bleu text-white py-2 px-4 rounded-full text-center transition-colors">
  113.             J'essaie gratuitement
  114.           </a>
  115.           <p>Déjà un compte ? <a href="" class="text-bleu hover:text-grenat">Je me connecte</a> </p>
  116.         </div>
  117.       </aside>
  118.       <!-- Partie droite -->
  119.       <section class="md:ml-[300px] md:w-[calc(100%-275px)]">
  120.         <div class="mb-4">
  121.           <!-- En-têtes des onglets -->
  122.           <div class="flex gap-1">
  123.             <button class="md:px-4 py-2 text-[3vw] sm:text-[2.5vw] md:text-sm font-bold text-white bg-lavande rounded-t-lg w-full" data-tab="video">
  124.               Vidéo
  125.             </button>
  126.             <button @click.prevent="open = true" class="md:px-4 py-2 text-[3vw] sm:text-[2.5vw] md:text-sm font-bold text-lavande bg-lavandePastel hover:text-bleu rounded-t-lg w-full" data-tab="fiche">
  127.               Fiche
  128.             </button>
  129.             <button @click.prevent="open = true" class="md:px-4 py-2 text-[3vw] sm:text-[2.5vw] md:text-sm font-bold text-lavande bg-lavandePastel hover:text-bleu rounded-t-lg w-full" data-tab="qcm">
  130.               QCM
  131.             </button>
  132.             <button @click.prevent="open = true" class="md:px-4 py-2 text-[3vw] sm:text-[2.5vw] md:text-sm font-bold text-lavande bg-lavandePastel hover:text-bleu rounded-t-lg w-full" data-tab="exercice">
  133.               Exercice
  134.             </button>
  135.             <button @click.prevent="open = true" class="md:px-4 py-2 text-[3vw] sm:text-[2.5vw] md:text-sm font-bold text-lavande bg-lavandePastel hover:text-bleu rounded-t-lg w-full" data-tab="annale">
  136.               Annale Bac
  137.             </button>
  138.             <button @click.prevent="open = true" class="md:px-4 py-2 text-[3vw] sm:text-[2.5vw] md:text-sm font-bold text-lavande bg-lavandePastel hover:text-bleu rounded-t-lg w-full" data-tab="carte">
  139.               Carte mentale
  140.             </button>
  141.           </div>
  142.           <!-- Contenu des onglets -->
  143.           <div class="pt-4 md:p-4">
  144.             <div id="video" class="tab-panel text-justify">
  145.               <h1 class="font-bold capitalize text-2xl my-3">{{ video.title }}</h1>
  146.               {#<video controls class="w-full"></video>#}
  147.               <iframe class="w-full mb-4" height="442"
  148.                       src="https://www.youtube.com/embed/{{ video.videoId }}?controls=0">
  149.               </iframe>
  150.               {#<h2 class="font-bold text-xl my-3">Sous-titre</h2>#}
  151.               <iframe class="w-full mb-4" id="description-video-iframe"
  152.                       style="min-height: 200px" scrolling="no"
  153.                       src="{{ url('app_front_dashboard_descripyion_video',{'videoSlug':video.slug}) }}"></iframe>
  154.           </div>
  155.         </div>
  156.         <div class="flex md:hidden justify-center">
  157.           <div class="flex flex-col justify-center text-center text-sm items-center border-2 border-miel rounded-lg gap-4 my-5 py-5 w-[275px]">
  158.             <img src="/static/img/dashboard-free/hibou-bons-profs.webp" alt="Les bons profs - Cours gratuits" class="w-20" />
  159.             <p>
  160.               Envie de tester gratuitement nos vidéos de cours enrichies de jeux interactifs ?
  161.             </p>
  162.             <a href="#" class="block bg-grenat hover:bg-bleu text-white py-2 px-4 rounded-full text-center transition-colors">
  163.               J'essaie gratuitement
  164.             </a>
  165.             <p>Déjà un compte ? <a href="" class="text-bleu hover:text-grenat">Je me connecte</a> </p>
  166.           </div>
  167.         </div>
  168.       </section>
  169.     </div>
  170.   </section>
  171.   <script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS_HTML-full"></script>
  172.   <script type="text/x-mathjax-config">
  173.     MathJax.Hub.Config({
  174.       extensions: ["tex2jax.js"],
  175.       jax: ["input/TeX", "output/HTML-CSS"],
  176.       tex2jax: {
  177.         inlineMath: [ ['$','$'], ["\\(","\\)"] ],
  178.         displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
  179.         processEscapes: true
  180.       },
  181.       "HTML-CSS": { fonts: ["TeX"] }
  182.     });
  183.   </script>
  184.   <script type="text/javascript">
  185.     document.addEventListener('DOMContentLoaded', function() {
  186.       // Fonction pour recevoir la hauteur depuis l'iframe
  187.       window.addEventListener('message', function(e) {
  188.         const iframe = document.getElementById('description-video-iframe');
  189.         if (iframe && e.data.type === 'setHeight') {
  190.           iframe.style.height = e.data.height + 'px';
  191.         }
  192.       });
  193.     });
  194.   </script>
  195. {% endblock %}