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-11 09:20 am

[dw-nonfree] Move official-theme additional CSS from Page::print_custom_head

[commit: http://hg.dwscoalition.org/dw-nonfree/rev/0f114ba0bf7d]

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

Code cleanup.

Patch by [personal profile] wyntarvox.

Files modified:
  • bin/upgrading/s2layers/modish/themes-local.s2
--------------------------------------------------------------------------------
diff -r 0509e5f46c53 -r 0f114ba0bf7d bin/upgrading/s2layers/modish/themes-local.s2
--- a/bin/upgrading/s2layers/modish/themes-local.s2	Sun Oct 11 00:56:48 2009 -0500
+++ b/bin/upgrading/s2layers/modish/themes-local.s2	Sun Oct 11 09:20:20 2009 +0000
@@ -147,19 +147,31 @@ set image_background_header_position = "
 
 
 #to add second header background image
-function Page::print_custom_head() {
+function Page::print_default_stylesheets() {
+    $this->print_default_stylesheet();
 
-  if ($*image_background_header_url == "modish/bluestrip.jpg") {
-    print safe """
-        <style>
-        #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>
-    """;
-  }
+    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>""";
+    }
+
+    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>
+        """;
+    }
 
 }
 
--------------------------------------------------------------------------------