add basic print styles to CologneBlue
authorMatmaRex <matma.rex@gmail.com>
Sat, 6 Apr 2013 14:24:21 +0000 (16:24 +0200)
committerMatmaRex <matma.rex@gmail.com>
Sat, 6 Apr 2013 16:31:03 +0000 (18:31 +0200)
* Call parent method in setupSkinUserCss() to add standard print
  styles. It also adds mediawiki.legacy.shared, so we can remove
  explicit include of that one.
* Split #footer into #footer-navigation and #footer-info. These parts
  of footer have very different functions and the navigation should be
  hidden in print mode.
* Added skins/cologneblue/print.css hiding some non-standard
  navigation elements.

Bug: 42844
Change-Id: Iae67a06ff3a6efdc9a5084226c1c80634b806cfb

resources/Resources.php
skins/CologneBlue.php
skins/cologneblue/print.css [new file with mode: 0644]

index 0db3e20..61b8820 100644 (file)
@@ -61,7 +61,10 @@ return array(
         * See Vector for an example.
         */
        'skins.cologneblue' => array(
-               'styles' => array( 'cologneblue/screen.css' => array( 'media' => 'screen' ) ),
+               'styles' => array(
+                       'cologneblue/screen.css' => array( 'media' => 'screen' ),
+                       'cologneblue/print.css' => array( 'media' => 'print' ),
+               ),
                'remoteBasePath' => $GLOBALS['wgStylePath'],
                'localBasePath' => $GLOBALS['wgStyleDirectory'],
        ),
index 21b07f7..8b2bbb8 100644 (file)
@@ -39,7 +39,7 @@ class SkinCologneBlue extends SkinTemplate {
         * @param $out OutputPage
         */
        function setupSkinUserCss( OutputPage $out ) {
-               $out->addModuleStyles( 'mediawiki.legacy.shared' );
+               parent::setupSkinUserCss( $out );
                $out->addModuleStyles( 'mediawiki.legacy.oldshared' );
                $out->addModuleStyles( 'skins.cologneblue' );
        }
@@ -316,7 +316,8 @@ class CologneBlueTemplate extends BaseTemplate {
                ob_start();
 ?>
        </div>
-       <div id="footer" role="contentinfo">
+       <div id="footer">
+               <div id="footer-navigation" role="navigation">
 <?php
                // Page-related links
                echo $this->bottomLinks();
@@ -328,8 +329,10 @@ class CologneBlueTemplate extends BaseTemplate {
                        $this->getSkin()->aboutLink(),
                        $this->searchForm( 'footer' )
                ) );
-               echo "\n<br />";
-
+?>
+               </div>
+               <div id="footer-info" role="contentinfo">
+<?php
                // Standard footer info
                $footlinks = $this->getFooterLinks();
                if ( $footlinks['info'] ) {
@@ -338,6 +341,7 @@ class CologneBlueTemplate extends BaseTemplate {
                        }
                }
 ?>
+               </div>
        </div>
 </div>
 <div id="mw-navigation">
diff --git a/skins/cologneblue/print.css b/skins/cologneblue/print.css
new file mode 100644 (file)
index 0000000..d4b0551
--- /dev/null
@@ -0,0 +1,6 @@
+#sitetitle,
+#sitesub,
+#titlelinks,
+#footer-navigation {
+       display: none;
+}