Moved some things around to please Apple Dictionary... some more...
[lhc/web/wiklou.git] / skins / Simple.php
1 <?php
2 /**
3 * Simple: A lightweight skin with a simple white-background sidebar and no
4 * top bar.
5 *
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 * Inherit main code from SkinTemplate, set the CSS and template filter.
18 * @ingroup Skins
19 */
20 class SkinSimple extends SkinTemplate {
21 var $skinname = 'simple', $stylename = 'simple',
22 $template = 'MonoBookTemplate';
23
24 function setupSkinUserCss( OutputPage $out ){
25 $out->addStyle( 'simple/main.css', 'screen' );
26 $out->addStyle( 'simple/rtl.css', '', '', 'rtl' );
27 }
28
29 function reallyGenerateUserStylesheet() {
30 global $wgUser;
31 $s = '';
32 if( ( $undopt = $wgUser->getOption( 'underline' ) ) != 2 ) {
33 $underline = $undopt ? 'underline' : 'none';
34 $s .= "a { text-decoration: $underline; }\n";
35 }
36 if( $wgUser->getOption( 'highlightbroken' ) ) {
37 $s .= "a.new, #quickbar a.new { text-decoration: line-through; }\n";
38 } else {
39 $s .= <<<END
40 a.new, #quickbar a.new,
41 a.stub, #quickbar a.stub {
42 color: inherit;
43 text-decoration: inherit;
44 }
45 a.new:after, #quickbar a.new:after {
46 content: "?";
47 color: #CC2200;
48 text-decoration: $underline;
49 }
50 a.stub:after, #quickbar a.stub:after {
51 content: "!";
52 color: #772233;
53 text-decoration: $underline;
54 }
55 END;
56 }
57 if( $wgUser->getOption( 'justify' ) ) {
58 $s .= "#article, #bodyContent { text-align: justify; }\n";
59 }
60 if( !$wgUser->getOption( 'showtoc' ) ) {
61 $s .= "#toc { display: none; }\n";
62 }
63 if( !$wgUser->getOption( 'editsection' ) ) {
64 $s .= ".editsection { display: none; }\n";
65 }
66 return $s;
67 }
68 }