templates/home/index.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block body %}
  3. <div id="myCarousel" class="carousel slide mb-6" data-bs-ride="carousel">
  4. <div class="carousel-indicators">
  5. {% if headers|length > 1 %}
  6. {% for key,header in headers %}
  7. <button type="button" data-bs-target="#myCarousel" data-bs-slide-to="{{key}}" {% if key == 0 %} class="active" aria-current="true" {% endif %} aria-label="{{ header.title }}"></button>
  8. {% endfor %}
  9. {% endif %}
  10. </div>
  11. <div class="carousel-inner">
  12. {% for key,header in headers %}
  13. <div class="carousel-item {% if key == 0 %} active {% endif %}">
  14. <img src="/uploads/{{header.illustration}}" class="bd-placeholder-img" width="100%" height="100%" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" preserveAspectRatio="xMidYMid slice" focusable="false"><rect width="100%" height="100%" fill="var(--bs-secondary-color)"/></img>
  15. <div class="container">
  16. <div class="carousel-caption text-start">
  17. <h1>{{header.title}}</h1>
  18. <p class="opacity-75">{{header.content}}</p>
  19. <p><a class="btn btn-lg btn-primary" href="{{header.buttonLink}}">{{header.buttonTitle}}</a></p>
  20. </div>
  21. </div>
  22. </div>
  23. {% endfor %}
  24. </div>
  25. {% if headers|length > 1 %}
  26. <button class="carousel-control-prev" type="button" data-bs-target="#myCarousel" data-bs-slide="prev">
  27. <span class="carousel-control-prev-icon" aria-hidden="true"></span>
  28. <span class="visually-hidden">Previous</span>
  29. </button>
  30. <button class="carousel-control-next" type="button" data-bs-target="#myCarousel" data-bs-slide="next">
  31. <span class="carousel-control-next-icon" aria-hidden="true"></span>
  32. <span class="visually-hidden">Next</span>
  33. </button>
  34. {% endif %}
  35. </div>
  36. <!-- Marketing messaging and featurettes
  37. ================================================== -->
  38. <!-- Wrap the rest of the page in another container to center all the content. -->
  39. <div class="container marketing">
  40. <!-- Three columns of text below the carousel -->
  41. <div class="row">
  42. {% for product in productsInHomepage %}
  43. <div class="col-lg-4">
  44. <img src="/uploads/{{ product.illustration }}" class="img-fluid">
  45. <h2 class="fw-normal mt-2">{{ product.name }}</h2>
  46. <div class="opacity-75" style="font-size: 14px;">
  47. {{ product.description|raw }}
  48. </div>
  49. <p><a class="btn btn-secondary mt-2" href="{{ path('app_product', { slug: product.slug }) }}">Découvrir</a></p>
  50. </div>
  51. {% endfor %}
  52. </div><!-- /.row -->
  53. <!-- START THE FEATURETTES -->
  54. <hr class="featurette-divider">
  55. <!-- /END THE FEATURETTES -->
  56. </div><!-- /.container -->
  57. {% endblock %}