{% extends "planet/base.html" %}
{% load i18n pagination_tags planet_tags %}

{% block head_title %}{% trans 'Authors list' %} :: {{ site.name }}{% endblock %}

{% block extra_head %}
    <meta name="title" content="{% trans 'Authors' %} :: {{ site.name }}" />
    <meta name="description" content="{% trans 'Authors of blogs about Django' %} " />
    <meta name="robots" content="index, follow" />
{% endblock %}

{% block breadcrumb_section %}
    <li class="breadcrumb-item active" aria-current="page">{% trans 'Authors' %}</li>
{% endblock %}

{% block authors_class %}class="active"{% endblock %}

{% block content %}
<h1>{% trans "Authors" %}</h1>
<div class="author-list container px-0">
    {% autopaginate authors_list 20 %}
    {% for author in authors_list %}
    <div class="row mb-3">
        <h3>
          <a class="text-success text-decoration-none" href="{{ author.get_absolute_url }}" title="{% trans 'Author:' %} {{ author.name }}">
              {{ author.name }}
          </a>
        </h3>
        <div>
          {% trans "writes for:" %}
          {% blogs_for_author author as author_blogs %}
          {% for blog in author_blogs %}
            <a class="text-success text-decoration-none" href="{{ blog.get_absolute_url }}">{{ blog.title }}</a>
            {% if not forloop.last %}, {% endif %}
          {% endfor %}
        </div>
    </div>
    {% endfor %}
    {% paginate %}
</div>
{% endblock %}
