(Bug 18330) Made pageCountInfo() public
[mediawiki.git] / skins / Simple.php
blob367d3933890ef55544f1df90f2e772f22cc5edf7
1 <?php
2 /**
3 * Simple: A lightweight skin with a simple white-background sidebar and no
4 * top bar.
6 * @file
7 * @ingroup Skins
8 */
10 if( !defined( 'MEDIAWIKI' ) )
11 die( -1 );
13 /** */
14 require_once( dirname(__FILE__) . '/MonoBook.php' );
16 /**
17 * Inherit main code from SkinTemplate, set the CSS and template filter.
18 * @ingroup Skins
20 class SkinSimple extends SkinTemplate {
21 function initPage( OutputPage $out ) {
22 SkinTemplate::initPage( $out );
23 $this->skinname = 'simple';
24 $this->stylename = 'simple';
25 $this->template = 'MonoBookTemplate';
28 function setupSkinUserCss( OutputPage $out ){
29 $out->addStyle( 'simple/main.css', 'screen' );
30 $out->addStyle( 'simple/rtl.css', '', '', 'rtl' );
33 function reallyGenerateUserStylesheet() {
34 global $wgUser;
35 $s = '';
36 if( ( $undopt = $wgUser->getOption( 'underline' ) ) != 2 ) {
37 $underline = $undopt ? 'underline' : 'none';
38 $s .= "a { text-decoration: $underline; }\n";
40 if( $wgUser->getOption( 'highlightbroken' ) ) {
41 $s .= "a.new, #quickbar a.new { text-decoration: line-through; }\n";
42 } else {
43 $s .= <<<END
44 a.new, #quickbar a.new,
45 a.stub, #quickbar a.stub {
46 color: inherit;
47 text-decoration: inherit;
49 a.new:after, #quickbar a.new:after {
50 content: "?";
51 color: #CC2200;
52 text-decoration: $underline;
54 a.stub:after, #quickbar a.stub:after {
55 content: "!";
56 color: #772233;
57 text-decoration: $underline;
59 END;
61 if( $wgUser->getOption( 'justify' ) ) {
62 $s .= "#article, #bodyContent { text-align: justify; }\n";
64 if( !$wgUser->getOption( 'showtoc' ) ) {
65 $s .= "#toc { display: none; }\n";
67 if( !$wgUser->getOption( 'editsection' ) ) {
68 $s .= ".editsection { display: none; }\n";
70 return $s;