pagelist_article_media.html 916 B

123456789101112131415161718192021222324
  1. {% extends "coderedcms/blocks/base_block.html" %}
  2. {% load wagtailcore_tags wagtailimages_tags %}
  3. {% block block_render %}
  4. {% for page in pages %}
  5. {% with page.specific as article %}
  6. <div class="d-flex">
  7. {% if article.cover_image %}
  8. <div class="flex-shrink-0">
  9. {% image article.cover_image fill-800x450 format-webp preserve-svg as cover_image %}
  10. <a href="{{article.url}}"><img class="me-3" src="{{cover_image.url}}" alt="{{cover_image.title}}"></a>
  11. </div>
  12. {% endif %}
  13. <div class="flex-grow-1 ms-3">
  14. <h5 class="mt-0"><a href="{{article.url}}">{{article.title}}</a></h5>
  15. <div class="card-subtitle mb-2 text-muted">{{article.seo_published_at}} &bull; {{article.seo_author}}</div>
  16. <div class="card-subtitle mb-2 text-muted">{{article.caption}}</div>
  17. {% if self.show_preview %}
  18. <p>{{article.body_preview}}</p>
  19. {% endif %}
  20. </div>
  21. </div>
  22. {% endwith %}
  23. {% endfor %}
  24. {% endblock %}