{%- block info_header %}
<header class="lander-info-header">
  {% if metadata.identifier %}
  <span class="lander-info-header__identifier">
    {{ metadata.identifier }}
  </span>
  {% endif %}
  <h1 class="lander-h1 lander-info-header__title">{{ metadata.title }}</h1>
</header>
{%- endblock info_header %}

{% if metadata.authors %}
<section class="lander-info-authors">
  <ul class='lander-comma-list'>
  {% for author in metadata.authors %}
    <li>
    {% if author.orcid %}
      <a href="{{ author.orcid|safe }}">{{ author.name }}</a>
    {% else %}
    {{ author.name }}
    {% endif %}
    </li>
  {% endfor %}
  </ul>
</section>
{% endif %}

{%- block info_abstract %}
{% if metadata.abstract.html %}
<section class="lander-info-abstract">
  <h2 class="lander-h2 lander-info-abstract__header">Abstract</h2>
  {{ config.abstract.html|safe }}
</section>
{% endif %}
{%- endblock info_abstract %}

{%- block info_downloads %}
<section class="lander-info-downloads">
  <h2 class="lander-h2 lander-info-downloads__header">Download</h2>
  {%- block info_downloads_filelist %}
  <ul class="lander-info-filelist">
    <li><a href="{{ pdf.name|safe }}" download>{{ pdf.name }}</a> ({{ pdf.human_size }})</li>
    {% for item in attachments %}
    <li><a href="{{ item.name|safe }}" download>{{ item.name }}</a> ({{ pdf.human_size }})</li>
    {% endfor %}
  </ul>
  {%- endblock info_downloads_filelist %}
</section>
{%- endblock info_downloads %}

{%- block info_metadata %}
<section class="lander-info-metadata">
<h2 class="lander-h2 lander-info-metadata__header">Metadata</h2>
<dl class="lander-info-metadata__list>">
{% if metadata.version %}
  <dt>Version</dt>
  <dd>{{ metadata.version }}</dd>
{% endif %}
{% if metadata.date_modified %}
  <dt>Updated</dt>
  <dd><time datetime="{{ metadata.date_modified | simple_date }}">{{ metadata.date_modified | simple_date }}</time></dd>
{% endif %}
{% if metadata.repository_url %}
  <dt>Source repository</dt>
  <dd><a href="{{ metadata.repository_url }}">{{ metadata.repository_url }}</a></dd>
{% endif %}
{% if metadata.keywords %}
  <dt>Keywords</dt>
  <dd>
    <ul class="lander-comma-list">
    {% for keyword in metadata.keywords %}
    <li>{{ keyword }}</li>
    {% endfor %}
    </ul>
  </dd>
{% endif %}
{% if metadata.license_identifier %}
  <dt>License</dt>
  <dd>{{ metadata.get_license_name() }}</dd>
{% endif %}
</dl>
</section>
{%- endblock info_metadata %}
