{% extends "base.html" %}
{% load djacore_tags %}{% load default_tags %}{% load static %}

{% block title %}{% if obj.seo_title %}{{obj.seo_title}}-{% endif %}{{ obj.name }}{% if pagenum %}-第{{pagenum}}页{% endif %}-{% endblock %}
{% block metades %}{{ obj.description }}{% endblock %}
{% block metakeywork %}{{ obj.keywords }}{% endblock %}

{% block breadcrumb %}
<nav aria-label="breadcrumb">
  <ol class="breadcrumb">
    <li class="breadcrumb-item"><a href="{% get_home_url %}">首页</a></li>
    {% ancestorsnode obj False as breadcrumb %}
    {% for item in breadcrumb %}
    <li class="breadcrumb-item"><a href="{{ item.get_absolute_url }}">{{ item.name }}</a></li>
    {% endfor %}
    <li class="breadcrumb-item active" aria-current="page">{{ obj.name }}</li>
  </ol>
</nav>
{% endblock %}
{% block body_left_center %}
<hr>
{# 获取文章列表 #}
{% image_cate_page category=obj 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.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 %}