changeset 228:6efd189e8d78

server_side: put the blog entry content in its own span + CSS customization
author souliane <souliane@mailoo.org>
date Tue, 08 Oct 2013 13:35:29 +0200
parents 67e24c342e7f
children e632f77c4219
files server_css/blog.css server_side/blog.py
diffstat 2 files changed, 17 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- 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 <http://www.gnu.org/licenses/>.
 */
 
-
 .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;
+}
--- 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("<div class='mblog_content'><span class='mblog_timestamp'>%(date)s</span>%(content)s</div>" % {
+            request.write("""<div class='mblog_entry'><span class='mblog_timestamp'>%(date)s</span>
+                          <span class='mblog_content'>%(content)s</span></div>""" % {
                           'date':_datetime,
                           'content':sanitizeHtml(entry['content']).encode('utf-8')})
         request.write('</body></html>')