{% extends "base.html" %} {% block content %} {% if articles %} {% for article in articles_page.object_list %} {% if loop.first and not articles_page.has_previous() %}

{{ article.title }}

{{ article.content }}

{% include 'block_article_detail.html' %}

{% if DISQUS_SITENAME %} {% endif %}
{% if DEFAULT_PAGINATION and loop.length == 1 and articles_page.has_next() %} {% endif %} {% else %}

{{ article.title }}

{{ article.summary }} {% if article.content|length > article.summary|length %}

Read more

{% endif %}

{% include 'block_article_detail.html' %}

{% if DISQUS_SITENAME %} {% endif %}
{% if DEFAULT_PAGINATION and loop.last and (articles_page.has_previous() or articles_page.has_next()) %} {% endif %} {% endif %} {% endfor %} {% else %} {% for page_num in range(1, PAGES|length + 1) %} {# TODO: improve wasteful inner loop #} {% for page_iter in PAGES if page_iter.order and page_iter.order|int > 0 %} {% if page_iter.order|int == page_num %}

{{ page_iter.title }}

{% endif %} {% endfor %} {% endfor %} {% for page_iter in PAGES if not page_iter.order %}

{{ page_iter.title }}

{% endfor %} {% endif %} {% endblock content %}