Changeset 2743
- Timestamp:
- 07/09/08 22:25:40 (19 months ago)
- Location:
- branches/release-41/plugins/StyleCatcher
- Files:
-
- 1 added
- 1 removed
- 1 modified
-
config.yaml (added)
-
lib/StyleCatcher/CMS.pm (modified) (3 diffs)
-
stylecatcher.pl (deleted)
Legend:
- Unmodified
- Added
- Removed
-
branches/release-41/plugins/StyleCatcher/lib/StyleCatcher/CMS.pm
r2576 r2743 254 254 } 255 255 256 257 my $url2 = $mtthemebase . "blog.css"; 256 my $blog = MT->model('blog')->load($blog_id) 257 or return $app->json_error( $app->translate('No such blog [_1]', $blog_id) ); 258 259 my $r = MT->registry; 260 my $base_css = $r->{"template_sets"}{$blog->template_set}{"base_css"}; 258 261 259 262 # Replacing the theme import or adding a new one at the beginning … … 263 266 '/* This is the StyleCatcher theme addition. Do not remove this block. */'; 264 267 my $footer = '/* end StyleCatcher imports */'; 265 my $styles = $header . "\n" . <<"EOT" . $footer; 266 \@import url($url2); 267 \@import url($url); 268 EOT 268 my $styles = $header . "\n"; 269 $styles .= "\@import url(".File::Spec->catfile($app->static_path, $base_css).");\n" if $base_css; 270 $styles .= "\@import url($url);\n"; 271 $styles .= $footer; 272 print STDERR "styles=$styles\n"; 273 269 274 if ($template_text =~ s/\Q$header\E.*\Q$footer\E/$styles/s) { 270 275 $tmpl->text( $template_text ); … … 299 304 $tmpl->save or return $app->json_error( $tmpl->errstr ); 300 305 301 my $blog = MT->model('blog')->load($blog_id)302 or return $app->json_error( $app->translate('No such blog [_1]', $blog_id) );303 306 $blog->page_layout($layout); 304 307 $blog->touch();
