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.           <a href="{{ path('o.escapade.destination',{slug:o.destination.slug}) }}" class="stretched-link text-decoration-none text-white">
  71.           <div class="ratio ratio-4x5">
  72.               <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">
  73.         {% elseif o.type.id == '2' %}
  74.           <a href="{{ path('o.circuit.destination',{slug:o.slug})}}" class="stretched-link text-decoration-none text-white">
  75.           <div class="ratio ratio-4x5">
  76.               <img src="{{asset('img/offer/circuit/' ~ o.slug  ~ '/' ~ o.img)}}" alt="{{ o.file }}" class="object-fit-cover w-100 h-100">
  77.         {% elseif o.type.id == "3" %}
  78.           <a href="{{ path('o.roadtrip.destination',{slug:o.slug})}}" class="stretched-link text-decoration-none text-white">
  79.           <div class="ratio ratio-4x5">
  80.               <img src="{{asset('img/offer/road/' ~ o.slug  ~ '/' ~ o.img)}}" alt="{{ o.title }}" class="object-fit-cover w-100 h-100">
  81.         {% elseif o.type.id == "4" %}
  82.           <a href="{{ path('o.croisiere.destination',{slug:o.slug})}}" class="stretched-link text-decoration-none text-white">
  83.           <div class="ratio ratio-4x5">
  84.               <img src="{{asset('img/offer/croisiere/' ~ o.slug  ~ '/' ~ o.img)}}" alt="{{ o.title }}" class="object-fit-cover w-100 h-100">
  85.         {% endif %}
  86.             </div>
  87.             <div class="card-img-overlay d-flex flex-column justify-content-end p-3 p-md-4">
  88.               <h3 class="h5 fw-bold text-white text-shadow-sm mb-3">{{ o.title }}</h3>
  89.               <div>
  90.                 <span class="btn btn-outline-light btn-sm rounded-pill">Découvrir</span>
  91.               </div>
  92.             </div>
  93.           </a>
  94.         </article>
  95.       </div>
  96.       {% endfor %}
  97.     </div>
  98.     <div class="section-divider mx-auto my-5"></div>
  99.   </div>
  100. </section>
  101. {% endblock %}
  102. {% block extra_head %}
  103.   {{ parent() }}
  104.   <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.css">
  105.   <style>
  106.     .text-shadow-sm{ text-shadow:0 2px 4px rgba(0,0,0,.35); }
  107.     .text-ot-green{ color: var(--ot-primary, #2ea37a); }
  108.     .bg-ot-green{ background: var(--ot-primary, #2ea37a); }
  109.   </style>
  110. {% endblock %}