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 %}{{typeOffer.title}}{% endblock %}
  4. {% block seo %}
  5.  <meta name="description" content="{{typeOffer.description}}" >
  6.     <meta property="og:title" content="{{typeOffer.metaTitle}}" />
  7.     <meta property="og:type" content="Website" />
  8.     <meta property="og:description" content="{{typeOffer.metaDescription}}" />
  9.     <meta property="og:url" content="{{absolute_url( app.request.uri)}}" />
  10.     <meta property="og:image" content="{{ asset('img/asset/cardimg-fb.jpg') }}" />
  11.     <meta name ="twitter:card" content="summary_large_image" />
  12.     <meta name="twitter:title" content="{{typeOffer.metaTitle}}">
  13.     <meta name="twitter:description" content="{{typeOffer.metaDescription}}">
  14.     <meta name="twitter:image" content="{{ asset('img/asset/cardimg-fb.jpg') }}">
  15. {% endblock %}
  16. {# Header standard ou overlay si besoin sur le hero #}
  17. {% block body %}
  18. {# -----------------------------
  19.    HERO Escapade (avec inclus)
  20. ------------------------------ #}
  21. <section class="hero hero--type is-animated position-relative text-white">
  22.   <div class="hero__media ratio ratio-21x9">
  23.     {% if typeOffer.img %}
  24.       <img src="{{ asset('img/offer/') ~ typeOffer.img }}"
  25.            alt="{{ typeOffer.name }}"
  26.            class="hero__img object-fit-cover w-100 h-100">
  27.     {% else %}
  28.       <img src="{{ asset('img/2633.jpg') }}"
  29.            alt="{{ typeOffer.name }}"
  30.            class="hero__img object-fit-cover w-100 h-100">
  31.     {% endif %}
  32.   </div>
  33.   <div class="hero__overlay hero__overlay--left">
  34.     <div class="container">
  35.       <div class="hero__card" style="max-width: 600px;">
  36.         <h1 class="hero__title display-5 fw-bold mb-3
  37.           {% if typeOffer.id == '1' %} txt-ot-green
  38.           {% elseif typeOffer.id == '2' %} txt-ot-yellow
  39.           {% elseif typeOffer.id == '3' %} txt-ot-brown
  40.           {% elseif typeOffer.id == '4' %} txt-ot-blue
  41.           {% endif %}">
  42.           {{ typeOffer.name }}
  43.         </h1>
  44.         <p class="hero__subtitle mb-0">{{ typeOffer.hook }}</p>
  45.       </div>
  46.     </div>
  47.   </div>
  48. </section>
  49. {# Fil d'Ariane #}
  50. <nav class="container my-4" aria-label="breadcrumb">
  51.   <ol class="breadcrumb small">
  52.     <li class="breadcrumb-item"><a href="{{ path('app') }}">Accueil</a></li>
  53.     <li class="breadcrumb-item active">{{typeOffer.name}}</li>
  54.   </ol>
  55. </nav>
  56. {# -----------------------------
  57.    OFFRES DU MOMENT — réutilisation grille cartes maquette
  58. ------------------------------ #}
  59. <section class="py-5 bg-white">
  60.   <div class="container">
  61.     <header class="mb-3">
  62.       <h2 class="h3 txt-ot-{{typeOffer.color}} mb-1 fw-bold">Notre sélection {{typeOffer.name}}.</h2>
  63.       <p class="text-muted mb-0">{{typeOffer.summary}}</p>
  64.     </header>
  65.   <div class="row g-3 g-md-4">
  66.       {% for o in offers %}
  67.       <div class="col-12 col-sm-6 col-lg-3">
  68.         <article class="card card-offer border-0 shadow-sm h-100 overflow-hidden rounded-4">
  69.         {% if o.type.id == '1' %}
  70.           {% if o.destination %}
  71.           <a href="{{ path('o.escapade.destination',{slug:o.destination.slug}) }}" class="stretched-link text-decoration-none text-white">
  72.           {% else %}
  73.           <a href="#" class="stretched-link text-decoration-none text-white">
  74.           {% endif %}
  75.           <div class="ratio ratio-4x5">
  76.             {% if o.img %}
  77.               <img src="{{ asset('img/offer/' ~ o.file ~ '/' ~ o.slug ~ '/' ~ o.img) }}" alt="{{ o.title }}" class="object-fit-cover w-100 h-100">
  78.             {% elseif o.destination and o.destination.img %}
  79.               <img src="{{ asset('img/destination/' ~ o.destination.slug ~ '/' ~ o.destination.img) }}" alt="{{ o.title }}" class="object-fit-cover w-100 h-100">
  80.             {% else %}
  81.               <img src="{{ asset('img/2633.jpg') }}" alt="{{ o.title }}" class="object-fit-cover w-100 h-100">
  82.             {% endif %}
  83.         {% elseif o.type.id == '2' %}
  84.           <a href="{{ path('o.circuit.destination',{slug:o.slug})}}" class="stretched-link text-decoration-none text-white">
  85.           <div class="ratio ratio-4x5">
  86.               <img src="{{asset('img/offer/circuit/' ~ o.slug  ~ '/' ~ o.img)}}" alt="{{ o.file }}" class="object-fit-cover w-100 h-100">
  87.         {% elseif o.type.id == "3" %}
  88.           <a href="{{ path('o.roadtrip.destination',{slug:o.slug})}}" class="stretched-link text-decoration-none text-white">
  89.           <div class="ratio ratio-4x5">
  90.               <img src="{{asset('img/offer/road/' ~ o.slug  ~ '/' ~ o.img)}}" alt="{{ o.title }}" class="object-fit-cover w-100 h-100">
  91.         {% elseif o.type.id == "4" %}
  92.           <a href="{{ path('o.croisiere.destination',{slug:o.slug})}}" class="stretched-link text-decoration-none text-white">
  93.           <div class="ratio ratio-4x5">
  94.               <img src="{{asset('img/offer/croisiere/' ~ o.slug  ~ '/' ~ o.img)}}" alt="{{ o.title }}" class="object-fit-cover w-100 h-100">
  95.         {% endif %}
  96.             </div>
  97.             <div class="card-img-overlay d-flex flex-column justify-content-end p-3 p-md-4">
  98.               <h3 class="h5 fw-bold text-white text-shadow-sm mb-3">{{ o.title }}</h3>
  99.               <div>
  100.                 <span class="btn btn-outline-light btn-sm rounded-pill">Découvrir</span>
  101.               </div>
  102.             </div>
  103.           </a>
  104.         </article>
  105.       </div>
  106.       {% endfor %}
  107.     </div>
  108.     <div class="section-divider mx-auto my-5"></div>
  109.   </div>
  110. </section>
  111. {% endblock %}
  112. {% block extra_head %}
  113.   {{ parent() }}
  114.   <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.css">
  115.   <style>
  116.     .text-shadow-sm{ text-shadow:0 2px 4px rgba(0,0,0,.35); }
  117.     .text-ot-green{ color: var(--ot-primary, #2ea37a); }
  118.     .bg-ot-green{ background: var(--ot-primary, #2ea37a); }
  119.   </style>
  120. {% endblock %}