{% extends "base_blog_section.html" %}

{% block title %}Posts by {{ author|e }} | {{ M_BLOG_NAME|e }}{% endblock %}

{% block meta %}
  {% if author.page and author.page.description %}
  <meta name="description" content="{{ author.page.description|dehyphenate|striptags|e }}" />
  {% endif %}
{% endblock %}

{% block social_title_url_image %}
  {% if author.page and author.page.twitter %}
  <meta name="twitter:creator" content="{{ author.page.twitter }}" />
  {% endif %}
  {% if author.page and author.page.twitter_id %}
  <meta name="twitter:creator:id" content="{{ author.page.twitter_id }}" />
  {% endif %}
  <meta property="og:title" content="{% if author.page and author.page.title %}{{ author.page.title }}{% else %}{{ author|e }}{% endif %}" />
  <meta name="twitter:title" content="{% if author.page and author.page.title %}{{ author.page.title }}{% else %}{{ author|e }}{% endif %}" />
  <meta property="og:url" content="{{ author.url|format_siteurl|e }}" />
  {% if author.page and author.page.summary %}
  <meta property="og:description" content="{{ author.page.summary|dehyphenate|striptags|e }}" />
  <meta name="twitter:description" content="{{ author.page.summary|dehyphenate|striptags|e }}" />
  {% endif %}
  {% if author.page and author.page.image %}
  <meta property="og:image" content="{{ author.page.image|expand_link(author.page)|e }}" />
  <meta name="twitter:image" content="{{ author.page.image|expand_link(author.page)|e }}" />
  {% elif M_SOCIAL_IMAGE %}
  <meta property="og:image" content="{{ M_SOCIAL_IMAGE|format_siteurl|e }}" />
  <meta name="twitter:image" content="{{ M_SOCIAL_IMAGE|format_siteurl|e }}" />
  {% endif %}
{% endblock %}

{% block content_title %}
      <div class="m-info m-note">
        Showing only posts by <em>{{ author|e }}</em>. <a href="{{ M_BLOG_URL|format_siteurl|e }}">Show all posts.</a>
      </div>
      {% if author.page and author.page.content and articles_page.number == 1 %}
      <div class="m-block m-success{% if author.page.image %} m-badge{% endif %}">
        {% if author.page.image %}
        <img src="{{ author.page.image|expand_link(author.page)|e }}" alt="{{ author|e }}" />
        {% endif %}
        <h3>{% if author.page.title %}{{ author.page.title }}{% else %}{{ author|e }}{% endif %}</h3>
        {{ author.page.content|rtrim|indent(8) }}
      </div>
      {% endif %}
{% endblock %}
