categories.html 1.5 KB

123456789101112131415161718192021222324252627282930313233343536
  1. {% extends "base.html" %}
  2. {% block title %}Categories - {{ SITENAME }}{% endblock %}
  3. {% block breadcrumbs %}
  4. {% if DISPLAY_BREADCRUMBS %}
  5. <ol class="breadcrumb">
  6. <li><a href="{{ SITEURL }}" title="{{ SITENAME }}"><i class="fa fa-home fa-lg"></i></a></li>
  7. <li class="active">Categories</li>
  8. </ol>
  9. {% endif %}
  10. {% endblock %}
  11. {% block content %}
  12. <section id="categories">
  13. <h1>All Categories for {{ SITENAME }}</h1>
  14. <div class="panel-group" id="accordion">
  15. {% for category, articles in categories %}
  16. <div class="panel panel-default">
  17. <div class="panel-heading">
  18. <h4 class="panel-title">
  19. <a data-toggle="collapse" data-parent="#accordion" href="#collapse-{{category.slug}}">{{ category }} <span class="badge pull-right">{{ articles|count }}</span></a>
  20. </h4>
  21. </div>
  22. <div id="collapse-{{category.slug}}" class="panel-collapse collapse">
  23. <div class="panel-body">
  24. {% for article in articles %}
  25. <p><span class="categories-timestamp"><time datetime="{{ article.date.isoformat() }}">{{ article.locale_date }}</time></span> <a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></p>
  26. {% endfor %}
  27. </div>
  28. </div>
  29. </div>
  30. {% endfor %}
  31. </div>
  32. </section>
  33. {% endblock %}