{% extends "djpress/base.html" %}
{% load djpress_tags %}

{% block main %}

  {% category_name "h1" pre_text="View Posts in the " post_text=" Category" %}
  {% author_name "h1" pre_text="View Posts by " %}

  {% if post %}

    <article>
      <header>
        <h1>{% post_title_link %}</h1>
        <p>By {% post_author_link %}. {% post_date_link %}</p>
      </header>
      <section>
        {% post_content %}
      </section>
      <footer>
        <p>Categories: {% post_categories_link "span" "badge" %}</p>
      </footer>
    </article>

  {% else %}

    {% for post in posts %}

      <article>
        <header>
          <h1>{% post_title_link %}</h1>
          <p>By {% post_author_link %}. {% post_date_link %}</p>
        </header>
        <section>
          {% post_content %}
        </section>
      </article>

    {% empty %}

      <p>No posts available.</p>

    {% endfor %}

  {% endif %}


  {% posts_nav_links %}

{% endblock main %}
