categories.html 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. {% extends "base.html" %}
  2. {% block title %}
  3. All Categories - {{ super() }}
  4. {% endblock title %}
  5. {% block content %}
  6. <div class="row-fluid">
  7. <header class="page_header span7 offset3">
  8. <h1>All Categories</h1>
  9. </header>
  10. </div>
  11. <div class="row-fluid">
  12. <div class="span7 offset3">
  13. <div class="accordion" id="accordion2">
  14. {% for category, articles in categories %}
  15. <div class="accordion-group">
  16. <div class="accordion-heading">
  17. <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapse{{ category|replace(' ', '_')|e }}">
  18. {% set num = articles|count %}
  19. {{ num }}
  20. {% if num > 1 %}
  21. articles
  22. {% else %}
  23. article
  24. {% endif %}
  25. filed in {{ category }}
  26. </a>
  27. </div>
  28. <div id="collapse{{ category|replace(' ', '_')|e }}" class="accordion-body collapse">
  29. <div class="accordion-inner">
  30. Anim pariatur cliche...
  31. </div>
  32. </div>
  33. </div>
  34. {% endfor %}
  35. </div>
  36. </div>
  37. </div>
  38. {% endblock content %}