blob: 26273bf172f7c4383f75c84648e2391f85d111b1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
{% extends "layout.html" %}
{% block title %}{{ paste.title }}{% endblock %}
{% block body %}
{# <h2>Paste #{{ paste.id }}</h2> #}
<h2>{{ paste.title }}</h2>
<dl>
{% if paste.user %}
<dt>Author
<dd>{{ paste.user.display_name }}
{% endif %}
<dt>Date
<dd>{{ paste.pub_date.strftime('%Y-%m-%d @ %H:%M') }}
<dt>Actions
<dd>
{% if not paste.is_private %}
<a href="{{ url_for('new_paste', reply_to=paste.id) }}">Reply</a>
{% endif %}
{%- if g.user and paste.user == g.user -%}
, <a href="{{ url_for('delete_paste', paste_id=paste.id) }}">Delete</a>
{% endif %}
{% if paste.parent_id %}
<dt>In reply to
<dd><a href="{{ url_for('show_paste', paste_id=paste.parent_id) }}">#{{ paste.parent_id }}</a>
{% endif %}
{% if paste.children %}
<dt>Replies
<dd>
{% for child in paste.children -%}
{%- if not loop.first %},{% endif %}
<a href="{{ url_for('show_paste', paste_id=child.id) }}">#{{ child.id }}</a>
{%- endfor %}
{% endif %}
</dl>
<div class=code><pre>{{ paste.code }}</pre></div>
<link rel="stylesheet" href="//cdn.jsdelivr.net/highlight.js/9.1.0/styles/default.min.css">
<script src="//cdn.jsdelivr.net/highlight.js/9.1.0/highlight.min.js"></script>
<script>
$(document).ready(function() {
$('pre').each(function(i, block) {
hljs.highlightBlock(block);
});
});
</script>
{% endblock %}
|