{% extends "base.html" %}

{% block title %}{{ title }} - txt.irc.now{% endblock %}

{% block head %}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github-dark.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
<script>document.addEventListener('DOMContentLoaded', () => hljs.highlightAll());</script>
{% endblock %}

{% block content %}
<div class="content">
  <div class="paste-meta">
    <h1>{{ title }}</h1>
    <div class="meta-row">
      <span class="meta-tag">{{ language }}</span>
      <span class="meta-sep">|</span>
      <span>{{ created_at }}</span>
      {% if let Some(exp) = expires_at %}
      <span class="meta-sep">|</span>
      <span>expires {{ exp }}</span>
      {% endif %}
      <span class="meta-sep">|</span>
      <a href="/{{ id }}/raw">raw</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://txt.irc.now/{{ id }}">report</a>
    </div>
  </div>
  <div class="paste-content">
    <pre><code class="language-{{ language }}">{{ content }}</code></pre>
  </div>
</div>
{% endblock %}
