templates/app/pages/realisationshow.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% import 'app/_inc/macros.html.twig' as m %}
  3. {% block css %}
  4.     {{ encore_entry_link_tags('app-pages-css') }}
  5.     {{ encore_entry_link_tags('app-gallery-css') }}
  6. {% endblock %}
  7. {% block js %}
  8.     {{ encore_entry_script_tags('app-gallery-js') }}
  9.     {% include('app/_inc/_beforeafter.html.twig') %}
  10. {% endblock %}
  11. {% block content %}
  12.     {{ m.titleCoord('Nos réalisations', 'nav.rea', asset('img/title-sablage.jpg')) }}
  13.     <main class="main-default">
  14.         <!-- ---------------- Contenu réa -------------- -->
  15.         <section class="rea-show">
  16.             <div class="container">
  17.                 <div class="rea-show-top">
  18.                     {% if realisation.pictures|length > 0 %}
  19.                         {% if realisation.pictures|length == 2 %}
  20.                             {{ m.beforeAfter(asset(realisation.pictures.0.path), asset(realisation.pictures.1.path)) }}
  21.                         {% else %}
  22.                             {{ m.img(asset(realisation.pictures.0.path)) }}
  23.                         {% endif %}
  24.                     {% else %}
  25.                     {% endif %}
  26.                     <div class="rea-show-content">
  27.                     <div class="label">{{ realisation.category.translate.title }}</div>
  28.                         <h2 class="h2">{{ realisation.translate.title }}</h2>
  29.                         <div class="paragraphe">
  30.                             {{ realisation.translate.content|raw }}
  31.                         </div>
  32.                     </div>
  33.                 </div>
  34.             </div>
  35.         </section>
  36.         <!-- ---------------- Grille photo -------------- -->
  37.         <section>
  38.             <div class="container">
  39.                 <div class="rea-gallery" data-gallery>
  40.                     {% for pic in realisation.pictures %}
  41.                         {{ m.img(asset(pic.path)) }}
  42.                     {% endfor %}
  43.                 </div>
  44.             </div>
  45.         </section>
  46.         <!-- ---------------- Autre réalisation -------------- -->
  47.         <section class="other-rea">
  48.             <div class="container">
  49.                 <div class="other-rea-content">
  50.                     {{ m.bn('Revenir à la liste', path('realisations')) }}
  51.                     <h2 class="h2">Découvrez nos autres réalisations</h2>
  52.                 </div>
  53.                 <ul class="rea-list">
  54.                     {% for rea in other if rea.id != realisation.id %}
  55.                         <li>
  56.                             <div class="rea-list-item" data-link>
  57.                                 {{ m.img(asset(rea.firstpicture.path)) }}
  58.                                 <h3 class="h3"><a href="{{ path('realisationshow', {'id':rea.id}) }}" title="voir la page">{{ rea.translate.title }}</a></h3>
  59.                             </div>
  60.                         </li>
  61.                     {% endfor %}
  62.                 </ul>
  63.             </div>
  64.         </section>
  65.     </main>
  66. {% endblock %}