{% load wagtailimages_tags static home_tags %}
本日頭條
查看全部
{% with first_article=section.items|first %} {% if first_article %}
{{ first_article.title }}
{% if first_article.cover_image %} {% image first_article.cover_image max-480x293 as cover %} {% else %} {% random_default_cover as default_cover %} {% endif %}
{{ first_article.date|date:"Y.m.d" }}
{% if first_article.intro %}
{{ first_article.intro }}
{% endif %}
{{ first_article.body_search_text|truncatechars:320 }}
{% else %} 目前沒有文章 {% endif %} {% endwith %}
{% if section.items|length >= 2 %}
{% for article in section.items|slice:"1:4" %}
{% if article.cover_image %} {% image article.cover_image max-194x133 as cover %} {% else %} {% random_default_cover as default_cover %} {% endif %}
{{ article.title }}
{{ article.intro }}
{{ article.date|date:"Y.m.d" }}
{% endfor %}
更多頭條
{% for article in section.items|slice:"4:8" %} {{ article.title }} {% endfor %}
{% endif %}