{% extends "index.html" %}

{% block title %}{{ SITENAME }} - Authors{% endblock title %}

{% block header %}
    <!-- Page Header -->
    <!-- Set your background image for this header on the line below. -->
    <header id="blog-header" class="has-cover">
      <div class="inner">
        <nav id="navigation">
          {% if SITE_LOGO %}
            <span class="blog-logo">
                <a href="{{ SITEURL }}"><img src="{{SITE_LOGO}}" alt="Blog Logo" /></a>
            </span>
          {% else %}
            <span id="home-button" class="nav-button">
                <a class="home-button" href="{{ SITEURL }}" title="Home"><i class="ic ic-arrow-left"></i> Home</a>
            </span>
          {% endif %}
          <span id="menu-button" class="nav-button">
            <a class="menu-button"><i class="ic ic-menu"></i> Menu</a>
          </span>
        </nav>
        <h1 class="post-title">Articles by {{ author|capitalize }}</h1>
        {% if HEADER_COVER %}
            <div class="blog-cover cover" style="background-image: url('{{ HEADER_COVER }}')">            
        {% elif HEADER_COLOR %}
            <div class="post-cover cover" style="background-color: {{ HEADER_COLOR }}">
        {% else %}
            <div class="post-cover cover" style="background-image: url('{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/post-bg.jpg')">
        {% endif %}        
      </div>
    </header>    
{% endblock header %}

{% block content %}
    {% for author, articles in authors|sort %}
      <article class="post">
        <div class="inner">
            <a href="{{ SITEURL }}/{{ author.url }}" rel="bookmark">
                <h2 class="post-title">
                    {{ author }} ({{ articles|count }})
                </h2>
            </a>
        </div>
      </article>
      {% if not loop.last %}
      <hr>
      {% endif %}
    {% endfor %}
{% endblock content %}
