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


{% block title %}
{% if list_name %}
  {% if paginator.page > 1 %}
    {{ list_name }} ({% blocktrans with page=paginator.page %}page: {{ page }}{% endblocktrans %}) | {{ category }} | {{ block.super }}
  {% else %}
    {{ list_name }} | {{ category }} | {{ block.super }}
  {% endif %}
{% elif paginator.page > 1 %}
  {{ category }} ({% blocktrans with page=paginator.page %}page: {{ page }}{% endblocktrans %}) | {{ block.super }}
{% else %}
  {{ category }} | {{ block.super }}
{% endif %}
{% endblock title %}


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


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


{% block page-header %}
<div class="page-header {{ user.is_authenticated|iftrue:"tabbed" }}">
  <div class="container">
    <a href="{{ category.parent.get_absolute_url }}{% if list_type != 'all' %}{{ list_type }}/{% endif %}" class="btn btn-default btn-aligned btn-icon btn-go-back pull-left">
      <span class="material-icon">
        keyboard_arrow_left
      </span>
    </a>

    <h1 class="pull-left">
      {{ category }}
    </h1>
  </div>
  {% if user.is_authenticated %}
    {% include "misago/threadslist/tabs.html" %}
  {% endif %}
</div>
{% endblock page-header %}


{% block list-container %}
  {% if category.description %}
  <div class="category-description">
    <div class="page-lead {{ category.description|escape|linebreaks|isdescriptionshort|iftrue:"lead" }}">
      {{ category.description|escape|urlize|linebreaks|safe }}
    </div>
  </div>
  {% endif %}

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