blog_index_page.html 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. {% extends "base.html" %}
  2. {% load wagtailcore_tags navigation_tags wagtailimages_tags %}
  3. {% if tag %}
  4. {% block title %}
  5. Viewing all blog posts sorted by the tag {{ tag }}
  6. {% endblock %}
  7. {% endif %}
  8. {% block content %}
  9. {% if not tag %}
  10. {% include "base/include/header-index.html" %}
  11. {% endif %}
  12. <div class="container">
  13. {% if tag %}
  14. <div class="row">
  15. <div class="col-md-12">
  16. <h1 class="index-header__title">Blog</h1>
  17. </div>
  18. <div class="col-md-12">
  19. <p class="index-header__introduction">Viewing all blog posts sorted by the tag <span class="blog-tags__tag">{{ tag }}</span>.</p>
  20. </div>
  21. </div>
  22. {% endif %}
  23. {% if page.get_child_tags %}
  24. <ul class="blog-tags">
  25. <li><span class="blog-tags__pill blog-tags__pill--selected">All</span></li>
  26. {% for tag in page.get_child_tags %}
  27. <li><a class="blog-tags__pill" aria-label="Filter by tag name {{ tag }}" href="{{ tag.url }}">{{ tag }}</a></li>
  28. {% endfor %}
  29. </ul>
  30. {% endif %}
  31. <div class="blog-list">
  32. {% if posts %}
  33. {% for blog in posts %}
  34. {% include "includes/card/blog-listing-card.html" %}
  35. {% endfor %}
  36. {% else %}
  37. <div class="col-md-12">
  38. <p>Oh, snap. Looks like we were too busy baking to write any blog posts. Sorry.</p>
  39. </div>
  40. {% endif %}
  41. </div>
  42. </div>
  43. {% endblock content %}