# HG changeset patch # User souliane # Date 1381232129 -7200 # Node ID 6efd189e8d78b76fbe2db441852a1ee332adf94c # Parent 67e24c342e7ffa2ca41259b3e4f7a6515e53f029 server_side: put the blog entry content in its own span + CSS customization diff -r 67e24c342e7f -r 6efd189e8d78 server_css/blog.css --- a/server_css/blog.css Mon Oct 07 14:23:16 2013 +0200 +++ b/server_css/blog.css Tue Oct 08 13:35:29 2013 +0200 @@ -16,33 +16,27 @@ along with this program. If not, see . */ - .mblog_title { text-align: center; font-size: x-large; font-weight: bold; margin-bottom: 40px; + font-family: FreeSans, Liberation Sans, Arial, sans-serif; + color: rgb(51, 51, 51); } -.mblog_content { +.mblog_entry { width: 60%; - text-align:center; - + text-align: justify; border: 1px solid LightGray; - - border-bottom-width: 1px; - margin-left: auto; - margin-right: auto; - margin-bottom: 20px; - margin-top: 5px; - padding-left: 10px; - padding-right: 10px; - padding-top: 5px; - padding-bottom: 5px; - + margin: 5px auto 20px auto; + padding: 5px 10px; -moz-border-radius: 15px; -webkit-border-radius: 15px; border-radius: 15px; + box-shadow: 0px 0px 0.5em rgb(153, 153, 153); + font-family: FreeSans, Liberation Sans, Arial, sans-serif; + color: rgb(51, 51, 51); } .mblog_timestamp { @@ -50,4 +44,10 @@ font-size: small; border-bottom: 1px dashed LightGrey; color: gray; + text-align: right; } + +.mblog_content { + display: block; + padding-top: 5px; +} diff -r 67e24c342e7f -r 6efd189e8d78 server_side/blog.py --- a/server_side/blog.py Mon Oct 07 14:23:16 2013 +0200 +++ b/server_side/blog.py Tue Oct 08 13:35:29 2013 +0200 @@ -84,7 +84,8 @@ for entry in mblog_data: timestamp = float(entry.get('timestamp',0)) _datetime = datetime.fromtimestamp(timestamp) - request.write("
%(date)s%(content)s
" % { + request.write("""
%(date)s + %(content)s
""" % { 'date':_datetime, 'content':sanitizeHtml(entry['content']).encode('utf-8')}) request.write('')