Changeset 357:b01c0e011e2f for themes/ductile/_public.php
- Timestamp:
- 06/13/11 15:31:04 (14 years ago)
- Branch:
- themes
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
themes/ductile/_public.php
r345 r357 19 19 public static function publicHeadContent($core) 20 20 { 21 echo '<style type="text/css">'."\n".'/* Additionnal style directives */'."\n</style>\n"; 21 echo 22 '<style type="text/css">'."\n". 23 '/* Additionnal style directives */'."\n". 24 self::ductileStyleHelper(). 25 "</style>\n"; 26 } 27 28 public static function ductileStyleHelper() 29 { 30 $s = $GLOBALS['core']->blog->settings->themes->ductile_style; 31 32 if ($s === null) { 33 return; 34 } 35 36 $s = @unserialize($s); 37 if (!is_array($s)) { 38 return; 39 } 40 41 $css = array(); 42 43 # Properties 44 45 self::prop($css,'a','color',$s['body_link_c']); 46 self::prop($css,'a:visited','color',$s['body_link_v_c']); 47 self::prop($css,'a:hover, a:focus, a:active','color',$s['body_link_f_c']); 48 49 $res = ''; 50 foreach ($css as $selector => $values) { 51 $res .= $selector." {\n"; 52 foreach ($values as $k => $v) { 53 $res .= $k.':'.$v.";\n"; 54 } 55 $res .= "}\n"; 56 } 57 58 return $res; 59 } 60 61 protected static function prop(&$css,$selector,$prop,$value) 62 { 63 if ($value) { 64 $css[$selector][$prop] = $value; 65 } 22 66 } 23 67 }
Note: See TracChangeset
for help on using the changeset viewer.