jenkins-bot has submitted this change and it was merged.

Change subject: Separated the main page specific CSS from the base module and 
moved it to a separate module which is loaded only on the main page.
......................................................................


Separated the main page specific CSS from the base module and moved it to
a separate module which is loaded only on the main page.

Change-Id: I7c3c29cb5dca6adfb1ac69de4c8510087df8448a
---
M BlueSky.php
M BlueSky.skin.php
M resources/css/home.css
3 files changed, 20 insertions(+), 8 deletions(-)

Approvals:
  Isarra: Verified; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/BlueSky.php b/BlueSky.php
index fbafc7e..9615fe6 100755
--- a/BlueSky.php
+++ b/BlueSky.php
@@ -53,7 +53,6 @@
                #'skins/common/commonContent.css' => array( 'media' => 'screen' 
),
                'skins/common/commonInterface.css' => array( 'media' => 
'screen' ),
                // Styles custom to this skin
-               'skins/BlueSky/resources/css/home.css' => array( 'media' => 
'screen' ),
                'skins/BlueSky/resources/css/nonarticle.css' => array( 'media' 
=> 'screen' ),
                'skins/BlueSky/resources/css/searchresults.css' => array( 
'media' => 'screen' ),
                'skins/BlueSky/resources/css/special.css' => array( 'media' => 
'screen' ),
@@ -63,6 +62,15 @@
        'position' => 'top'
 );
 
+// zzz prefix is a hack to ensure that this module is loaded after the main
+// skins.bluesky module
+$wgResourceModules['zzzskins.bluesky.mainpage'] = array(
+       'styles' => array(
+               'skins/BlueSky/resources/css/home.css' => array( 'media' => 
'screen' ),
+       ),
+       'position' => 'top'
+);
+
 $wgResourceModules['skins.bluesky.externallinks.123'] = array(
        'styles' => array(
                'skins/BlueSky/resources/css/externallinks-123.css' => array( 
'media' => 'screen' ),
diff --git a/BlueSky.skin.php b/BlueSky.skin.php
index 003d526..f496636 100755
--- a/BlueSky.skin.php
+++ b/BlueSky.skin.php
@@ -73,15 +73,19 @@
                } else {
                        $baseCSSmodules[] = 'skins.bluesky.externallinks.124';
                }
-               // Add base CSS (i.e. no themes or ugly hacks) via 
ResourceLoader
-               $out->addModuleStyles( $baseCSSmodules );
 
-               // Ugly LESS hacks
                $modules = array();
                $title = $this->getTitle();
                $request = $this->getRequest();
                $action = $request->getVal( 'action', 'view' );
 
+               if ( $title->isMainPage() ) {
+                       $baseCSSmodules[] = 'zzzskins.bluesky.mainpage';
+               }
+
+               // Add base CSS (i.e. no themes or ugly hacks) via 
ResourceLoader
+               $out->addModuleStyles( $baseCSSmodules );
+
                // Page action specific hacks
                switch ( $action ) {
                        case 'delete':
diff --git a/resources/css/home.css b/resources/css/home.css
index 1ff08c3..3d23cc5 100755
--- a/resources/css/home.css
+++ b/resources/css/home.css
@@ -1,11 +1,11 @@
-.page-Main_Page #intro,
-.page-Main_Page .wh_block {
+#intro,
+.wh_block {
        display: none;
 }
-.page-Main_Page #actionbar {
+#actionbar {
        height: 18px;
 }
-.page-Main_Page .minor_section {
+.minor_section {
        border: none;
        padding: 0;
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/154424
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I7c3c29cb5dca6adfb1ac69de4c8510087df8448a
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/skins/BlueSky
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix <j...@countervandalism.net>
Gerrit-Reviewer: Isarra <zhoris...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to