{% extends "layout.html" %}

{% block body %}
<main class="paste-show{% if len(paste.files) > 1 %} multiple{% end %}">
    <div class="paste-meta">
        {% if paste.exp_date %}
            <p>This paste expires on <span>{{ paste.exp_date }}</span>.
        {% else %}
            <p>This paste <span>never</span> expires.
        {% end %}
        {% if can_delete %}
            <a href="/remove/{{ paste.removal }}">Remove now</a>.
        {% end %}

        <a href="/repaste/{{ paste.slug }}">Repaste</a>, or
        <a href="/download-archive/{{ paste.slug }}">download</a> this paste.

        <button class="btn-link" id="toggle-word-wrap">Toggle word wrap</button>.

        Pasted through <em>{{ paste.src }}</em>.
        </p>
    </div>
    <div class="file-container">
        <div class="files">
            {% for file in paste.files %}
            <div id="{{ file.slug }}" class="file-show lang-{{ file.lexer }} code{% if not linenos %} nolinenos{% end %} {% if len(paste.files) == 1 %}single{% end %}">
                <div class="code">
                    {% raw file.fmt %}
                </div>
                <textarea class="copy-area">{{ file.raw }}</textarea>
                <div class="meta">
                    Filename: {{ file.filename }}.
                    Size: {{ file.pretty_size }}.
                    View <a href="/raw/{{ file.slug }}">raw</a>, <button class="btn-link copy-button">copy</button>, <a href="/hex/{{ file.slug }}">hex</a>, or <a href="/download/{{ file.slug }}">download</a> this file.
                    {% if handler.application.configuration.report_email %}
                    <a href="mailto:{{ handler.application.configuration.report_email }}?subject=Pinnwand report (File ID: {{ file.slug }})">Report</a> this file.
                    {% end %}
                </div>
            </div>
            {% end %}
        </div>
        <!--
        {% if len(paste.files) > 1 %}
        <aside>
            <ul>
                {% for file in paste.files %}
                <li><a href="#{{ file.slug }}">{{ file.filename }}</a></li>
                {% end %}
            </ul>
        </aside>
        {% end %}
        -->
    </div>
</main>
{% end %}
