{% extends 'system/base_site.html' %}

{% load i18n static bayketags articletags %}

{% block header %}
    {% include 'shop/header.html' %}
{% endblock %}

{% block breadcrumb %}
<div class="container my-4">
	<nav class="breadcrumb is-marginless is-small" aria-label="breadcrumbs">
		<ul>
			<li><a href="{% url 'baykearticle:article-list' %}">首页</a></li>
            <li class="is-active"><a href="#" aria-current="page">{{ title }}</a></li>
		</ul>
	</nav>
</div>
{% endblock %}

{% block section %}
<section class="section1">
    <div class=" container">
        <div class="columns">
            <div class="column is-9">
                {% block article_content %}
                {% for article in page_obj %}
                <div class="box">
                    <h1 class="title is-size-4">
                        <a href="{% url 'baykearticle:content-detail' article.id %}">{{ article.title }}</a>
                    </h1>
                    <p class="subtitle has-text-grey" style="font-size: 14px;">
                        <span class="mr-3">
                            分类:<a href="{% url 'baykearticle:category-detail' article.category.id %}">
                            {{ article.category.name }}</a>
                        </span>
                        <span class="mr-3">时间:{{ article.add_date|timesince }}前</span>
                        {% if article.tags.count %}
                        <span class="mr-3">标签：{{ article.tags.all|join:',' }}</span>
                        {% endif %}
                    </p>
                    <p>{{ article.desc }}...</p>
                </div>
                {% endfor %}
                {% pagination page_obj %}
                {% endblock %}
            </div>
            <div class="column">
                {% block article_sidebar %}
                {% sidebar_category %}
                {% sidebar_archiving %}
                {% sidebar_tags %}
                {% endblock%}    
            </div>
        </div>
    </div>
</section>
{% endblock %}
    
    
    