global_max_age = max_age_to_datetime(
config['spline-frontpage.max_age'])
- for source in config['spline-frontpage.sources']:
+ c.sources = config['spline-frontpage.sources']
+ for source in c.sources:
new_updates = source.poll(global_limit, global_max_age)
updates.extend(new_updates)
--- /dev/null
+% for update in c.updates:
+<%include file="${update.source.template}" args="update=update" />
+% endfor
+% if not c.updates:
+<p>No updates.</p>
+% endif
+
+<p>Sources:</p>
+<ul class="classic-list">
+ % for source in c.sources:
+ <li><a href="${source.link}"><img src="${h.static_uri('spline', "icons/{0}.png".format(source.icon))}" alt=""> ${source.title}</a></li>
+ % endfor
+</ul>
<%inherit file="base.mako" />
-<%def name="title()">Home</%def>
+<%def name="title()">Updates</%def>
<h1>Updates</h1>
-% for update in c.updates:
-<%include file="${update.source.template}" args="update=update" />
-% endfor
+<%include file="/front_page/updates.mako" />