]> git.ipfire.org Git - ipfire.org.git/blame - src/templates/nopaste/view.html
nopaste: Refactor everything
[ipfire.org.git] / src / templates / nopaste / view.html
CommitLineData
dd3d93e3 1{% extends "../base.html" %}
66862195
MT
2
3{% block title %}{{ entry.subject or _("Paste %s") % entry.uuid }}{% end block %}
4
a41085fb
MT
5{% block content %}
6 <div class="row justify-content-center">
7 <div class="col col-md-10">
8 <div class="card">
9 <div class="card-body">
10 <h3 class="card-title mb-1">{{ entry.subject or _("Paste %s") % entry.uuid }}</h3>
11 <h6 class="card-subtitle text-muted mb-3">
12 {{ _("Uploaded %s") % locale.format_date(entry.time_created) }}
b0b3e3e7 13
a41085fb
MT
14 {% if entry.account %}
15 {{ _("by") }}
b0b3e3e7 16
a41085fb 17 <img src="{{ entry.account.avatar_url(14) }}" alt="{{ entry.account }}">
b0b3e3e7 18
a41085fb
MT
19 <a href="https://people.ipfire.org/users/{{ entry.account.uid }}">
20 {{ entry.account }}
21 </a>,
22 {% else %}
23 {{ _("from %s") % entry.address }},
24 {% end %}
b0b3e3e7 25
a41085fb
MT
26 {{ _("One View", "%(num)s Views", entry.views) % { "num" : entry.views } }}
27 </h6>
b0b3e3e7 28
a41085fb
MT
29 <div class="row mb-1">
30 <div class="col-12 text-md-right">
31 {% if content %}
32 <a class="btn btn-primary mr-2 mb-2" href="/raw/{{ entry.uuid }}">
33 <span class="fas fa-file-download mr-2"></span>
34 {{ _("Download") }}
35 </a>
36 {% end %}
66862195 37
a41085fb
MT
38 <a class="btn btn-warning mb-2" href="mailto:abuse@ipfire.org?subject={{ "nopaste.ipfire.org: %s" % entry.uuid }}">
39 <span class="fas fa-exclamation-triangle mr-2"></span>
40 {{ _("Report abuse") }}
41 </a>
42 </div>
43 </div>
66862195 44
a41085fb 45 <hr>
66862195 46
a41085fb
MT
47 {% if content %}
48 <pre class="prettyprint linenums" style="min-height: 25em">{{ content }}</pre>
bfbf061b 49
a41085fb
MT
50 <link rel="stylesheet" href="{{ static_url("css/prettify.css") }}">
51 <script src="{{ static_url("js/prettify.js") }}"></script>
52 <script>prettyPrint()</script>
66862195 53
a41085fb
MT
54 {% elif entry.mimetype.startswith("image/") %}
55 <img class="img-fluid" src="/raw/{{ entry.uuid }}">
56 {% else %}
57 <div class="row justify-content-center my-5">
58 <div class="col-12 col-md-6 text-center">
59 <a class="btn btn-primary btn-lg btn-block" href="/raw/{{ entry.uuid }}">
60 <span class="fas fa-file-download"></span>
61 {{ _("Download") }} ({{ format_size(entry.size) }})
62 </a>
63 </div>
64 </div>
65 {% end %}
66 </div>
60b0917c 67 </div>
66862195 68 </div>
a41085fb 69 </div>
66862195 70{% end block %}