From a81670b58f01338129d951f9bd4bfed5862a84aa Mon Sep 17 00:00:00 2001 From: Eevee Date: Thu, 17 Jun 2010 17:35:15 -0700 Subject: [PATCH] Posts no longer look like balls, yay! --- splinext/forum/templates/css/forum.mako | 13 +++++++++---- splinext/forum/templates/forum/lib.mako | 25 +++++++++++++++++++++++++ splinext/forum/templates/forum/posts.mako | 17 ++--------------- 3 files changed, 36 insertions(+), 19 deletions(-) diff --git a/splinext/forum/templates/css/forum.mako b/splinext/forum/templates/css/forum.mako index be6ace9..6af5d50 100644 --- a/splinext/forum/templates/css/forum.mako +++ b/splinext/forum/templates/css/forum.mako @@ -4,7 +4,12 @@ table.forum-list td.name a { display: block; font-size: 1.5em; padding: 0.33em; 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; } diff --git a/splinext/forum/templates/forum/lib.mako b/splinext/forum/templates/forum/lib.mako index e2aafde..5be6251 100644 --- a/splinext/forum/templates/forum/lib.mako +++ b/splinext/forum/templates/forum/lib.mako @@ -1,4 +1,29 @@ <%namespace name="lib" file="/lib.mako" /> +<%namespace name="userlib" file="/users/lib.mako" /> + +<%def name="posts(posts)"> +
+ % for post in posts: +
+
+
+ ${userlib.avatar(post.author)} +
+ +
+
+ +
+
${post.content}
+
+ % endfor +
+ <%def name="write_thread_form(forum)"> % if c.user.can('create_forum_thread'): diff --git a/splinext/forum/templates/forum/posts.mako b/splinext/forum/templates/forum/posts.mako index b97954f..3ba1ec5 100644 --- a/splinext/forum/templates/forum/posts.mako +++ b/splinext/forum/templates/forum/posts.mako @@ -13,21 +13,8 @@ % if c.thread.post_count == 0:

Something terribly bogus has happened; this thread has no posts.

-<% return %> +% else: +${forumlib.posts(c.thread.posts)} % endif -
- % for post in c.thread.posts: -
-
- ${post.author.name} -
-
- -
-
${post.content}
-
- % endfor -
- ${forumlib.write_post_form(c.thread)} -- 2.7.4