aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2022-02-11 20:56:59 -0500
committerB. Stack <bgstack15@gmail.com>2022-02-11 20:56:59 -0500
commit99f6fb15a5aaa326a729e73974006d1064a5582f (patch)
tree41795c1a447bb88c7521c286840c7d290c0afb8c /templates
parentadd support for title, and ensure no js (diff)
downloadstackbin-99f6fb15a5aaa326a729e73974006d1064a5582f.tar.gz
stackbin-99f6fb15a5aaa326a729e73974006d1064a5582f.tar.bz2
stackbin-99f6fb15a5aaa326a729e73974006d1064a5582f.zip
use UUID for paste id, and more js removal
Using uuids means that titles need to be used for displaying "replies," "in response to," and so on.
Diffstat (limited to 'templates')
-rw-r--r--templates/layout.html5
-rw-r--r--templates/new_paste.html2
-rw-r--r--templates/show_paste.html21
3 files changed, 7 insertions, 21 deletions
diff --git a/templates/layout.html b/templates/layout.html
index 6b53bb3..bfe8b05 100644
--- a/templates/layout.html
+++ b/templates/layout.html
@@ -6,11 +6,6 @@
<meta name="format-detection" content="telephone=no">
<link rel=stylesheet type=text/css href="{{ url_for('static', filename='style.css') }}">
<link rel="stylesheet" media="screen and (max-width: 800px)" href="{{ url_for('static', filename='small.css') }}" />
-{#
-<script type=text/javascript src="{{ url_for('static', filename='jquery.js') }}"></script>
-<script type=text/javascript src="{{ url_for('static', filename='pastebin.js') }}"></script>
-<script type=text/javascript>pastebin.urlRoot = {{ request.url_root|tojson|safe }};</script>
-#}
<div class=page>
<ul class=nav>
<li><a href="{{ url_for('new_paste') }}">New Paste</a>
diff --git a/templates/new_paste.html b/templates/new_paste.html
index 4d658c6..977ef22 100644
--- a/templates/new_paste.html
+++ b/templates/new_paste.html
@@ -4,7 +4,7 @@
<form action="" method=post>
<h2><div class="pastetitle"><textarea rows="1" name="pastetitle">Enter title here</textarea></div>
{%- if parent %}
- - Reply to #{{ parent.id }}
+ - Reply to {{ parent.title }}
{%- endif %}
<span class="chk-private"><input name="is_private" type="checkbox"/>Private</span>
</h2>
diff --git a/templates/show_paste.html b/templates/show_paste.html
index 26273bf..03d57b1 100644
--- a/templates/show_paste.html
+++ b/templates/show_paste.html
@@ -9,7 +9,7 @@
<dd>{{ paste.user.display_name }}
{% endif %}
<dt>Date
- <dd>{{ paste.pub_date.strftime('%Y-%m-%d @ %H:%M') }}
+ <dd>{{ paste.pub_date.strftime('%Y-%m-%dT%H:%M:%SZ') }}
<dt>Actions
<dd>
{% if not paste.is_private %}
@@ -18,27 +18,18 @@
{%- 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 %}
+ {% if parent %}
<dt>In reply to
- <dd><a href="{{ url_for('show_paste', paste_id=paste.parent_id) }}">#{{ paste.parent_id }}</a>
+ <dd><a href="{{ url_for('show_paste', paste_id=paste.parent_id) }}">{{ parent.title }}</a>
{% endif %}
- {% if paste.children %}
+ {% if children %}
<dt>Replies
<dd>
- {% for child in paste.children -%}
+ {% for childid,childtitle in children -%}
{%- if not loop.first %},{% endif %}
- <a href="{{ url_for('show_paste', paste_id=child.id) }}">#{{ child.id }}</a>
+ <a href="{{ url_for('show_paste', paste_id=childid) }}">{{ childtitle }}</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 %}
bgstack15