kunzite (kunzite1) wrote in component_help,
kunzite
kunzite1
component_help

  • Mood:

stylesheet udpate [ Page::print_custom_head() ]

thanks to crschmidt for the original version of this code
this edit comes in three pieces seperated by asterisks. you are also changing the function that you are playing with. going from print_stylesheet() to Page::print_custom_head()
do not just copy this into your layer and expect everything to be happy, use the existing code found here, and alter the designated sections.

**********
# EDIT ONE: At the top
**********

function Page::print_custom_head() {
var string palimg        = $*header_bgcolor.as_string->substr(1,6);
var Color  ltLineColor   = $*header_bgcolor->lighter(30);
var string ltLineString  = $ltLineColor.as_string->substr(1,6);
var string medLineString = $*header_bgcolor.as_string->substr(1,6);
var Color  dkLineColor   = $*header_bgcolor->darker(50);
var string dkLineString  = $dkLineColor.as_string;
"""
<style type="text/css">
body {
background-color: $*main_bgcolor;
background-image: url("$*SITEROOT/palimg/component/bg.gif/p0$ltLineColor");
}

**********
# EDIT TWO: Near the middle
**********

.dkLine  { background-color: $dkLineString; }
.medLine { background-color: $medLineString; }
.ltLine  { background-color: $ltLineString; }
hr       { color           : $medLineString; }
.divLine { background-color: $*header_fgcolor; }
.tabBg   { background-color: $*header_bgcolor; }

**********
# EDIT THREE: At the bottom
**********

</style>
""";
}

Tags: admin: deprecated, user: kunzite1
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

  • 0 comments