From 953309ddde4477adfafd0e74d0fca074eeb63607 Mon Sep 17 00:00:00 2001 From: VG Date: Sat, 29 Nov 2014 16:30:06 +0100 Subject: fix alignment pb on floating menu and add cosmetic changes --- pasteme.py | 9 ++------- static/base.css | 21 +++++++++++++++++++-- views/base.tpl | 2 +- views/paste.tpl | 4 ++-- views/root.tpl | 6 +++--- 5 files changed, 27 insertions(+), 15 deletions(-) diff --git a/pasteme.py b/pasteme.py index 09b3351..fae3922 100755 --- a/pasteme.py +++ b/pasteme.py @@ -21,13 +21,8 @@ def route_root(): @bottle.route('/', method='POST') def route_paste_post(): - content = bottle.request.forms.getunicode('content', '') - - try: - pid = identigen.generate(content) - except AttributeError as e: - print(e) - bottle.abort(400) + content = bottle.request.forms.getunicode('content', '') or '' + pid = identigen.generate(content) path = pathbase / pid with path.open(mode='wb') as fd: fd.write(content.encode('utf8')) diff --git a/static/base.css b/static/base.css index ca6f9be..84c8598 100644 --- a/static/base.css +++ b/static/base.css @@ -4,6 +4,10 @@ html { body { color: #aaaaaa; + position: relative; + max-width: 750px; + margin-right: auto; + margin-left: auto; } #content { @@ -20,7 +24,20 @@ body { #floatingmenu { display: block; position: absolute; - right: 0px; - top: 0px; + right: 0; + top: 0; position: absolute; } + +#floatingmenu a img { + margin: 0; +} + +#floatingmenu button { + border: 0; + padding: 0; + background: transparent; + display: inline; + width: 96px; + height: 96px; +} diff --git a/views/base.tpl b/views/base.tpl index 9f3046b..0fe2ad0 100644 --- a/views/base.tpl +++ b/views/base.tpl @@ -5,7 +5,7 @@ -
+
{{!base}} diff --git a/views/paste.tpl b/views/paste.tpl index 574717a..dc60a24 100644 --- a/views/paste.tpl +++ b/views/paste.tpl @@ -1,6 +1,6 @@ % rebase('base.tpl', title='Paste snippets') {{!content}}
- return
- raw + return
+ raw
diff --git a/views/root.tpl b/views/root.tpl index 44a6028..179dde8 100644 --- a/views/root.tpl +++ b/views/root.tpl @@ -6,9 +6,9 @@ Please copy your text on the box below:
-
-
-- cgit v1.2.3