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:16 am

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

[commit: http://hg.dwscoalition.org/dw-free/rev/4b4e00576abd]

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

Code cleanup.

Patch by [personal profile] wyntarvox.

Files modified:
  • bin/upgrading/s2layers/fluidmeasure/themes.s2
--------------------------------------------------------------------------------
diff -r 2235b84b1dfe -r 4b4e00576abd bin/upgrading/s2layers/fluidmeasure/themes.s2
--- a/bin/upgrading/s2layers/fluidmeasure/themes.s2	Sat Oct 10 05:58:08 2009 +0000
+++ b/bin/upgrading/s2layers/fluidmeasure/themes.s2	Sun Oct 11 09:15:38 2009 +0000
@@ -63,12 +63,25 @@ set color_module_title_background = "#DB
 set color_module_title_background = "#DBBD95"; 
 set color_module_border = "#333"; 
 
-function Page::print_custom_head() {
-"""
-<style type="text/css">
-.module-calendar .entry-day a { color: $*color_module_background !important; }
-</style>
-""";
+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>""";
+    }
+
+    """
+    <style type="text/css">
+    .module-calendar .entry-day a { color: $*color_module_background !important; }
+    </style>
+    """;
 }
 
 #NEWLAYER: fluidmeasure/spice
--------------------------------------------------------------------------------