table.forum-list .stats { width: 10em; text-align: center; }
.forum-post-container { }
-.forum-post { position: relative; margin: 1em 0; padding: 1em; background: #d0d8ff; -moz-border-radius: 1em; -webkit-border-radius: 1em; }
-.forum-post .author { position: absolute; top: 0; right: 0; bottom: 0; width: 16em; padding: 0.5em; background: #c0c8ff; -moz-border-radius-topright: 1em; -moz-border-radius-bottomright: 1em; -webkit-border-top-right-radius: 1em; -webkit-border-bottom-right-radius: 1em; }
-.forum-post .meta { margin-right: 17em; padding-bottom: 0.5em; padding-right: 0.5em; border-bottom: 1px dotted navy; }
-.forum-post .content { margin-right: 16.5em; padding-top: 0.5em; padding-right: 0.5em; }
+.forum-post { position: relative; margin: 1em 0; background: #fcfcfc; -moz-border-radius: 1em; -webkit-border-radius: 1em; }
+.forum-post .author { position: absolute; top: 2.2em; right: 0; bottom: 0; width: 16em; padding: 0 1em; margin: 1em 0; border-left: 1px solid #b4c7e6; }
+.forum-post .author .name { display: block; font-size: 1.5em; }
+.forum-post .author .name .user-color-bar { display: block; font-size: 0.67em; width: auto; }
+.forum-post .author .avatar { margin-bottom: 1em; }
+.forum-post .author .avatar img { -moz-box-shadow: 0 0 2px black; }
+.forum-post .meta { padding: 0.5em 1em; border: 1px solid #b4c7e6; background: url(${h.static_uri('local', 'images/layout/th-background.png')}) left bottom repeat-x; -moz-border-radius-topleft: 0.5em; -moz-border-radius-topright: 0.5em; -webkit-border-top-left-radius: 0.5em; -webkit-border-top-right-radius: 0.5em; }
+.forum-post .content { min-height: 12em; margin-right: 16.5em; padding: 1em; }
+.forum-post:nth-child(2n) { background: #f4f4f4; }
<%namespace name="lib" file="/lib.mako" />
+<%namespace name="userlib" file="/users/lib.mako" />
+
+<%def name="posts(posts)">
+<div class="forum-post-container">
+ % for post in posts:
+ <div class="forum-post">
+ <div class="author">
+ <div class="avatar">
+ ${userlib.avatar(post.author)}
+ </div>
+ <div class="name">
+ <a href="${url(controller='users', action='profile', id=post.author.id, name=post.author.name)}">
+ ${post.author.name}
+ ${userlib.color_bar(post.author)}
+ </a>
+ </div>
+ </div>
+ <div class="meta">
+ <time>${post.posted_time}</time>
+ </div>
+ <div class="content">${post.content}</div>
+ </div>
+ % endfor
+</div>
+</%def>
<%def name="write_thread_form(forum)">
% if c.user.can('create_forum_thread'):
% if c.thread.post_count == 0:
<p>Something terribly bogus has happened; this thread has no posts.</p>
-<% return %>
+% else:
+${forumlib.posts(c.thread.posts)}
% endif
-<div class="forum-post-container">
- % for post in c.thread.posts:
- <div class="forum-post">
- <div class="author">
- ${post.author.name}
- </div>
- <div class="meta">
- <time>${post.posted_time}</time>
- </div>
- <div class="content">${post.content}</div>
- </div>
- % endfor
-</div>
-
${forumlib.write_post_form(c.thread)}