X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=blobdiff_plain;f=skins%2FSimple.php;h=54be9f7d7d9bac87e9a70cb6ebf5a83015a68eb7;hb=2c83ec33e432defdeb0fc06bf71c649f789b233b;hp=1726bdad803ba29d7a580c0a27ecf6d20b285379;hpb=9f6c026c362731d6e6353713f384852cf83e12ea;p=lhc%2Fweb%2Fwiklou.git diff --git a/skins/Simple.php b/skins/Simple.php index 1726bdad80..54be9f7d7d 100644 --- a/skins/Simple.php +++ b/skins/Simple.php @@ -1,71 +1,50 @@ skinname = 'simple'; - $this->stylename = 'simple'; - $this->template = 'MonoBookTemplate'; - } + var $skinname = 'simple', $stylename = 'simple', + $template = 'MonoBookTemplate', $useHeadElement = true; - function reallyDoGetUserStyles() { - global $wgUser; - $s = ''; - $s .= "/* highlightbroken: " . $wgUser->getOption('highlightbroken') . " */\n"; - if (($undopt = $wgUser->getOption("underline")) != 2) { - $underline = $undopt ? 'underline' : 'none'; - $s .= "a { text-decoration: $underline; }\n"; - } - if (!$wgUser->getOption('highlightbroken')) { - $s .= "a.new, #quickbar a.new { text-decoration: line-through; }\n"; - } else { - $s .= <<getOption('justify')) { - $s .= "#article, #bodyContent { text-align: justify; }\n"; - } - if (!$wgUser->getOption('showtoc')) { - $s .= "#toc { display: none; }\n"; + /** + * @param $out OutputPage + */ + function setupSkinUserCss( OutputPage $out ) { + parent::setupSkinUserCss( $out ); + + $out->addModuleStyles( 'skins.simple' ); + + /* Add some userprefs specific CSS styling */ + $rules = array(); + $underline = ""; + + if ( $this->getUser()->getOption( 'underline' ) < 2 ) { + $underline = "text-decoration: " . $this->getUser()->getOption( 'underline' ) ? 'underline !important' : 'none' . ";"; } - if (!$wgUser->getOption('editsection')) { - $s .= ".editsection { display: none; }\n"; + + /* Also inherits from resourceloader */ + if( !$this->getUser()->getOption( 'highlightbroken' ) ) { + $rules[] = "a.new, a.stub { color: inherit; text-decoration: inherit;}"; + $rules[] = "a.new:after { color: #CC2200; $underline;}"; + $rules[] = "a.stub:after { $underline; }"; } - return $s; + $style = implode( "\n", $rules ); + $out->addInlineStyle( $style, 'flip' ); + } } - -?>