changeset 143:c7fa55d11493

Merged.
author Ariane Broermann <ariane@intevation.de>
date Fri, 04 Apr 2014 08:17:41 +0200
parents dac81e04d628 (current diff) e209a6446e88 (diff)
children d8de679055c6
files
diffstat 1 files changed, 6 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/newsfeed.py	Fri Apr 04 08:17:19 2014 +0200
+++ b/newsfeed.py	Fri Apr 04 08:17:41 2014 +0200
@@ -43,11 +43,11 @@
     postcount += 1
     content = content.encode('utf8')
     oa("<li>")
+    oa('<div style="margin-bottom:1em">')
 
     if len(content) >= max_length:
         oa(content[:(max_length-opacity75)])
         oa("<a href="+item["actor"]["url"]+">")
-        #oa("<a href="+item["object"]["url"]+">")
         oa('<span style="opacity: 0.75;filter:Alpha(opacity=75)">')
         oa(content[(max_length-opacity75):(max_length-ocacity50)])
         oa('</span>')
@@ -57,25 +57,19 @@
     else:
         oa(content)
 
-    oa('<br>')
     actor = item["actor"]
-    #oa("<a href="+item["object"]["links"]["self"]["href"]+">more...</a>")
-    oa('<span style="font-size:smaller">')
-    oa('<a href="'+actor["url"]+'">'+actor["displayName"]+'</a>')
-    #oa(item["content"])
+    oa('<div style="font-size:smaller">')
+    oa('<a href="%s">%s</a>' % (actor["url"], actor["displayName"]+'</a>'))
     if verb == "share":
-        oa(' via <a href="'+item["object"]["url"]+'">'+item["object"]["author"]["displayName"]+'</a>')
-    #if verb == "share":
-    #   oa(' via <a href="'+item["object"]["author"]["url"]+'">'+item["object"]["author"]["displayName"]+'</a>')
+        oa(' via <a href="%s">%s</a><br>' % (item["object"]["url"], item["object"]["author"]["displayName"]))
 
-    # 2014-01-03T10:30:02Z
     date = time.strptime(item["updated"],"%Y-%m-%dT%H:%M:%SZ")
     oa(time.strftime(" %d.%m.%Y um %H:%M:%S", date))
-    oa('</span>')
+    oa('</div>')
+    oa('</div>')
     oa("</li>")
 
 oa("</ul>")
-#oa('<a href="'+data["author"]["url"]+'">mehr von '+data["author"]["displayName"]+'</a>' )
 body = ''.join(output)
 
 print "Content-Type: text/html;charset=utf-8"
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)