templates/page/category/list.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block page_title %}
  3. {{ 'storefront.title'|resolve|striptags }} | Kategorien
  4. {% endblock %}
  5. {% block head_custom_stylesheets %}
  6. {{ encore_entry_link_tags('hero-header') }}
  7. {{ encore_entry_link_tags('category') }}
  8. {% endblock head_custom_stylesheets %}
  9. {% block content %}
  10. <div class="container-3xl my-5 mt-sm-6 mb-sm-4">
  11. <div class="row">
  12. <div class="col-12">
  13. <h1 class="ornament-with-child">{{ 'category.page.headline'|resolve }}</h1>
  14. {{ 'category.page.description'|resolve }}
  15. </div>
  16. </div>
  17. </div>
  18. <div class="container-3xl mb-6">
  19. {% for category_batch in tenant.categories|batch(4) %}
  20. <div class="row nth-group">
  21. {% for category in category_batch %}
  22. <div class="col-12 col-md-6 nth-group-item">
  23. <div class="mb-4 nth-group-item-background position-relative d-flex flex-column justify-content-between overflow-hidden p-5 min-h-24">
  24. {% if category.listImage %}
  25. <img class="d-none d-md-block position-absolute end--2 product-image" src="/images/{{ category.listImage }}" alt="{{ category.name }}" class="img-fluid">
  26. {% else %}
  27. <img width="64" class="d-none d-md-block position-absolute opacity-25 end--2 product-image" src="{{ asset('build/images/icons/box.svg') }}" alt="{{ category.name }}" class="img-fluid">
  28. {% endif %}
  29. <div class="row">
  30. <div class="col-12 col-sm-8">
  31. <h4 class="mb-4">{{ category.name }}</h4>
  32. <p class="text-break line-clamp clamp-4">{{ category.description }}</p>
  33. {% if category.listImage %}
  34. <img class="d-md-none mx-auto w-75 mb-4 mb-sm-0" src="/images/{{ category.listImage }}" alt="{{ category.name }}" class="img-fluid">
  35. {% else %}
  36. <img width="64" class="d-md-none mx-auto w-75 mb-4 mb-sm-0 opacity-25" src="{{ asset('build/images/icons/box.svg') }}" alt="{{ category.name }}" class="img-fluid">
  37. {% endif %}
  38. </div>
  39. </div>
  40. <a href="{{ path('products', {categoryId: category.id}) }}" class="d-flex justify-content-end align-items-center text-decoration-none fw-bold"><span class="me-2">Zur Produktübersicht</span><i class="fas fa-arrow-right"></i></a>
  41. </div>
  42. </div>
  43. {% endfor %}
  44. </div>
  45. {% endfor %}
  46. </div>
  47. {% endblock %}