00001 <?php
00010 if( !defined( 'MEDIAWIKI' ) )
00011 die( -1 );
00012
00014 require_once( dirname(__FILE__) . '/MonoBook.php' );
00015
00020 class SkinSimple extends SkinTemplate {
00021 var $skinname = 'simple', $stylename = 'simple',
00022 $template = 'MonoBookTemplate', $useHeadElement = true;
00023
00024 function setupSkinUserCss( OutputPage $out ){
00025 $out->addStyle( 'simple/main.css', 'screen' );
00026 $out->addStyle( 'simple/rtl.css', '', '', 'rtl' );
00027 }
00028
00029 function reallyGenerateUserStylesheet() {
00030 global $wgUser;
00031 $s = '';
00032 if( ( $undopt = $wgUser->getOption( 'underline' ) ) != 2 ) {
00033 $underline = $undopt ? 'underline' : 'none';
00034 $s .= "a { text-decoration: $underline; }\n";
00035 }
00036 if( $wgUser->getOption( 'highlightbroken' ) ) {
00037 $s .= "a.new, #quickbar a.new { text-decoration: line-through; }\n";
00038 } else {
00039 $s .= <<<CSS
00040 a.new, #quickbar a.new,
00041 a.stub, #quickbar a.stub {
00042 color: inherit;
00043 text-decoration: inherit;
00044 }
00045 a.new:after, #quickbar a.new:after {
00046 content: "?";
00047 color: #CC2200;
00048 text-decoration: $underline;
00049 }
00050 a.stub:after, #quickbar a.stub:after {
00051 content: "!";
00052 color: #772233;
00053 text-decoration: $underline;
00054 }
00055 CSS;
00056 }
00057 if( $wgUser->getOption( 'justify' ) ) {
00058 $s .= "#article, #bodyContent { text-align: justify; }\n";
00059 }
00060 if( !$wgUser->getOption( 'showtoc' ) ) {
00061 $s .= "#toc { display: none; }\n";
00062 }
00063 if( !$wgUser->getOption( 'editsection' ) ) {
00064 $s .= ".editsection { display: none; }\n";
00065 }
00066 return $s;
00067 }
00068 }