diff options
author | VG <vg@devys.org> | 2014-11-29 16:30:06 +0100 |
---|---|---|
committer | VG <vg@devys.org> | 2014-11-29 16:30:06 +0100 |
commit | 953309ddde4477adfafd0e74d0fca074eeb63607 (patch) | |
tree | f29cbb0b8fb21deb89bedbff1cb599483b86ee3b | |
parent | 4475362294e6c8fd0df4f19c035bed81e595671c (diff) | |
download | pasteme-953309ddde4477adfafd0e74d0fca074eeb63607.tar.gz pasteme-953309ddde4477adfafd0e74d0fca074eeb63607.tar.bz2 pasteme-953309ddde4477adfafd0e74d0fca074eeb63607.zip |
fix alignment pb on floating menu and add cosmetic changes
-rwxr-xr-x | pasteme.py | 9 | ||||
-rw-r--r-- | static/base.css | 21 | ||||
-rw-r--r-- | views/base.tpl | 2 | ||||
-rw-r--r-- | views/paste.tpl | 4 | ||||
-rw-r--r-- | views/root.tpl | 6 |
5 files changed, 27 insertions, 15 deletions
@@ -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 @@ <link rel="stylesheet" href="/static/base.css" /> </head> <body> -<img id="banner" alt="Pasteme" src="/static/banner.png"><br/> +<img id="banner" alt="Pasteme" src="/static/banner.png"><br /> {{!base}} </body> </html> 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}} <div id="floatingmenu"> - <a href="/"><img alt="return" src="static/esc-icon.png"/></a><br/> - <a href="/{{pid}}/raw"><img alt="raw" src="static/download-icon.png"/></a> + <a href="/"><img alt="return" src="static/esc-icon.png" /></a><br /> + <a href="/{{pid}}/raw"><img alt="raw" src="static/download-icon.png" /></a> </div> 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: <form action="/" method="POST"> <textarea id="content" name="content"></textarea> -<div id=floatingmenu> - <button for="content" style="border:0;background:transparent"> - <img alt="paste" src="/static/enter-icon.png"/> +<div id="floatingmenu"> + <button for="content"> + <img alt="Paste" src="/static/enter-icon.png" /> </button> </div> |