From 35d68cc0769f2f3c8fb0d63f85fc780b856a8209 Mon Sep 17 00:00:00 2001 From: ofshellohicy Date: Fri, 18 Jul 2014 14:50:32 +0800 Subject: remove useless feature --- pastebin.py | 1 + static/pastebin.js | 16 +--------------- static/small.css | 4 ++++ static/style.css | 9 +++++---- templates/layout.html | 16 +++++++++++----- templates/show_paste.html | 3 --- 6 files changed, 22 insertions(+), 27 deletions(-) create mode 100644 static/small.css diff --git a/pastebin.py b/pastebin.py index 3824285..1a54812 100644 --- a/pastebin.py +++ b/pastebin.py @@ -89,6 +89,7 @@ def new_paste(): return render_template('new_paste.html', parent=parent) +@app.route('//') @app.route('/') def show_paste(paste_id): paste = Paste.query.options(db.eagerload('children')).get_or_404(paste_id) diff --git a/static/pastebin.js b/static/pastebin.js index 8507726..4412595 100644 --- a/static/pastebin.js +++ b/static/pastebin.js @@ -1,11 +1,8 @@ (function() { var global = this; - var jug = new Juggernaut(); - var lib = global.pastebin = { urlRoot : '/', - jug : jug, autoHideFlashes : function() { var flashes = $('p.flash:visible').hide(); @@ -38,19 +35,8 @@ if (reply.author) msg.append($('').text(' ' + reply.author)) lib.flash(msg); - }, - - subscribePaste : function(pasteID) { - jug.subscribe('paste-replies:' + pasteID, function(data) { - lib.onNewReply(data, 'paste'); - }); - }, - - subscribeUser : function(userID) { - jug.subscribe('user-replies:' + userID, function(data) { - lib.onNewReply(data, 'user'); - }); } + }; diff --git a/static/small.css b/static/small.css new file mode 100644 index 0000000..4ed0712 --- /dev/null +++ b/static/small.css @@ -0,0 +1,4 @@ +pre { + font-size: 18px; + line-height: 1.8em; +} diff --git a/static/style.css b/static/style.css index 7b19c76..7905a59 100644 --- a/static/style.css +++ b/static/style.css @@ -1,6 +1,6 @@ body { margin: 0; padding: 0; } body, input { font-size: 16px; font-family: 'Helvetica Neue', sans-serif; } -.page { margin: 50px auto; width: 740px; } +.page { margin: 50px auto; width: 100%; } h1 { margin: 0; font-weight: normal; color: #c00; } a { color: black; } a:hover { color: #c00; } @@ -13,9 +13,10 @@ dl dt { font-weight: bold; width: 90px; float: left; clear: left; } dl dd { float: left; margin: 0; padding: 0; } pre, textarea { font-family: 'Consolas', monospace; font-size: 14px; - background: #eee; padding: 0; margin: 0; } -textarea { border: none; width: 720px; } -.code, .flash { background: #eee; margin: 10px -30px; padding: 10px 30px; } + background: #eee; padding: 0; margin: 0; + word-break: break-word; white-space: pre-wrap;} +textarea { border: none; width: 100%; } +.code, .flash { background: #eee; padding: 20px; } .pagination strong, .pagination span.ellipsis, .pagination a { border: 1px solid #d00; padding: 2px 6px; text-decoration: none; } diff --git a/templates/layout.html b/templates/layout.html index 206f750..229644d 100644 --- a/templates/layout.html +++ b/templates/layout.html @@ -1,25 +1,31 @@ {% block title %}{% endblock %} | Flask Pastebin - - + + + + + + +{# +#}

Flask Pastebin

{% for message in get_flashed_messages() %}

{{ message }} diff --git a/templates/show_paste.html b/templates/show_paste.html index 7eeaa4b..1c42e99 100644 --- a/templates/show_paste.html +++ b/templates/show_paste.html @@ -29,7 +29,4 @@ {% endif %}

{{ paste.code }}
- {% endblock %} -- cgit