{% extends 'article/list.html' %}

{% load i18n static %}

{% 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><a href="{% url 'baykearticle:category-detail' article.category.id %}">{{ article.category.name }}</a></li>
			<li class="is-active"><a href="#" aria-current="page">{{ article.title }}</a></li>
		</ul>
	</nav>
</div>
{% endblock %}

{% block article_content %}
<div class="box">
    <h1 class="title has-text-centered py-4">
        {{ article.title }}
    </h1>
    <p class="subtitle has-text-grey has-text-centered" style="font-size: 14px;">
        分类：<a href="{% url 'baykearticle:category-detail' article.category.id %}">{{ article.category.name }}</a>&nbsp;
        时间：{{ article.pub_date|timesince }}前&nbsp;
        {% if article.tags.count %}
        标签：{{ article.tags.all|join:'' }}&nbsp;
        {% endif %}
    </p>
    <div class="dropdown-divider"></div>
    <div class="content">
        {{ article.content|safe }}
    </div>
</div>
<div class="box">
    <div class="is-flex is-align-items-center is-justify-content-space-between">
        <div>上一篇: <a href="{% url 'baykearticle:content-detail' article_previous.id %}">{{ article_previous.title }}</a></div>
        <div>下一篇: <a href="{% url 'baykearticle:content-detail' article_next.id %}">{{ article_next.title }}</a></div>
    </div>
</div>
{% endblock %}
        