templates/default/offers.html.twig line 1

Open in your IDE?
  1. {# templates/escapade/show.html.twig #}
  2. {% extends 'base.html.twig' %}
  3. {% block title %}O'Escapade — {{ escapade.title|default('Carnaval St Lucie') }}{% endblock %}
  4. {# Header standard ou overlay si besoin sur le hero #}
  5. {% block header_classes %}header-overlay{% endblock %}
  6. {% block navbar_theme %}navbar-dark{% endblock %}
  7. {% block body %}
  8. {# -----------------------------
  9.    HERO Escapade (avec inclus)
  10. ------------------------------ #}
  11. <section class="position-relative text-white">
  12.   <div class="ratio ratio-21x9">
  13.     {% if typeOffer.img %}
  14.     <img src="{{ asset('img/offer/')}}{{typeOffer.img}}" alt="Carnaval St Lucie" class="object-fit-cover w-100 h-100">
  15.   {% else %}
  16.     <img src="{{ asset('img/2633.jpg') }}" alt="" class="object-fit-cover w-100 h-100">
  17.   {% endif %}
  18.   </div>
  19.   <div class="position-absolute top-0 start-0 w-100 h-100 d-flex align-items-center">
  20.     <div class="container">
  21.       <div class="bg-white text-dark p-4 p-md-5 rounded-4 shadow-sm" style="max-width: 600px;">
  22.         <h1 class="display-5 fw-bold 
  23.         {% if typeOffer.id == '1' %}
  24.           txt-ot-green 
  25.         {% elseif typeOffer.id == '2' %}
  26.           txt-ot-yellow
  27.         {% elseif typeOffer.id == '3' %}
  28.           txt-ot-brown 
  29.         {% elseif typeOffer.id == '4' %}
  30.           txt-ot-blue 
  31.         {% endif %} 
  32.         mb-3">{{typeOffer.name}}</h1>
  33.         <p class="mb-3">{{typeOffer.hook}}</p>
  34.       </div>
  35.     </div>
  36.   </div>
  37. </section>
  38. {# Fil d'Ariane #}
  39. <nav class="container my-4" aria-label="breadcrumb">
  40.   <ol class="breadcrumb small">
  41.     <li class="breadcrumb-item"><a href="{{ path('app') }}">Accueil</a></li>
  42.     <li class="breadcrumb-item active">{{typeOffer.name}}</li>
  43.   </ol>
  44. </nav>
  45. {# -----------------------------
  46.    OFFRES DU MOMENT — réutilisation grille cartes maquette
  47. ------------------------------ #}
  48. <section class="py-5 bg-white">
  49.   <div class="container">
  50.     <header class="mb-3">
  51.       <h2 class="h3 txt-ot-{{typeOffer.color}} mb-1 fw-bold">Notre sélection {{typeOffer.name}}.</h2>
  52.       <p class="text-muted mb-0">{{typeOffer.description}}</p>
  53.     </header>
  54.   <div class="row g-3 g-md-4">
  55.       {% for o in offers %}
  56.       <div class="col-12 col-sm-6 col-lg-3">
  57.         <article class="card card-offer border-0 shadow-sm h-100 overflow-hidden rounded-4">
  58.         {% if o.type.id == '1' %}
  59.           <a href="{{ path('o.escapade.destination',{slug:o.destination.slug}) }}" class="stretched-link text-decoration-none text-white">
  60.           <div class="ratio ratio-4x5">
  61.               <img src="{{asset('img/destination/' ~ o.destination.slug  ~ '/' ~ o.destination.img)}}" alt="{{ o.title }}" alt="{{ o.title }}" class="object-fit-cover w-100 h-100">
  62.         {% elseif o.type.id == '2' %}
  63.           <a href="{{ path('o.circuit.destination',{slug:o.slug})}}" class="stretched-link text-decoration-none text-white">
  64.           <div class="ratio ratio-4x5">
  65.               <img src="{{asset('img/offer/circuit/' ~ o.slug  ~ '/' ~ o.img)}}" alt="{{ o.file }}" class="object-fit-cover w-100 h-100">
  66.         {% elseif o.type.id == "3" %}
  67.           <a href="{{ path('o.roadtrip.destination',{slug:o.slug})}}" class="stretched-link text-decoration-none text-white">
  68.           <div class="ratio ratio-4x5">
  69.               <img src="{{asset('img/offer/road/' ~ o.slug  ~ '/' ~ o.img)}}" alt="{{ o.title }}" class="object-fit-cover w-100 h-100">
  70.         {% elseif o.type.id == "4" %}
  71.           <a href="{{ path('o.croisiere.destination',{slug:o.slug})}}" class="stretched-link text-decoration-none text-white">
  72.           <div class="ratio ratio-4x5">
  73.               <img src="{{asset('img/offer/croisiere/' ~ o.slug  ~ '/' ~ o.img)}}" alt="{{ o.title }}" class="object-fit-cover w-100 h-100">
  74.         {% endif %}
  75.             </div>
  76.             <div class="card-img-overlay d-flex flex-column justify-content-end p-3 p-md-4">
  77.               <h3 class="h5 fw-bold text-white text-shadow-sm mb-3">{{ o.title }}</h3>
  78.               <div>
  79.                 <span class="btn btn-outline-light btn-sm rounded-pill">Découvrir</span>
  80.               </div>
  81.             </div>
  82.           </a>
  83.         </article>
  84.       </div>
  85.       {% endfor %}
  86.     </div>
  87.     <div class="section-divider mx-auto my-5"></div>
  88.   </div>
  89. </section>
  90. {% endblock %}
  91. {% block extra_head %}
  92.   {{ parent() }}
  93.   <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.css">
  94.   <style>
  95.     .text-shadow-sm{ text-shadow:0 2px 4px rgba(0,0,0,.35); }
  96.     .text-ot-green{ color: var(--ot-primary, #2ea37a); }
  97.     .bg-ot-green{ background: var(--ot-primary, #2ea37a); }
  98.   </style>
  99. {% endblock %}