templates/front/rubriques.html.twig line 1

Open in your IDE?
  1. {% extends 'base_front.html.twig' %}
  2. {% block title %}{{ parent() }} | {{ r.nom }}{% endblock %}
  3. {% block h1 %}
  4.     {{ r.nom }}
  5.     {% if app.user and is_granted('ROLE_MODO') %}
  6.         <a target="_blank" href="{{ path('app_admin_rubrique_show', {'uuid': r.uuid}) }}"><i class="text-danger" data-feather="unlock"></i></a>
  7.     {% endif %}
  8. {% endblock %}
  9. {% block ariane %}
  10.     <nav class="navigateur" aria-label="breadcrumb">
  11.         <ol class="breadcrumb">
  12.             <li class="breadcrumb-item"><a href="{{ path("home") }}">{{ config.titreAccueil }}</a></li>
  13.             <li class="breadcrumb-item active" aria-current="page">{{ r.nom }}</li>
  14.         </ol>
  15.     </nav>
  16. {% endblock %}
  17. {% block body %}
  18.     {% if r.phrase %}
  19.         <div class="my-4 mx-12 bg-white p-4 rounded ck">{{ r.phrase|raw }}</div>
  20.     {% endif %}
  21.     {% if r.srcImg %}
  22.         <div class="mx-12">
  23.             <img 
  24.                 src="{{ asset('images/rubrique/' ~ r.srcImg) }}"
  25.                 {% if r.altImg %}
  26.                     alt="{{ r.altImg }}" 
  27.                 {% endif %} 
  28.                 {% if r.titleImg %}
  29.                     title="{{ r.titleImg }}"
  30.                 {% endif %} 
  31.                 class="imgRatio rounded"
  32.             >
  33.         </div>
  34.     {% endif %}
  35.     {% if r.description %}
  36.         <div class="my-4 mx-12  bg-white p-4 rounded ck" >{{ r.description|raw }}</div>
  37.     {% endif %}
  38.     <div class="row mt-4 mx-0">
  39.         {% for item in ssr %}
  40.             <div class="col-md-6 col-12">
  41.                 <a href="{{ path('ssrubriques', {slug: r.slug, slug2 : item.slug }) }}" class="d-block text-end">
  42.                     <div class="rounded bg-white p-2 mb-4">
  43.                         <div class="p-3 text-center">
  44.                             <h2 class="text-center my-4 cardShow">{{ item.nom }}</h2>
  45.                             {% if item.src %}
  46.                                 <div class="text-center">
  47.                                         <img 
  48.                                             src="{{ asset('images/sousrubrique/' ~ item.src) }}" 
  49.                                                 {% if item.alt %}
  50.                                                 alt="{{ item.alt }}"  
  51.                                                 {% endif %}
  52.                                                 {% if item.title %}
  53.                                                 title="{{ item.title }}" 
  54.                                                 {% endif %}
  55.                                             class="img80Dpx"
  56.                                         >
  57.                                 </div>
  58.                             {% endif %}
  59.                         </div>
  60.                         <svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" fill="#0B6BA8" viewBox="0 0 32 32"><path d="M31.71,15.29l-10-10L20.29,6.71,28.59,15H0v2H28.59l-8.29,8.29,1.41,1.41,10-10A1,1,0,0,0,31.71,15.29Z"/></g></svg>
  61.                         
  62.                     </div>
  63.                 </a>
  64.             </div>
  65.         {% endfor %}
  66.     </div>
  67.     
  68. {% endblock %}
  69. {% block javascripts %}
  70.     <script src="{{ asset('js/cardShow.js') }}"></script>   
  71.     <script>
  72.         var elements = document.querySelectorAll(".cardShow");
  73.         sizeCard(elements);
  74.     </script>
  75. {% endblock %}