Changeset 455 for veekun/branches
- Timestamp:
- 08/26/08 01:44:56 (19 months ago)
- Location:
- veekun/branches/layout2
- Files:
-
- 2 added
- 1 removed
- 3 modified
-
lib/Vee.pm (modified) (2 diffs)
-
lib/Vee/Controller/Style.pm (deleted)
-
root/style (modified) (1 prop)
-
templates/style/fluff/colors.yml (added)
-
templates/style/slick/colors.yml (added)
-
templates/wrapper.tt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
veekun/branches/layout2/lib/Vee.pm
r440 r455 6 6 use warnings; 7 7 8 use File::Path; 8 9 use Image::Size; 9 10 use LWP::UserAgent; … … 105 106 } 106 107 108 { 109 ### Generate static stylesheets 110 111 # Old hack for IE6 that I no longer care about in the fluff CSS 112 my $glass_sub = sub { "url(/images/bg-fade.png) $_[0] fixed left bottom no-repeat" }; 113 my $tmpl_dir = Vee->path_to('templates', 'style'); 114 my $static_dir = Vee->path_to('root', 'style'); 115 opendir my($dh), $tmpl_dir; 116 while (my $style = readdir $dh) { 117 next if $style =~ /^[.]/; 118 next if not -d "$tmpl_dir/$style"; 119 120 # Load the list of colors 121 my $colors_file = "$tmpl_dir/$style/colors.yml"; 122 next if not -f $colors_file; 123 my $sheet_colors = eval { YAML::LoadFile($colors_file) }; 124 if ($@) { 125 warn "Error loading colors for $style style: $@"; 126 next; 127 } 128 129 for my $colorscheme (keys %{$sheet_colors}) { 130 mkpath("$static_dir/$style/$colorscheme"); 131 for my $file (glob("$tmpl_dir/$style/*.tt")) { 132 (my $filename = $file) =~ s{.*/}{}smx; 133 (my $filename_css = $filename) =~ s{tt \z}{css}smx; 134 Vee->view->template->process( 135 "style/$style/$filename", { 136 skip_wrapper => 1, 137 glass_background => $glass_sub, 138 %{ $sheet_colors->{$colorscheme} }, 139 }, 140 "$static_dir/$style/$colorscheme/$filename_css", 141 ); 142 } 143 } 144 } 145 closedir $dh; 146 147 } 148 107 149 =head1 METHODS 108 150 -
veekun/branches/layout2/root/style
-
Property
svn:ignore set
to
fluff
slick
-
Property
svn:ignore set
to
-
veekun/branches/layout2/templates/wrapper.tt
r453 r455 13 13 <link rel="shortcut icon" type="image/png" href="/images/favicon.png"/> 14 14 <link rel="stylesheet" type="text/css" href="/style/reset.css"/> 15 <link rel="stylesheet" type="text/css" href="/style/slick/blue/global "/>15 <link rel="stylesheet" type="text/css" href="/style/slick/blue/global.css"/> 16 16 [% FOREACH css IN extra_css %] 17 <link rel="stylesheet" type="text/css" href="/style/slick/blue/[% css %] "/>17 <link rel="stylesheet" type="text/css" href="/style/slick/blue/[% css %].css"/> 18 18 [% END %] 19 19 [% extra_headers.join("\n") %]
