Commit | Line | Data |
---|---|---|
64a19c3d ML |
1 | <?php |
2 | /** | |
3 | * See docs/skin.txt | |
4 | * | |
5 | * @todo document | |
6 | * @file | |
7 | * @ingroup Skins | |
8 | */ | |
9 | ||
10 | if( !defined( 'MEDIAWIKI' ) ) | |
11 | die( -1 ); | |
12 | ||
13 | /** */ | |
14 | require_once( dirname(__FILE__) . '/MonoBook.php' ); | |
15 | ||
16 | /** | |
17 | * @todo document | |
18 | * @ingroup Skins | |
19 | */ | |
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'; | |
26 | } | |
27 | ||
28 | function setupSkinUserCss( OutputPage $out ){ | |
29 | $out->addStyle( 'simple/main.css', 'screen' ); | |
30 | $out->addStyle( 'simple/rtl.css', '', '', 'rtl' ); | |
31 | ||
32 | } | |
33 | ||
34 | function reallyGenerateUserStylesheet() { | |
35 | global $wgUser; | |
36 | $s = ''; | |
37 | if (($undopt = $wgUser->getOption("underline")) != 2) { | |
38 | $underline = $undopt ? 'underline' : 'none'; | |
39 | $s .= "a { text-decoration: $underline; }\n"; | |
40 | } | |
41 | if ($wgUser->getOption('highlightbroken')) { | |
42 | $s .= "a.new, #quickbar a.new { text-decoration: line-through; }\n"; | |
43 | } else { | |
44 | $s .= <<<END | |
45 | a.new, #quickbar a.new, | |
46 | a.stub, #quickbar a.stub { | |
47 | color: inherit; | |
48 | text-decoration: inherit; | |
49 | } | |
50 | a.new:after, #quickbar a.new:after { | |
51 | content: "?"; | |
52 | color: #CC2200; | |
53 | text-decoration: $underline; | |
54 | } | |
55 | a.stub:after, #quickbar a.stub:after { | |
56 | content: "!"; | |
57 | color: #772233; | |
58 | text-decoration: $underline; | |
59 | } | |
60 | END; | |
61 | } | |
62 | if ($wgUser->getOption('justify')) { | |
63 | $s .= "#article, #bodyContent { text-align: justify; }\n"; | |
64 | } | |
65 | if (!$wgUser->getOption('showtoc')) { | |
66 | $s .= "#toc { display: none; }\n"; | |
67 | } | |
68 | if (!$wgUser->getOption('editsection')) { | |
69 | $s .= ".editsection { display: none; }\n"; | |
70 | } | |
71 | return $s; | |
72 | } | |
73 | } | |
74 | ||
75 |