comparison newsfeed.py @ 139:e17f0122ca94

Another div around news items.
author Sascha L. Teichmann <teichmann@intevation.de>
date Thu, 03 Apr 2014 16:38:19 +0200
parents c791f4e9be39
children 6fdb28c3872c
comparison
equal deleted inserted replaced
138:c791f4e9be39 139:e17f0122ca94
41 continue 41 continue
42 42
43 postcount += 1 43 postcount += 1
44 content = content.encode('utf8') 44 content = content.encode('utf8')
45 oa("<li>") 45 oa("<li>")
46 oa('<div style="margin-bottom:2em">')
46 47
47 if len(content) >= max_length: 48 if len(content) >= max_length:
48 oa(content[:(max_length-opacity75)]) 49 oa(content[:(max_length-opacity75)])
49 oa("<a href="+item["actor"]["url"]+">") 50 oa("<a href="+item["actor"]["url"]+">")
50 oa('<span style="opacity: 0.75;filter:Alpha(opacity=75)">') 51 oa('<span style="opacity: 0.75;filter:Alpha(opacity=75)">')
64 oa(' via <a href="%s">%s</a><br>' % (item["object"]["url"], item["object"]["author"]["displayName"])) 65 oa(' via <a href="%s">%s</a><br>' % (item["object"]["url"], item["object"]["author"]["displayName"]))
65 66
66 date = time.strptime(item["updated"],"%Y-%m-%dT%H:%M:%SZ") 67 date = time.strptime(item["updated"],"%Y-%m-%dT%H:%M:%SZ")
67 oa(time.strftime(" %d.%m.%Y um %H:%M:%S", date)) 68 oa(time.strftime(" %d.%m.%Y um %H:%M:%S", date))
68 oa('</div>') 69 oa('</div>')
70 oa('</div>')
69 oa("</li>") 71 oa("</li>")
70 72
71 oa("</ul>") 73 oa("</ul>")
72 body = ''.join(output) 74 body = ''.join(output)
73 75
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)