{% extends "base.html" %}

{% block title %}{{ filename }} - irc.pics{% endblock %}

{% block content %}
<div class="content">
  <div class="image-view">
    <a href="/{{ id }}/raw">
      <img src="/{{ id }}/raw" alt="{{ filename }}" class="view-img">
    </a>
  </div>
  <div class="image-meta">
    <div class="meta-row">
      <span>{{ filename }}</span>
      <span class="meta-sep">|</span>
      <span class="meta-tag">{{ content_type }}</span>
      <span class="meta-sep">|</span>
      <span>{{ size }}</span>
      {% if let Some(w) = width %}
      {% if let Some(h) = height %}
      <span class="meta-sep">|</span>
      <span>{{ w }}x{{ h }}</span>
      {% endif %}
      {% endif %}
      <span class="meta-sep">|</span>
      <span>{{ created_at }}</span>
    </div>
    <div class="meta-links">
      <a href="/{{ id }}/raw">direct link</a>
      <span class="meta-sep">|</span>
      <a href="/{{ id }}/thumb">thumbnail</a>
      {% if is_owner %}
      <span class="meta-sep">|</span>
      <form method="post" action="/{{ id }}/delete" class="inline-form">
        <button type="submit" class="link-btn delete-btn">delete</button>
      </form>
      {% endif %}
      <span class="meta-sep">|</span>
      <a href="https://my.irc.now/report?url=https://irc.pics/{{ id }}">report</a>
    </div>
  </div>
</div>
{% endblock %}
