Changeset 1120
- Timestamp:
- 09/22/08 20:17:20 (14 months ago)
- Location:
- trunk/StyleCatcher/plugins/StyleCatcher
- Files:
-
- 1 added
- 7 removed
- 2 modified
-
base-weblog.css (deleted)
-
config.yaml (added)
-
lib/StyleCatcher.pm (deleted)
-
lib/StyleCatcher/CMS.pm (modified) (5 diffs)
-
stylecatcher.cgi (deleted)
-
stylecatcher.pl (deleted)
-
tmpl/footer.tmpl (deleted)
-
tmpl/gmscript.tmpl (deleted)
-
tmpl/header.tmpl (deleted)
-
tmpl/view.tmpl (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/StyleCatcher/plugins/StyleCatcher/lib/StyleCatcher/CMS.pm
r817 r1120 3 3 # GNU General Public License, version 2. 4 4 # 5 # $Id: CMS.pm 2 576 2008-06-14 00:35:33Z bchoate $5 # $Id: CMS.pm 2923 2008-08-14 18:45:46Z bchoate $ 6 6 7 7 package StyleCatcher::CMS; … … 135 135 # The remixer only uses name, author, description at the moment. 136 136 my $app = shift; 137 return $app->json_error( $app->errstr ) unless $app->validate_magic; 137 138 138 139 my $data = fetch_themes($app->param('url')) … … 254 255 } 255 256 256 257 my $url2 = $mtthemebase . "blog.css"; 257 my $blog = MT->model('blog')->load($blog_id) 258 or return $app->json_error( $app->translate('No such blog [_1]', $blog_id) ); 259 260 my $r = MT->registry; 261 my $base_css = $r->{"template_sets"}{$blog->template_set}{"base_css"}; 258 262 259 263 # Replacing the theme import or adding a new one at the beginning … … 263 267 '/* This is the StyleCatcher theme addition. Do not remove this block. */'; 264 268 my $footer = '/* end StyleCatcher imports */'; 265 my $styles = $header . "\n" . <<"EOT" . $footer; 266 \@import url($url2); 267 \@import url($url); 268 EOT 269 my $styles = $header . "\n"; 270 $styles .= "\@import url(".MT::Util::caturl($app->static_path, $base_css).");\n" if $base_css; 271 $styles .= "\@import url($url);\n"; 272 $styles .= $footer; 273 print STDERR "styles=$styles\n"; 274 269 275 if ($template_text =~ s/\Q$header\E.*\Q$footer\E/$styles/s) { 270 276 $tmpl->text( $template_text ); … … 299 305 $tmpl->save or return $app->json_error( $tmpl->errstr ); 300 306 301 my $blog = MT->model('blog')->load($blog_id)302 or return $app->json_error( $app->translate('No such blog [_1]', $blog_id) );303 307 $blog->page_layout($layout); 304 308 $blog->touch(); -
trunk/StyleCatcher/plugins/StyleCatcher/tmpl/view.tmpl
r817 r1120 491 491 'arguments': { 492 492 '__mode': 'stylecatcher_js', 493 'magic_token': '<mt:var name="magic_token">', 493 494 'url': url 494 495 } … … 546 547 </div> 547 548 <mt:loop name="style_library"> 548 <div class="category" id="category-repo-<mt:var name="key">" title="<mt:var name="description_label" escape="html">"><img src="<mt:var name="plugin_static_uri">images/featured.gif" alt="more-designs" /><span><mt:var name="label" ></span>549 <div class="category" id="category-repo-<mt:var name="key">" title="<mt:var name="description_label" escape="html">"><img src="<mt:var name="plugin_static_uri">images/featured.gif" alt="more-designs" /><span><mt:var name="label" escape="html"></span> 549 550 </div> 550 551 </mt:loop>
