templates/instrument/show.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block body %}
  3.     {% include 'include/_title.html.twig' with {title: instrument.name} %}
  4.     <section class="container my-5">
  5.         <div class="row">
  6.             <div class="col-3">
  7.                 <div class="position-sticky-top d-flex justify-content-center">
  8.                     <img src="{{ instrument_dir }}/{{ instrument.picture }}"
  9.                          class="img-fluid" alt="">
  10.                 </div>
  11.             </div>
  12.             <div class="col-9 col-lg-6">
  13.                 <h1>{{ instrument.name }}</h1>
  14.                 {{ instrument.description|purify}}
  15.             </div>
  16.             <div class="col-lg-3">
  17.                 <div class="position-sticky-top">
  18.                     <h2 class="fs-4">Écoutez les titres enregistrĂ©s avec {{ instrument.name }}</h2>
  19.                     {% include 'sound/_list-group-sounds.html.twig' %}
  20.                 </div>
  21.             </div>
  22.         </div>
  23.     </section>
  24.     <section class="text-bg-light-200 py-5 mb-n5">
  25.         <div class="container">
  26.             <div class="text-center mb-5 position-relative">
  27.                 <h2 class="text-center visually-hidden">{{ ('Les autres instruments de la marque ' ~ instrument.company.name )|trans }}</h2>
  28.                 <img class="img-fluid d-block mx-auto mb-2" src="{{ company_dir }}/{{ instrument.company.logo }}"
  29.                      alt="{{ ('logo de la marque ' ~ instrument.company.name)|trans }}" style="max-width: 200px">
  30.                 <a href="{{ path('app_company_show', {'slug': instrument.company.slug}) }}"
  31.                 class="stretched-link">Voir la page de la marque </a>
  32.             </div>
  33.             <div class="row g-4 justify-content-center">
  34.                 {% for instrumentCompany in instrument.company.instruments|filter(instrumentcompany => instrumentcompany != instrument)|slice(0, 6) %}
  35.                     <div class="col-6 col-lg-3 col-xxl-2">
  36.                         <figure class="d-flex align-items-end shadow p-2 position-relative h-100 rounded-3 bg-white">
  37.                             <img class="img-fluid w-25" src="{{ instrument_dir }}/{{ instrumentCompany.picture }}"
  38.                                  alt="">
  39.                             <figcaption class="d-flex flex-column ms-2 h-100 flex-grow-1">
  40.                                 <h3 class="fs-5">{{ instrumentCompany.name }}</h3>
  41.                                 <p class="small">
  42.                                     {{ instrumentCompany.summary }}
  43.                                 </p>
  44.                                 <a class="btn btn-sm btn-outline-primary mt-auto stretched-link"
  45.                                    href="{{ path('app_instrument_show', {slug: instrumentCompany.slug}) }}">{{ 'Afficher'|trans }}</a>
  46.                             </figcaption>
  47.                         </figure>
  48.                     </div>
  49.                 {% endfor %}
  50.             </div>
  51.         </div>
  52.     </section>
  53. {% endblock %}