]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
add a method to Design to show custom CSS
authorEvan Prodromou <evan@controlyourself.ca>
Sat, 23 May 2009 03:13:09 +0000 (23:13 -0400)
committerEvan Prodromou <evan@controlyourself.ca>
Sat, 23 May 2009 03:13:09 +0000 (23:13 -0400)
classes/Design.php

index cca41ce0cb4206e660fa7d7fbde1f3df320a449a..c1b6f73e030c467cb3a192cbdaff9eceaad14173 100644 (file)
@@ -44,4 +44,14 @@ class Design extends Memcached_DataObject
 
     /* the code above is auto generated do not remove the tag below */
     ###END_AUTOCODE
+
+    function showCSS($out)
+    {
+        $out->element('stylesheet', array('type' => 'text/css'),
+                      'body { background-color: #' . dechex($this->backgroundcolor) . '} '."\n".
+                      '#content { background-color #' . dechex($this->contentcolor) . '} '."\n".
+                      '#aside_primary { background-color #'. dechex($this->sidebarcolor) .'} '."\n".
+                      'html body { color: #'. dechex($this->textcolor) .'} '."\n".
+                      'a { color: #' . dechex($this->linkcolor) . '} '."\n");
+    }
 }