afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)
afuna ([personal profile] afuna) wrote in [site community profile] changelog2009-10-16 02:56 pm

[dw-nonfree] Page::print_theme_stylesheet function to hold theme-specific CSS

[commit: http://hg.dwscoalition.org/dw-nonfree/rev/9a9c8b0da062]

http://bugs.dwscoalition.org/show_bug.cgi?id=1941

Make it easier for themes to add their own CSS.

Patch by [personal profile] wyntarvox.

Files modified:
  • bin/upgrading/s2layers/modish/themes-local.s2
--------------------------------------------------------------------------------
diff -r d8d5feeb0797 -r 9a9c8b0da062 bin/upgrading/s2layers/modish/themes-local.s2
--- a/bin/upgrading/s2layers/modish/themes-local.s2	Tue Oct 13 16:32:51 2009 +0000
+++ b/bin/upgrading/s2layers/modish/themes-local.s2	Fri Oct 16 14:55:08 2009 +0000
@@ -147,29 +147,15 @@ set image_background_header_position = "
 
 
 #to add second header background image
-function Page::print_default_stylesheets() {
-    $this->print_default_stylesheet();
-
-    if ($*external_stylesheet) {
-        println safe """<link rel="stylesheet" href="$.stylesheet_url" type="text/css" />""";
-    }
-    else {
-        println """<style type="text/css">""";
-        start_css();
-        print_stylesheet();
-        end_css();
-        println """</style>""";
-    }
+function Page::print_theme_stylesheet() {
 
     if ($*image_background_header_url == "modish/bluestrip.jpg") {
         print safe """
-            <style type="text/css">
             #header .inner { background: url('$*STATDIR/modish/whtleaves.jpg') top right no-repeat; 
             margin-right: -200px; 
             padding-right: 200px; 
             padding-top: 1px;
             min-height: 75px; }
-            </style>
         """;
     }
 
--------------------------------------------------------------------------------