summaryrefslogtreecommitdiffstats
path: root/web/macros.py
diff options
context:
space:
mode:
authorHolger Weiss <holger@zedat.fu-berlin.de>2013-10-14 09:44:34 (GMT)
committerHolger Weiss <holger@zedat.fu-berlin.de>2013-10-14 09:44:34 (GMT)
commitbcb76093654b1273a6cc2050b6efe2b8b1c6b349 (patch)
tree36957f021677c899b6816849eb544458ce08640e /web/macros.py
parentd1a09181d90eef9e79406941db86096daa213df3 (diff)
downloadsite-bcb76093654b1273a6cc2050b6efe2b8b1c6b349.tar.gz
Cosmetics: s/abstract/teaser/
Diffstat (limited to 'web/macros.py')
-rw-r--r--web/macros.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/web/macros.py b/web/macros.py
index fa1b87a..b108398 100644
--- a/web/macros.py
+++ b/web/macros.py
@@ -89,26 +89,26 @@ def hook_preconvert_news():
89 pages.append(p) 89 pages.append(p)
90 90
91def make_news_page(posts, current_index): 91def make_news_page(posts, current_index):
92 marker = '<end-of-abstract>' 92 marker = '<end-of-teaser>'
93 source = list() 93 source = list()
94 if current_index == 0: 94 if current_index == 0:
95 title = 'News' 95 title = 'News'
96 else: 96 else:
97 title = 'News Page %d' % (current_index + 1) 97 title = 'News Page %d' % (current_index + 1)
98 abstract = ['# ' + title] 98 teaser = ['# ' + title]
99 for p in posts: 99 for p in posts:
100 timestamp = time.strptime(p.date, '%Y-%m-%d') 100 timestamp = time.strptime(p.date, '%Y-%m-%d')
101 date = time.strftime('%A, %B %-e, %Y', timestamp) 101 date = time.strftime('%A, %B %-e, %Y', timestamp)
102 abstract.append('## %s' % p.title) 102 teaser.append('## %s' % p.title)
103 abstract.append('*%s*' % date) 103 teaser.append('*%s*' % date)
104 abstract.append('%s' % p.source.split(marker, 1)[0]) 104 teaser.append('%s' % p.source.split(marker, 1)[0])
105 abstract.append('<a href="%s">Read&nbsp;more&nbsp;&raquo;</a>' % p.url) 105 teaser.append('<a href="%s">Read&nbsp;more&nbsp;&raquo;</a>' % p.url)
106 source.append('# %s' % p.title) 106 source.append('# %s' % p.title)
107 source.append('*%s*' % date) 107 source.append('*%s*' % date)
108 source.append(p.source.replace(marker, '', 1)) 108 source.append(p.source.replace(marker, '', 1))
109 p.source = '\n'.join(source) 109 p.source = '\n'.join(source)
110 p['parent'] = title 110 p['parent'] = title
111 return '\n'.join(abstract) + '\n\n' 111 return '\n'.join(teaser) + '\n\n'
112 112
113def make_news_footer(n_news_pages, current_index): 113def make_news_footer(n_news_pages, current_index):
114 if n_news_pages == 1: 114 if n_news_pages == 1: