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


{% block title %}
  {% if THREADS_ON_INDEX %}
    {% if list_name %}
      {{ list_name }} | {{ block.super }}
    {% else %}
      {{ settings.index_title|default:settings.forum_name }}
    {% endif %}
  {% else %}
    {% if list_name %}
      {{ list_name }} | {% trans "Threads" %} | {{ block.super }}
    {% else %}
      {% trans "Threads" %} | {{ block.super }}
    {% endif %}
  {% endif %}
{% endblock title %}


{% block meta-description %}
  {% if THREADS_ON_INDEX and settings.index_meta_description %}
    {{ settings.index_meta_description }}
  {% endif %}
{% endblock meta-description %}


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


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


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


{% block extra-css %}
  page-threads-index
{% endblock extra-css %}


{% block page-header %}
{% if THREADS_ON_INDEX and settings.index_header %}
<div class="container page-header-container">
  <div class="page-header page-header-forum-index">
    <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-forum-index">
          <div class="page-header-banner-bg-image">
            <div class="page-header-banner-bg-overlay">
              <h1>{{ settings.index_header }}</h1>
            </div>
          </div>
        </div>
        {% if settings.index_message %}
          <div class="page-header-details">
            <div class="page-header-message">
              {{ settings.index_message|force_escape|urlize|linebreaks|safe }}
            </div>
          </div>
        {% endif %}
      </div>
    </div>
  </div>
</div>
{% elif not THREADS_ON_INDEX %}
<div class="container page-header-container">
  <div class="page-header page-header-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-threads">
          <div class="page-header-banner-bg-image">
            <div class="page-header-banner-bg-overlay">
              <h1>{% trans "Threads" %}</h1>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
{% endif %}
{% endblock page-header %}


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

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