templates/themes/theme/image-text-grid/grids.html.twig line 1

Open in your IDE?
  1. <div class="container mt-12 mb-12 text-xl font-light">
  2. {% for grid in grids %}
  3. <div class="md:flex">
  4. {% if loop.index is odd %}
  5. <div class="md:w-1/2">
  6. <img src="{{ imageCache('/' ~ grid.getFullImagePath, 'cropResize', 1200, 800) }}" width="685" height="460" alt="{{ grid.title }}" loading="lazy" />
  7. </div>
  8. {% endif %}
  9. {% if loop.index is even %}
  10. <div class="md:hidden md:w-1/2">
  11. <img src="{{ imageCache('/' ~ grid.getFullImagePath, 'cropResize', 1200, 800) }}" width="685" height="440" alt="{{ grid.title }}" loading="lazy" />
  12. </div>
  13. {% endif %}
  14. <div class="md:w-1/2 flex flex-col justify-center cms-area py-12 {{ loop.index is odd ? 'md:pl-12' }} {{ loop.index is even ? 'md:pr-12' }}">
  15. <p><strong>{{ grid.subtitle }}</strong></p>
  16. <h2>{{ grid.title }}</h2>
  17. <div>{{ grid.content|raw }}</div>
  18. {% if grid.image2 or grid.image3 or grid.image4 %}
  19. <div class="flex space-x-2 mt-4">
  20. {% if grid.image2 %}
  21. <img src="{{ imageCache('/' ~ grid.getFullImage2Path, 'scaleResize', 240, 160) }}" height="80" width="120" alt="{{ grid.title }}" loading="lazy" />
  22. {% endif %}
  23. {% if grid.image3 %}
  24. <img src="{{ imageCache('/' ~ grid.getFullImage3Path, 'scaleResize', 240, 160) }}" height="80" width="120" alt="{{ grid.title }}" loading="lazy" />
  25. {% endif %}
  26. {% if grid.image4 %}
  27. <img src="{{ imageCache('/' ~ grid.getFullImage4Path, 'scaleResize', 240, 160) }}" height="80" width="120" alt="{{ grid.title }}" loading="lazy" />
  28. {% endif %}
  29. </div>
  30. {% endif %}
  31. </div>
  32. {% if loop.index is even %}
  33. <div class="hidden md:block md:w-1/2">
  34. <img src="{{ imageCache('/' ~ grid.getFullImagePath, 'cropResize', 1200, 800) }}" width="685" height="440" alt="{{ grid.title }}" loading="lazy" />
  35. </div>
  36. {% endif %}
  37. </div>
  38. {% endfor %}
  39. </div>