{% extends "fluent_faq/base_internal.html" %}
{% load fluent_faq_tags i18n %}

{% block title %}{% trans "FAQ" %}{% endblock %}

{# If the FaqPage is used, display it's values on the top-level index. #}
{% block meta-title %}{% if page.meta_title %}{{ page.meta_title }}{% if page_obj.number > 1 %} | {% trans "Page" %} {{ page_obj.number }}{% endif %}{% else %}{{ block.super }}{% endif %}{% endblock %}
{% block meta-keywords %}{% if page.meta_keywords %}{{ page.meta_keywords }}{% else %}{{ block.super }}{% endif %}{% endblock %}
{% block meta-description %}{% if page.meta_description %}{{ page.meta_description }}{% else %}{{ block.super }}{% endif %}{% endblock %}

{% block content %}
  {% if not categories %}
    {% trans "There are no questions in the FAQ yet." %}
  {% else %}
    <section class="faq-category">
      {% for category, questions in categories %}
        <header>
          <h3><a href="{{ category.url }}">{{ category.title }}</a></h3>
        </header>

        <ul class="faq-questions">
        {% for question in questions %}
          <li><a href="{% get_faq_url question %}">{{ question.title }}</a></li>
        {% endfor %}
        </ul>
      {% endfor %}
    </section>
  {% endif %}
{% endblock %}
