summaryrefslogtreecommitdiff
path: root/skins/Simple.php
blob: b61b6a941544ee51102cd6fdd62ce99caac16b4c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?php
/**
 * See skin.txt
 *
 * @todo document
 * @addtogroup Skins
 */

if( !defined( 'MEDIAWIKI' ) )
	die( -1 );

/** */
require_once( dirname(__FILE__) . '/MonoBook.php' );

/**
 * @todo document
 * @addtogroup Skins
 */
class SkinSimple extends SkinTemplate {
	function initPage( &$out ) {
		SkinTemplate::initPage( $out );
		$this->skinname  = 'simple';
		$this->stylename = 'simple';
		$this->template  = 'MonoBookTemplate';
	}

	function reallyDoGetUserStyles() {
		global $wgUser;
		$s = '';
		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 .= <<<END
a.new, #quickbar a.new,
a.stub, #quickbar a.stub {
	color: inherit;
	text-decoration: inherit;
}
a.new:after, #quickbar a.new:after {
	content: "?";
	color: #CC2200;
	text-decoration: $underline;
}
a.stub:after, #quickbar a.stub:after {
	content: "!";
	color: #772233;
	text-decoration: $underline;
}
END;
		}
		if ($wgUser->getOption('justify')) {
			$s .= "#article, #bodyContent { text-align: justify; }\n";
		}
		if (!$wgUser->getOption('showtoc')) {
			$s .= "#toc { display: none; }\n";
		}
		if (!$wgUser->getOption('editsection')) {
			$s .= ".editsection { display: none; }\n";
		}
		return $s;
	}
}