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

Open in your IDE?
  1. <html>
  2.     <head>
  3.         {% block stylesheets %}
  4.             {{ encore_entry_link_tags('dashboard') }}
  5.         {% endblock %}
  6.         <meta charset="UTF-8">
  7.         <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
  8.     </head>
  9.     <body>
  10.     {% if video %}
  11.     <div class="video-content-text-wrapper">
  12.         {{ video.description|raw }}
  13.     </div>
  14.         <div style="text-align: center;margin-top: 20px;margin-bottom: 20px">&copy; lesbonsprofs &ndash; Tous droits r&eacute;serv&eacute;s</div>
  15.     {% endif %}
  16.     {% if listAct is not empty %}
  17.         <div class="mt-3">
  18.             <hr class="mt-5 mb-5"/>
  19.             <div class="d-md-flex flex-md-wrap justify-content-md-between g-2">
  20.                 {% for row in listAct|slice(0,3) %}
  21.                     <a class="link-window text-decoration-none" title="{{ row.title }}" href="https://www.lesbonsprofs.com{{ path('app_front_dashboard_lesson_notion',{'courseSlug':row.cSlug,'disciplineSlug':row.dSlug,'actSlug':row.slug}) }}">
  22.                         <img class="mb-2" height="180px" style="object-fit: cover" alt="{{ row.title }}" width="100%" src="{% if row.videoId is not null %}https://img.youtube.com/vi/{{ row.videoId }}/hqdefault.jpg{% elseif row.picture is not null %}{{ row.picture }}{% endif %}"/>
  23.                         <div class="text-black" style="color: black">{{ row.title }}</div>
  24.                     </a>
  25.                 {% endfor %}
  26.             </div>
  27.         </div>
  28.     {% endif %}
  29.     {{ encore_entry_script_tags('dashboard') }}
  30.     <script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS_HTML-full"></script>
  31.     <script type="text/x-mathjax-config">
  32.         MathJax.Hub.Config({
  33.           extensions: ["tex2jax.js"],
  34.           jax: ["input/TeX", "output/HTML-CSS"],
  35.           tex2jax: {
  36.             inlineMath: [ ['$','$'], ["\\(","\\)"] ],
  37.             displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
  38.             processEscapes: true
  39.           },
  40.           "HTML-CSS": { fonts: ["TeX"] }
  41.         });
  42.     </script>
  43.     <script>
  44.         $(document).ready(function() {
  45.             $('.link-window').click(function(e) {
  46.                 e.preventDefault();
  47.                 parent.window.location = $(this).attr('href');
  48.             });
  49.         });
  50.         document.addEventListener('DOMContentLoaded', function() {
  51.             function sendHeight() {
  52.                 const height = document.documentElement.scrollHeight;
  53.                 window.parent.postMessage({
  54.                     type: 'setHeight',
  55.                     height: height
  56.                 }, '*');
  57.             }
  58.             // Envoyer la hauteur initiale
  59.             sendHeight();
  60.             // Observer les changements de taille du contenu
  61.             const resizeObserver = new ResizeObserver(() => {
  62.                 sendHeight();
  63.             });
  64.             resizeObserver.observe(document.body);
  65.         });
  66.     </script>
  67.     <style>
  68.         .link-window {
  69.             display: block;
  70.             height: 100%;
  71.             margin-bottom: 10px;
  72.         }
  73.         @media (min-width: 768px) {
  74.             .link-window {
  75.                 width: calc(100%/3 - 15px);
  76.             }
  77.         }
  78.         @media (max-width: 767.9px) {
  79.             .link-window {
  80.                 width: 100%;
  81.             }
  82.         }
  83.         .link-window img {}
  84.     </style>
  85.     </body>
  86. </html>