{% extends 'base.html' %}
{% block title %}Archived news{% endblock %}
{% block content %}
    <h1>Archived news</h1>
    {% if news %}<p>Stories are ordered by original publishing date.</p>{% endif %}
    <p>
        You can also <a href="{% url 'view_recent_news' %}">view recent news</a>.
    </p>
    {% if previous_page_number or next_page_number %}
        <nav>
            <ul class="pager">
                {% if previous_page_number %}
                    <li class="previous">
                        <a href="{% url 'view_archived_news' previous_page_number %}" style="margin-right:7px">« Newer</a>
                    </li>
                {% endif %}
                {% if next_page_number %}
                    <li class="previous">
                        <a href="{% url 'view_archived_news' next_page_number %}">Older »</a>
                    </li>
                {% endif %}
            </ul>
        </nav>
    {% endif %}
    <div class="row">
        {% for story in news %}
            <div class="col-sm-12">
                <h3>{{ story.title }}</h3>
                <p>{{ story.all_content|safe|linebreaksbr }}</p>
            </div>
        {% empty %}
            <div class="col-sm-12">There's no archived news!</div>
        {% endfor %}
    </div>
{% endblock %}
