{% extends "base.html" %}
{% load djacore_tags %}{% load comments_tags %}{% load default_tags %}
{% block title %}{% if site_title %}{{site_title}}-{% endif %}{% endblock %}
{% block metakeywork %}{{meta_keywords}}{% endblock %}
{% block metades %}{{meta_description}}{% endblock %}
{% block body_left_center %}
{# 获取文章列表 #} 
{% article_cate_page  per_page=20 as page_obj %}
{# 内容渲染 #}
  <div class="list">    
    {% for item in page_obj %}  
        <div class="border rounded p-md-3 p-2 mt-3 d-flex  flex-nowrap">
            <a href="{{ item.get_absolute_url }}" rel="nofollow"><img src="{% if item.thumb_image %}{{ uploadpath }}{{item.thumb_image}}{%else%}{% nopic cate=item.category.slug %}{% endif %}" alt="{{ item.title }}"  class="rounded me-3"  onerror="javascript:this.style.display='none'"></a>
            <div class="flex-column d-flex">
                <p class="mb-3 fw-bold">[<a href="{{ item.category.get_absolute_url }}">{{item.category.name}}</a>]<a href="{{ item.get_absolute_url }}">{{ item.title }}</a></p>
                <p class="text-secondary hidden-md">{{ item.meta_description|slice:'120' }}</p>
                <p class="text-secondary mt-auto"> <small>{{ item.update_time }}</small></p>
            </div>
        </div> 
    {% endfor%}
</div>
{# 条件分页导航 #}
{% if page_obj|need_pagination %}
  {% include "widgets/pagination.html" %}
{% endif %}

{% endblock %}
{% block foot_top %}{% show_friend_links %}{% endblock %} 