Changeset 102 for veekun/branches
- Timestamp:
- 04/19/07 01:03:45 (3 years ago)
- Location:
- veekun/branches/layout
- Files:
-
- 1 added
- 4 modified
-
lib/Vee/View/TT.pm (modified) (1 diff)
-
templates/forum/common.tt (modified) (5 diffs)
-
templates/forum/thread/view.tt (modified) (2 diffs)
-
templates/style/forum.tt (added)
-
templates/style/global.tt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
veekun/branches/layout/lib/Vee/View/TT.pm
r68 r102 33 33 post_width => \&Vee::Utils::post_width, 34 34 postrank => sub { Vee::Utils::postrank(shift, Vee->site_opts->{post_ranks}) }, 35 postbar_color => sub { Vee::Utils::hsv2rgb(shift, 192, 192) },35 postbar_color => sub { Vee::Utils::hsv2rgb(shift, 84, 192) }, 36 36 37 37 # forum stuff... -
veekun/branches/layout/templates/forum/common.tt
r36 r102 19 19 [% END %] 20 20 [% IF postct_barsize > 100; postct_barsize = 97.5; END %] 21 [% postct_hue = posts * 0.3 6%]22 <div class="post ctbox"><div class="postctbar" style="width: [% round(postct_barsize, 1) %]%; background-color: #[% postbar_color(postct_hue) %];"></div></div>21 [% postct_hue = posts * 0.32 # not quite 360! %] 22 <div class="postbar-container"><div class="postbar-bar" style="width: [% round(postct_barsize, 1) %]%; background-color: #[% postbar_color(postct_hue) %];"></div></div> 23 23 [% END %] 24 24 … … 72 72 <!-- blocks for printing out a sequence of posts --> 73 73 74 [% BLOCK posts_start %][% END %] 74 [% BLOCK posts_start %] 75 [% c.stash.posts_color = 1 %] 76 [% END %] 75 77 76 78 [% BLOCK posts_each %][%# post, thread, forum, show_deleted %] 77 79 [% is_deleted = post.flags.match('deleted') %] 78 <div class="forum-post [% ' forum-post-deleted' IF is_deleted %]">80 <div class="forum-post color[% c.stash.posts_color %][% ' deleted' IF is_deleted %]"> 79 81 [% IF is_deleted AND !show_deleted %] 80 82 <p> … … 89 91 [% END %] 90 92 [% INCLUDE post_buttons post=post thread=thread forum=forum %] 91 <div class=" forum-post-sidebar"><div class="forum-post-content">93 <div class="sidebar-wrapper"><div class="sidebar"> 92 94 [% groups = post.user.groups.split(' '); primary_group = groups.shift %] 93 <div class="forum-post-username"><a href="/user/[% post.userid %]"><img src="/images/groups/[% UserGroups.$primary_group.icon %]" alt="[% UserGroups.$primary_group.name %]" title="[% UserGroups.$primary_group.name %]"/> [% post.user.name %]</a></div> 94 <div class="forum-post-title[% IF post.user.customtitle -%] forum-post-custom">[% post.user.customtitle %][% ELSE %]">[% UserGroups.$primary_group.name %][% END %]</div> 95 <div class="forum-post-avatar"[% IF post.user.avatar %] style="background-image: url(/images/avatars/[% post.user.avatar %]);">[% ELSE %]>No avatar[% END %]</div> 96 <span style="float: right;">[% postrank(post.user.postct) %]</span> Posts: [% post.user.postct %] [% INCLUDE postbar posts=post.user.postct %] 95 <div class="username"><a href="/user/[% post.userid %]"><img src="/images/groups/[% UserGroups.$primary_group.icon %]" alt="[% UserGroups.$primary_group.name %]" title="[% UserGroups.$primary_group.name %]"/> [% post.user.name %]</a></div> 96 <div class="title[% IF post.user.customtitle -%] custom">[% post.user.customtitle %][% ELSE %]">[% UserGroups.$primary_group.name %][% END %]</div> 97 <div class="avatar">[% IF post.user.avatar %]<img src="/images/avatars/[% post.user.avatar %]" alt="">[% ELSE %]No avatar[% END %]</div> 98 <div class="postbar"> 99 <span class="postrank">[% postrank(post.user.postct) %]</span> 100 <span class="postcount">Posts: [% post.user.postct %]</span> 101 [% INCLUDE postbar posts=post.user.postct %] 102 </div> 97 103 </div></div> 98 <div class="forum-post-header"><div class="forum-post-content"> 104 <div class="topbar"> 105 <a[% IF post.id %] href="/forum/post/[% post.id %]"[% END %] name="p[% post.id %]">[% post.time | date %]</a> 106 </div> 107 <div class="content"> 108 [% IF post.newspic %] 109 <img src="/images/news/[% post.user.newspic %]" alt="[% post.name %]'s newspic" class="forum-post-newspic"/> 110 [% END %] 99 111 [% IF post.lastedit %] 100 <div class="forum-post-edits">Post last <a href="/forum/post/[% post.id %]/edits">edited</a> on [% post.lastedit.time | date %] by <a href="/user/[% post.editor %]">[% post.lastedit.user.name %]</a></div> 101 [% END %] 102 <a[% IF post.id %] href="/forum/post/[% post.id %]"[% END %] name="p[% post.id %]">[% post.time | date %]</a> 103 </div></div> 104 [% IF post.newspic %] 105 <img src="/images/news/[% post.user.newspic %]" alt="[% post.name %]'s newspic" class="forum-post-newspic"/> 106 [% END %] 107 <div class="forum-post-main"><div class="forum-post-content"> 108 [%+ post.message | bbcode | indent(8) %] 112 <div class="edits">Post last <a href="/forum/post/[% post.id %]/edits">edited</a> on [% post.lastedit.time | date %] by <a href="/user/[% post.editor %]">[% post.lastedit.user.name %]</a></div> 113 [% END %] 114 <div class="message"> 115 [%+ post.message | bbcode | indent(12) %] 116 </div> 109 117 [% IF post.user.signature %] 110 <div class="forum-post-sig">[% post.user.signature | bbcode %]</div> 111 [% END %] 112 </div></div> 113 </div> 118 <div class="sig">[% post.user.signature | bbcode %]</div> 119 [% END %] 120 </div> 121 </div> 122 [% c.stash.posts_color = 3 - c.stash.posts_color %] 114 123 [%+ END %] 115 124 … … 119 128 120 129 [% BLOCK threads_start %] 130 [% c.stash.threads_color = 1 %] 121 131 <table class="forums" cellspacing="0"> 122 <tr><th class=" forum-icon"></th><th class="forum-name left">Thread</th><th class="forum-postinfo">First Post</th><th class="forum-count">Replies</th><th class="forum-count">Views</th><th class="forum-postinfo">Last Post</th></tr>132 <tr><th class="icon"></th><th class="name">Thread</th><th class="postinfo">First Post</th><th class="count">Replies</th><th class="count">Views</th><th class="postinfo">Last Post</th></tr> 123 133 [% END %] 124 134 125 135 [% BLOCK threads_each %][%# thread, ?show_forum -%] 126 <tr [% IF thread.flags.match('deleted') %] class="forum-thread-deleted"[% END %]><td class="forum-icon">[%# space reserved for some sort of thread icons %]</td><td class="forum-name">136 <tr class="color[% c.stash.threads_color %][% IF thread.flags.match('deleted') %] deleted[% END %]"><td class="icon"><!-- space reserved for some sort of thread icons --></td><td class="name"> 127 137 <!--<a href="/forum/thread/[% thread.id %]/nuke" style="float: right;"><img src="/images/icons/nuke.png" alt="Nuke" title="Nuke"/></a> 128 138 <a href="/forum/thread/[% thread.id %]/del" style="float: right;"><img src="/images/icons/delete.png" alt="Delete" title="Delete"/></a> 129 139 <a href="/forum/thread/[% thread.id %]/edit" style="float: right;"><img src="/images/icons/edit.png" alt="Edit" title="Edit"/></a>--> 130 <a href="/forum/thread/[% thread.id %]" class="forum-link">131 <div class=" forum-title">140 <a href="/forum/thread/[% thread.id %]"> 141 <div class="name"> 132 142 [% FOREACH flag IN ThreadFlagArray %] 133 143 [% NEXT UNLESS thread.flags.match(flag.name) %] 134 <img src="/images/icons/[% flag.name %].png" alt="[% flag.name %]" title="[% flag.name %]: [% flag.blurb %]" class="f orum-icon"/>144 <img src="/images/icons/[% flag.name %].png" alt="[% flag.name %]" title="[% flag.name %]: [% flag.blurb %]" class="flag"/> 135 145 [% END %] 136 146 [% thread.subject %] 137 147 </div> 138 148 [% IF thread.blurb %] 139 <div class=" forum-info">[% thread.blurb %]</div>149 <div class="blurb">[% thread.blurb %]</div> 140 150 [% END %] 141 151 </a> <!-- [ <a>2</a>, <a>3</a>, <a>4</a>, ... <a>9</a>, <a>10</a> ] --> 142 152 [% IF show_forum %] 143 <div class=" forum-info">in forum "<a href="/forum/[% thread.forumid %]">[% thread.forum.name %]</a>"</div>153 <div class="inforum">in forum "<a href="/forum/[% thread.forumid %]">[% thread.forum.name %]</a>"</div> 144 154 [% END %] 145 155 </td> 146 <td class=" forum-postinfo"><a href="/user/[% thread.firstpost.userid %]">[% thread.firstpost.user.name %]</a> <br/> <a href="/forum/post/[% thread.firstpost.id %]">[% thread.firstpost.time | date %]</a></td>147 <td class=" forum-count">[% thread.postct - 1 %]</td><td class="forum-count">[% thread.hitct %]</td>148 <td class=" forum-postinfo">156 <td class="postinfo"><a href="/user/[% thread.firstpost.userid %]">[% thread.firstpost.user.name %]</a> <a href="/forum/post/[% thread.firstpost.id %]">[% thread.firstpost.time | date %]</a></td> 157 <td class="count">[% thread.postct - 1 %]</td><td class="count">[% thread.hitct %]</td> 158 <td class="postinfo"> 149 159 [% IF thread.postct <= 1 -%] 150 160 - 151 161 [% ELSE %] 152 <a href="/user/[% thread.lastpost.userid %]">[% thread.lastpost.user.name %]</a> < br/> <a href="/forum/post/[% thread.lastpost.id %]">[% thread.lastpost.time | date %]</a>162 <a href="/user/[% thread.lastpost.userid %]">[% thread.lastpost.user.name %]</a> <a href="/forum/post/[% thread.lastpost.id %]">[% thread.lastpost.time | date %]</a> 153 163 [% END -%] 154 164 </td></tr> 165 [% c.stash.threads_color = 3 - c.stash.threads_color %] 155 166 [% END -%] 156 167 … … 165 176 <!-- blocks for printing out a table of forums --> 166 177 167 [%- BLOCK forums_start -%] 178 [% BLOCK forums_start %] 179 [% c.stash.forums_color = 1 %] 168 180 <table class="forums" cellspacing="0"> 169 <tr><th class=" forum-icon"></th><th class="forum-name left">Forum</th><th class="forum-count">Threads</th><th class="forum-count">Posts</th><th class="forum-postinfo">Last Post</th></tr>181 <tr><th class="icon"></th><th class="name">Forum</th><th class="count">Threads</th><th class="count">Posts</th><th class="postinfo">Last Post</th></tr> 170 182 [% END %] 171 183 172 184 [% BLOCK forums_header %][%# title, blurb -%] 173 <tr><th colspan="5" class=" forum-header">[% title %][% IF blurb %]<div class="forum-info">[% blurb %]</div>[% END %]</th></tr>185 <tr><th colspan="5" class="heading">[% title %][% IF blurb %]<div class="blurb">[% blurb %]</div>[% END %]</th></tr> 174 186 [% END %] 175 187 176 188 [% BLOCK forums_each %][%# forum -%] 177 <tr ><td class="forum-icon">189 <tr class="color[% c.stash.forums_color %]"><td class="icon"> 178 190 [% UNLESS forum.accessibility == 'normal' %]<img src="/images/icons/[% forum.accessibility %].png" alt="[% forum.accessibility %]" title="[% forum.accessibility %]"/>[% END %] 179 </td><td class=" forum-name">180 <a href="/forum/[% forum.id %]" class="forum-link">181 < div class="forum-title">[% forum.name %]</div>191 </td><td class="name"> 192 <a href="/forum/[% forum.id %]"> 193 <span class="title">[% forum.name %]</span> 182 194 [% IF forum.blurb %] 183 < div class="forum-info">[% forum.blurb %]</div>195 <span class="blurb">[% forum.blurb %]</span> 184 196 [% END %] 185 197 </a> 186 198 </td> 187 <td class=" forum-count">[% forum.threadct %]</td><td class="forum-count">[% forum.postct %]</td>188 <td class=" forum-postinfo">199 <td class="count">[% forum.threadct %]</td><td class="count">[% forum.postct %]</td> 200 <td class="postinfo"> 189 201 [% IF forum.lastpostid %] 190 202 [% IF 25 < forum.lastpost.thread.subject.length; subject = last_thread.subject.substr(0, 22) _ '...'; ELSE; subject = forum.lastpost.thread.subject; END -%] 191 [% subject %] < br/> <a href="/user/[% forum.lastpost.userid %]">[% forum.lastpost.user.name %]</a> <br/> <a href="/forum/post/[% forum.lastpostid %]">[% forum.lastpost.time | date %]</a>203 [% subject %] <a href="/user/[% forum.lastpost.userid %]">[% forum.lastpost.user.name %]</a> <a href="/forum/post/[% forum.lastpostid %]">[% forum.lastpost.time | date %]</a> 192 204 [% ELSE %] 193 205 (no posts) 194 206 [% END %] 195 207 </td></tr> 208 [% c.stash.forums_color = 3 - c.stash.forums_color %] 196 209 [% END %] 197 210 198 211 [% BLOCK forums_message %][%# message -%] 199 <tr><td class=" forum-message" colspan="5">[% message %]</td></tr>212 <tr><td class="message" colspan="5">[% message %]</td></tr> 200 213 [% END %] 201 214 -
veekun/branches/layout/templates/forum/thread/view.tt
r23 r102 2 2 [% PROCESS 'forum/common.tt' %] 3 3 4 [% IF thread.blurb %]<div class="forum-blurb">[% thread.blurb %]</div>[% END %] 5 <div class="forum-postct">[% thread.postct %] post[% 's' IF thread.postct != 1 %], [% thread.hitct %] view[% 's' IF thread.hitct != 1 %]</div> 6 [% this_pagelist = pagelist(skip, c.site_opts.page_sizes.posts, thread.postct, c.uri('Forum', 'thread', thread.id), c.req.params); this_pagelist %] 4 <div class="forum-post-infobox"> 5 [% IF thread.blurb %] 6 <div class="blurb">[% thread.blurb %]</div> 7 [% END %] 8 <div class="flags">flags...</div> 9 <div class="postcount">[% thread.postct %] post[% 's' IF thread.postct != 1 %]; [% thread.hitct %] view[% 's' IF thread.hitct != 1 %]</div> 10 [% this_pagelist = pagelist(skip, c.site_opts.page_sizes.posts, thread.postct, c.uri('Forum', 'thread', thread.id), c.req.params); this_pagelist %] 11 </div> 7 12 [% INCLUDE posts_start %] 8 13 [% done_posts = 0 %] 9 14 [% WHILE (p = posts_rs.next) %] 10 15 [% IF done_posts > 0 %] 11 <div class="forum-post diff">[% p.time - last_post_time | timespan %]</div>16 <div class="forum-post-diff">[% p.time - last_post_time | timespan %]</div> 12 17 [% END %] 13 18 [% INCLUDE posts_each post=p thread=thread forum=thread.forum show_deleted=0 %] … … 31 36 32 37 [% IF page_islast %] 33 <div class="forum-post diff">[% time - last_post_time | timespan %]<br/>since last post</div>38 <div class="forum-post-diff">[% time - last_post_time | timespan %]<br/>since last post</div> 34 39 [% ELSE %] 35 <div class="forum-post diff">[% posts_rs.next.time - last_post_time | timespan %]<br/>to first post on next page</div>40 <div class="forum-post-diff">[% posts_rs.next.time - last_post_time | timespan %]<br/>to first post on next page</div> 36 41 [% END %] 37 42 <form action="/forum/thread/[% thread.id %]" method="get" class="forum-filter"> 38 <p>Filter by user: <input type="text" name="filter" value="[% filter.name %]"/></p> 39 [% IF filter.keys.size %]<p><a href="/forum/thread/[% thread.id %]">Remove filter</a></p>[% END %] 43 <fieldset> 44 <legend>View options</legend> 45 <p>Filter by user: <input type="text" name="filter" value="[% filter.name %]"/></p> 46 [% IF filter.keys.size %] 47 <p><a href="/forum/thread/[% thread.id %]">Remove filter</a></p> 48 [% END %] 49 </fieldset> 40 50 </form> 41 51 [% IF allowed('thread.flag') %] -
veekun/branches/layout/templates/style/global.tt
r97 r102 37 37 38 38 /* regular ol' layout bits */ 39 p { margin: 0.5em ; line-height: 133%; }39 p { margin: 0.5em 0; line-height: 133%; } 40 40 #content h1, #content h2, #content h3 { background: url(/images/h1-ground.png) #e6d3b8 no-repeat left center; clear: both; margin: 1em 0 0.5em 0; padding-left: 80px; color: #806640; border: 1px solid #c0a680; border-left: none; border-right: none; } 41 41 #content h1 { margin: 0.5em -8px; padding: 0; padding-left: 80px; border-top: 2px solid #806640; } … … 92 92 93 93 /* forms */ 94 fieldset { border: 2px solid #806640; border-right: none; border-bottom: none; -moz-border-radius-topleft: 16px; padding: 0 .33em 0.66em; }94 fieldset { border: 2px solid #806640; border-right: none; border-bottom: none; -moz-border-radius-topleft: 16px; padding: 0 0.5em; margin: 0.5em 0; } 95 95 fieldset legend { font-weight: bold; margin-left: 1em; } 96 96
