2
0

blog_index_page.html 1.8 KB

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