Changeset 23
- Timestamp:
- 02/10/07 12:33:37 (2 years ago)
- Files:
-
- trunk/Memories.pm (modified) (1 diff)
- trunk/templates/frontpage (modified) (1 diff)
- trunk/templates/static/memories.css (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Memories.pm
r22 r23 113 113 } 114 114 115 sub _recent_uploads { Memories::Photo->search_recent() } 116 sub _random { Memories::Photo->search_random() } 117 118 sub recent_uploads { shift->do_cached(\&_recent_uploads) } 119 sub random { shift->do_cached(\&_random) } 115 for my $how (qw(random recent interesting popular)) { 116 no strict; 117 my $method = "search_$how"; 118 *{"_$how"} = sub { Memories::Photo->$method }; 119 *{$how} = sub { shift->do_cached(\&{"_$how"})}; 120 } 121 120 122 sub tagcloud { shift->do_cached(\&_tagcloud) } 121 123 trunk/templates/frontpage
r2 r23 1 1 [% INCLUDE header %] 2 <h1> Welcome to Memories </h1> 3 2 [% PROCESS macros %] 3 <table class="frontpagetable" width="100%"> 4 [% FOR how = ["popular", "interesting", "random"] %] 5 <tr><th colspan="4">[%how | ucfirst%] photos</th></tr> 6 <tr> 7 [% FOR pic = request.$how %] 8 <td align="center"> [% minithumb(pic) %] <br> [%pic.title%] </td> 9 [% END %] 10 </tr> 11 [% END %] 12 </table> 13 4 14 <p> 5 15 Memories is a site where you can upload and share your photos. trunk/templates/static/memories.css
r17 r23 92 92 .smaller { font-size: 80% } 93 93 94 .frontpagetable { padding: 10px; } 95 .frontpagetable th { border: 1px solid black; } 94 96 span.tagcloud0 { font-size: 9px;} 95 97 span.tagcloud1 { font-size: 10px;}
