templates/front/tuto/single-tuto.html.twig line 1

Open in your IDE?
  1. {% extends "front/base.html.twig" %}
  2. {% block title %}
  3.     {{ tuto.title }}
  4. {% endblock %}
  5. {% block body %}
  6.     <section class="first-section single-tutorial">
  7.         <div class="container">
  8.             <div class="row">
  9.                 <div class="col-12 mb-1">
  10.                     <a href="{{ path('tutos') }}" class="nav-link d-flex align-items-center px-0"><i class="fas fa-chevron-left h4 m-0"></i><span class="ml-2">{{ "tuto.back" | trans }}</span></a>
  11.                 </div>
  12.                 <div class="col-12">
  13.                     <div class="tuto-content">
  14.                         <h1 class="title m-0">{{ tuto.title }}</h1>
  15.                         <ul class="d-flex p-0 nav category">    
  16.                             {% for category in tuto.categories %}
  17.                                 <li class="nav-link pl-0 pt-0">
  18.                                     <span>{{ category.title }}</span>
  19.                                 </li>
  20.                             {% endfor %}
  21.                         </ul>
  22.                         {% if tuto.video %}
  23.                         {% set embed_url = tuto.video|replace({'watch?v=': 'embed/'}) %}
  24.                         <div class="content-main-video" data-video="{{ embed_url }}">
  25.                             <iframe width="100%" height="100%" src="{{ embed_url }}" title="{{ tuto.title }}" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
  26.                         </div>
  27.                         {% else %}
  28.                         <div class="cover">
  29.                             <img loading="lazy" src="{{ asset('images/tuto/' ~ tuto.photo) }}" alt="{{ tuto.title }}">
  30.                         </div>
  31.                         {% endif %}
  32.                         <div class="content-text">
  33.                             {{ tuto.description | raw }}
  34.                         </div>
  35.                     </div>
  36.                 </div>                
  37.             </div>
  38.             <div class="row tutorials-section">
  39.                 <div class="col-12">
  40.                     <h2 class="section-title-underline">{{ "tuto.discover_also" | trans }}</h2>
  41.                     <div class="tutos-grid">
  42.                     {% for tuto in othersTuto %}
  43.                     <a class="tuto-card" href="{{ path('tuto_detail', {'slug' : tuto.slug}) }}">
  44.                         <div class="cover">
  45.                             <img loading="lazy" src="{{ asset('images/tuto/' ~ tuto.photo) }}" alt="{{ tuto.title }}">
  46.                         </div>
  47.                         <h3 class="title">{{ tuto.title }}</h3>
  48.                     </a>
  49.                     {% endfor %}
  50.                     </div>
  51.                 </div>
  52.             </div>
  53.         </div>
  54.     </section>
  55. {% endblock %}