Improve styling on week.tmpl

This commit is contained in:
Nelson Elhage 2010-05-23 21:08:25 -04:00
parent 29891d5486
commit 82bcc31216
1 changed files with 20 additions and 8 deletions

View File

@ -1,21 +1,22 @@
Results for week beginning ${week_start.strftime("%F")} Results for week beginning ${week_start.strftime("%F")}
<h2>People who posted</h2> <h2>People who posted</h2>
<ul> <dl>
% for u in sorted(good, key=lambda u:u.username): % for u in sorted(good, key=lambda u:u.username):
<li><b>${u.username}:</b> <dt><span class="user">${u.username}:</span></dt>
<dd>
<ul> <ul>
% for p in u.weeks[week]: % for p in u.weeks[week]:
<li><a href="${p['url']}">${p['title'] or "[untitled post]"}</a></li> <li><a href="${p['url']}">${p['title'] or "[untitled post]"}</a></li>
% endfor % endfor
</ul> </ul>
</li> </dd>
% endfor % endfor
</ul> </dl>
<h2>People who failed to post</h2> <h2>People who failed to post</h2>
<ul> <ul>
% for u in sorted(lame, key=lambda u:u.username): % for u in sorted(lame, key=lambda u:u.username):
<li><b>${u.username}</b></li> <li class="user">${u.username}</li>
% endfor % endfor
</ul> </ul>
@ -23,7 +24,7 @@ Results for week beginning ${week_start.strftime("%F")}
<h2>People who have not yet started</h2> <h2>People who have not yet started</h2>
<ul> <ul>
% for u in sorted(skip, key=lambda u:u.username): % for u in sorted(skip, key=lambda u:u.username):
<li><b>${u.username}</b></li> <li class="user">${u.username}</li>
% endfor % endfor
</ul> </ul>
% endif % endif
@ -36,8 +37,19 @@ Results for week beginning ${week_start.strftime("%F")}
</table> </table>
<h2>Debts:</h2> <h2>Debts:</h2>
<table> <% i = 0 %>
<table class="debts">
% for (u, v) in sorted(debts, key=lambda p:p[1], reverse=True): % for (u, v) in sorted(debts, key=lambda p:p[1], reverse=True):
<tr><td>${u}</td> <td>${v}</td></tr> % if i % 3 == 0:
<tr>\
% endif
<% i += 1 %>\
<td class="user">${u}</td> <td class="money">$${v}</td>\
% if i % 3 == 0:
</tr>
%endif
% endfor % endfor
% if i % 3 != 0:
</tr>
%endif
</table> </table>