categories.html 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. {% extends 'base.html' %}
  2. {% block title %}
  3. All Categories · {{ super() }}
  4. {% endblock title %}
  5. {% block head_description %}
  6. All categories of the {{ SITENAME|striptags }} blog.
  7. {% endblock head_description %}
  8. {% block feed_links %}
  9. {{ super() }}
  10. {% include '_includes/feeds_categories.html' %}
  11. {% endblock feed_links %}
  12. {% block content %}
  13. <div class="row-fluid">
  14. <header class="page-header span10 offset2">
  15. <h1><a href="{{ SITEURL }}/categories.html">All Categories</a></h1>
  16. </header>
  17. </div>
  18. <div class="row-fluid">
  19. <div class="span8 offset2">
  20. <div class="accordion" id="accordion2">
  21. {% for category, articles in categories %}
  22. <div class="accordion-group">
  23. <div class="accordion-heading">
  24. <a class="accordion-toggle list-of-categories" data-toggle="collapse" data-parent="#accordion2" href="#{{ category.slug }}-ref">
  25. {% set num = articles|count %}
  26. {{ category }}<span>{{ num }}</span>
  27. </a>
  28. </div>
  29. <div id="{{ category.slug }}-ref" class="accordion-body collapse">
  30. <div class="accordion-inner">
  31. <ul class="list-articles-category">
  32. {% for article in articles %}
  33. <li><time pubdate="pubdate" datetime="{{ article.date.isoformat() }}">{{ article.locale_date }}</time><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }} {%if article.subtitle %} <small> {{ article.subtitle }} </small> {% endif %} </a></li>
  34. {% endfor %}
  35. </ul>
  36. </div>
  37. </div>
  38. </div>
  39. {% endfor %}
  40. </div>
  41. </div>
  42. </div>
  43. {% endblock content %}
  44. {% block script %}
  45. {{ super() }}
  46. <script language="javascript" type="text/javascript">
  47. function uncollapse() {
  48. $(window.location.hash).collapse({
  49. toggle: true
  50. })
  51. }
  52. </script>
  53. <script type="text/javascript" language="JavaScript">
  54. uncollapse();
  55. </script>
  56. {% endblock script %}