← На главную

# Новости MONT

{% if articles %} {% if page == 1 %} {% set top3 = articles[:3] %} {% set rest = articles[3:] %}
Последние новости
{% for a in top3 %} {% if a.image %} {% else %}
📰
{% endif %}
{{ a.created_at[8:10] }}.{{ a.created_at[5:7] }}.{{ a.created_at[:4] }}

## {{ a.title }}

{{ a.body | striptags | truncate(180, true, '...') }}

Читать →
{% endfor %}
{% if rest %}

Ещё новости
{% for a in rest %} {% if a.image %} {% else %}
{% endif %}
{{ a.created_at[8:10] }}.{{ a.created_at[5:7] }}.{{ a.created_at[:4] }}
{{ a.title }}

{{ a.body | striptags | truncate(160, true, '...') }}

{% endfor %} {% endif %} {% else %}

Новости — страница {{ page }}
{% for a in articles %} {% if a.image %} {% else %}
{% endif %}
{{ a.created_at[8:10] }}.{{ a.created_at[5:7] }}.{{ a.created_at[:4] }}
{{ a.title }}

{{ a.body | striptags | truncate(160, true, '...') }}

{% endfor %} {% endif %} {% else %}
Новостей пока нет
{% endif %} {% if total_pages > 1 %}
{% if page > 1 %} ‹ {% endif %} {% for p in range(1, total_pages + 1) %} {% if p == page %} {{ p }} {% elif p == 1 or p == total_pages or (p >= page - 2 and p <= page + 2) %} {{ p }} {% elif p == page - 3 or p == page + 3 %} … {% endif %} {% endfor %} {% if page < total_pages %} › {% endif %}
{% endif %}