{% extends "base.html" %}

{% block title %}{{ tag }} - {{ repo }}{% endblock %}

{% block breadcrumbs %}
<ul>
  <li><a href="/">{{ crate::hostname() }}</a></li>
  <li><a href="/{{ repo }}">{{ repo }}</a></li>
  <li><a href="/{{ repo }}/tags">tags</a></li>
  <li>{{ tag }}</li>
</ul>
{% endblock %}

{% block content %}
<h1>{{ tag }}</h1>

<details>
  <summary><svg class="summary-icon"><use href="#icon-archive"/></svg>Archive</summary>
  <ul>
    <li><a href="/{{ repo }}/archive/tar.gz/refs/tags/{{ tag }}" download="{{ repo }}-{{ tag }}.tar.gz"><span class="archive-link">{{ repo }}-{{ tag }}.tar.gz</span><span>tar.gz</span></a></li>
    <li><a href="/{{ repo }}/archive/tar.xz/refs/tags/{{ tag }}" download="{{ repo }}-{{ tag }}.tar.xz"><span class="archive-link">{{ repo }}-{{ tag }}.tar.xz</span><span>tar.xz</span></a></li>
    <li><a href="/{{ repo }}/archive/zip/refs/tags/{{ tag }}" download="{{ repo }}-{{ tag }}.zip"><span class="archive-link">{{ repo }}-{{ tag }}.zip</span><span>zip</span></a></li>
  </ul>
</details>

<div class="repo-nav">
  <a href="/{{ repo }}/commits/{{ commit_sha }}/tree" class="repo-nav-item">
    <svg class="summary-icon"><use href="#icon-tree"/></svg>
    <span>Tree</span>
    <span class="repo-nav-item-meta">[{{ commit_sha[..8] }}]</span>
    <span class="repo-nav-item-arrow">[&gt;]</span>
  </a>
</div>

{% if tagger.is_some() || tag_date.is_some() %}
<dl class="tag-info">
  {% if let Some(tagger) = tagger %}
  <dt>tagger</dt><dd>{{ tagger }}</dd>
  {% endif %}
  {% if let Some(date) = tag_date %}
  <dt>tagged</dt><dd>{{ date }}</dd>
  {% endif %}
</dl>
{% endif %}

<dl class="tag-info">
  <dt>commit</dt><dd><a class="commit-sha" href="/{{ repo }}/commits/{{ commit_sha }}">{{ commit_sha }}</a></dd>
  <dt>author</dt><dd>{{ commit_author }}</dd>
  <dt>date</dt><dd>{{ commit_date }}</dd>
</dl>

{% if let Some(message) = message %}
<pre class="message">{{ message }}</pre>
{% endif %}
{% endblock %}
