templates/home/index.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block carousel %}
  3. {% endblock %}
  4. {% block content %}
  5. <div class="row">
  6. {% for category in categories %}
  7. <div class="col-lg-4">
  8. <img class="bd-placeholder-img rounded-circle" width="140" height="140" src="{{ asset('assets/img/presentation/' ~ category.image) }}"
  9. alt="{{ category.name }}" />
  10. <h2>{{ category.name }}</h2>
  11. <p>{{ category.description }}</p>
  12. <p><a class="btn btn-secondary" href="{{ path('product_by_category', { 'category' : category.name } ) }}" role="button">Voir les détails &raquo;</a></p>
  13. </div>
  14. {% endfor %}
  15. </div>
  16. {% for key, product in products %}
  17. <div class="row featurette">
  18. {% if key == 1 %}
  19. <div class="col-md-3">
  20. <img src="{{ asset('uploads/' ~ product.illustration) }}" class="img-thumbnail">
  21. </div>
  22. <div class="col-md-7">
  23. <h2 class="featurette-heading"><span class="text-muted">{{ product.name }}</span></h2>
  24. <p class="lead">
  25. {{ product.description }}
  26. </p>
  27. </div>
  28. {% else %}
  29. <div class="col-md-7">
  30. <h2 class="featurette-heading"><span class="text-muted">{{ product.name }}</span></h2>
  31. <p class="lead">
  32. {{ product.description }}
  33. </p>
  34. </div>
  35. <div class="col-md-3">
  36. <img src="{{ asset('uploads/' ~ product.illustration) }}" class="img-thumbnail">
  37. </div>
  38. {% endif %}
  39. </div>
  40. <hr class="featurette-divider">
  41. {% endfor %}
  42. {% endblock %}