12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- {% extends "base.html" %}
- {% block title %}
- All Categories - {{ super() }}
- {% endblock title %}
- {% block content %}
- <script language="javascript" type="text/javascript">
- function uncollapse() {
- $(window.location.hash).collapse({
- toggle: true
- })
- }
- </script>
- <div class="row-fluid">
- <header class="page_header span10 offset2">
- <h1>All Categories</h1>
- </header>
- </div>
- <div class="row-fluid">
- <div class="span8 offset2">
- <div class="accordion" id="accordion2">
- {% for category, articles in categories %}
- <div class="accordion-group">
- <div class="accordion-heading">
- <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#{{ category|replace(' ', '-')|e }}-ref">
- {% set num = articles|count %}
- {{ num }}
- {% if num > 1 %}
- articles
- {% else %}
- article
- {% endif %}
- filed in {{ category }}
- </a>
- </div>
- <div id="{{ category|replace(' ', '-')|e }}-ref" class="accordion-body collapse">
- <div class="accordion-inner">
- <ul>
- {% for article in articles %}
- {% set day = article.date.strftime('%d')|int %}
- <li>{{ article.date.strftime('%b') }} {{ day }}{{ article.date.strftime(', %Y') }} <a href="{{ article.url }}">{{ article.title }}</a></li>
- {% endfor %}
- </ul>
- </div>
- </div>
- </div>
- {% endfor %}
- </div>
- </div>
- </div>
- <script type="text/javascript" language="JavaScript">
- uncollapse();
- </script>
- {% endblock content %}
|