Njw has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/62604


Change subject: Allow custom banner image to be set using $wgEruditeBannerImg 
config option
......................................................................

Allow custom banner image to be set using $wgEruditeBannerImg config option

Change-Id: If3ce941d4563108d279e077ab508c178ba629cda
---
M Erudite.skin.php
M assets/erudite.css
2 files changed, 10 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/erudite 
refs/changes/04/62604/1

diff --git a/Erudite.skin.php b/Erudite.skin.php
index 15b6145..2423f13 100755
--- a/Erudite.skin.php
+++ b/Erudite.skin.php
@@ -54,6 +54,8 @@
         * outputs a formatted page.
         */
        public function execute() {
+               global $wgEruditeBannerImg;
+
                // suppress warnings to prevent notices about missing indexes 
in $this->data
                wfSuppressWarnings();
 
@@ -73,7 +75,13 @@
 <?php } ?>
 <div id="wrapper" class="hfeed">
        
-       <div id="header-wrap">
+       <?php
+               if ( isset( $wgEruditeBannerImg ) ) {
+                       echo '<div id="header-wrap" style="background-image: 
url(' . $wgEruditeBannerImg . ')">';
+               } else {
+                       echo '<div id="header-wrap">';
+               }
+       ?>
                <div id="header" role="banner">
                        <?php echo Html::element( 'img', array( 'id' => "logo", 
'src' => $this->data['logopath'], 'alt' => "" ) ); ?>
                        <h1 id="blog-title"><span><a href="<?php echo 
htmlspecialchars( $this->data['nav_urls']['mainpage']['href'] ) ?>" 
title="<?php $this->text( 'sitename' ); ?>" rel="home"><?php $this->text( 
'sitename' ); ?></a></span></h1>
diff --git a/assets/erudite.css b/assets/erudite.css
index 3a70a0d..753cbb3 100755
--- a/assets/erudite.css
+++ b/assets/erudite.css
@@ -49,7 +49,7 @@
 a:active {color:#55f;}
 
 /* Header */
-#header-wrap {background:#333 url(images/stripes.png) repeat; 
margin-bottom:2em; padding:1em 0;}
+#header-wrap {background-color:#333; background-repeat: repeat; 
background-image: url(images/stripes.png); margin-bottom:2em; padding:1em 0;}
 #header h1, #header h1 a {color:#fff; text-decoration:none; line-height:1; 
margin:0;}
 #blog-description {font-size:1.4em; color:#fff;}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If3ce941d4563108d279e077ab508c178ba629cda
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/erudite
Gerrit-Branch: master
Gerrit-Owner: Njw <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to