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


{% block title %}
  {% if THREADS_ON_INDEX %}
    {% trans "Categories" context "categories page" %} | {{ block.super }}
  {% else %}
    {{ settings.index_title|default:settings.forum_name }}
  {% endif %}
{% endblock title %}


{% block meta-description %}
  {% if not THREADS_ON_INDEX and settings.index_meta_description %}
    {{ settings.index_meta_description }}
  {% else %}
    {% blocktrans trimmed count categories=categories_list|length with forum_name=settings.forum_name context "categories page" %}
      There is {{ categories }} main category currenty available on the {{ forum_name }}.
    {% plural %}
      There are {{ categories }} main categories currenty available on the {{ forum_name }}.
    {% endblocktrans %}
  {% endif %}
{% endblock meta-description %}


{% block og-title %}
  {% if THREADS_ON_INDEX %}
    {% trans "Categories" context "categories page" %}
  {% else %}
    {{ settings.index_title|default:settings.forum_name }}
  {% endif %}
{% endblock og-title %}


{% block twitter-title %}
  {% if THREADS_ON_INDEX %}
    {% trans "Categories" context "categories page" %}
  {% else %}
    {{ settings.index_title|default:settings.forum_name }}
  {% endif %}
{% endblock twitter-title %}


{% block og-description %}
  {% if not THREADS_ON_INDEX and settings.index_meta_description %}
    {{ settings.index_meta_description }}
  {% else %}
    {% blocktrans trimmed count categories=categories_list|length with forum_name=settings.forum_name context "categories page" %}
      There is {{ categories }} main category currenty available on the {{ forum_name }}.
    {% plural %}
      There are {{ categories }} main categories currenty available on the {{ forum_name }}.
    {% endblocktrans %}
  {% endif %}
{% endblock og-description %}


{% block twitter-description %}
  {% if not THREADS_ON_INDEX and settings.index_meta_description %}
    {{ settings.index_meta_description }}
  {% else %}
    {% blocktrans trimmed count categories=categories_list|length with forum_name=settings.forum_name context "categories page" %}
      There is {{ categories }} main category currenty available on the {{ forum_name }}.
    {% plural %}
      There are {{ categories }} main categories currenty available on the {{ forum_name }}.
    {% endblocktrans %}
  {% endif %}
{% endblock twitter-description %}


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


{% block content %}
<div class="page page-categories{{ categories|iffalse:' page-message' }}">
  {% include "misago/categories/header.html" %}
  <div class="container page-container">
    {% pluginoutlet CATEGORIES_LIST_START %}
    {% if categories_list %}
      {% include "misago/categories/categories_list_body.html" with items=categories_list %}
    {% else %}
      {% include "misago/categories/empty_message.html" %}
    {% endif %}
    {% pluginoutlet CATEGORIES_LIST_END %}
  </div>
</div>
{% endblock content %}