{% extends "misago/threadslist/base.html" %}
{% load i18n misago_absoluteurl misago_shorthands misago_stringutils %}


{% block title %}
  {% if list_name %}
    {{ list_name }} | {{ category }} | {{ block.super }}
  {% else %}
    {{ category }} | {{ block.super }}
  {% endif %}
{% endblock title %}


{% block meta-description %}
  {% if category.description %}
    {{ category.description }}
  {% endif %}
{% endblock meta-description %}


{% block og-title %}{{ category }}{% endblock %}
{% block twitter-title %}{{ category }}{% endblock %}


{% block og-description %}
  {% if category.description %}
    {{ category.description }}
  {% endif %}
{% endblock og-description %}


{% block twitter-description %}
  {% if category.description %}
    {{ category.description }}
  {% endif %}
{% endblock twitter-description %}


{% block og-url %}{% absoluteurl request_path %}{% endblock %}
{% block twitter-url %}{% absoluteurl request_path %}{% endblock %}


{% block extra-css %}
  {% if category.css_class %}
    page-threads-{{ category.css_class }}
  {% endif %}
{% endblock extra-css %}


{% block page-header %}
<div class="container page-header-container">
  <div class="page-header page-header-{{ category.css_class|default:'category-threads' }}">
    <div class="page-header-bg-image">
      <div class="page-header-bg-overlay">
        <div class="page-header-image"></div>
        <div class="page-header-banner page-header-banner-{{ category.css_class|default:'category-threads' }}">
          <div class="page-header-banner-bg-image">
            <div class="page-header-banner-bg-overlay">
              <h1>{{ category }}</h1>
            </div>
          </div>
        </div>
        {% if category.description %}
          <div class="page-header-details">
            <div class="page-header-message">
              {{ category.description|force_escape|urlize|linebreaks|safe }}
            </div>
          </div>
        {% endif %}
      </div>
    </div>
  </div>
</div>
{% endblock page-header %}


{% block list-container %}
  {% include "misago/threadslist/toolbar.html" %}

  {{ block.super }}
{% endblock list-container%}