Njw has submitted this change and it was merged.

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(-)

Approvals:
  Njw: Verified; Looks good to me, approved



diff --git a/Erudite.skin.php b/Erudite.skin.php
index 15b6145..2423f13 100644
--- 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 7439b57..df3ecf0 100644
--- a/assets/erudite.css
+++ b/assets/erudite.css
@@ -54,7 +54,7 @@
 a:active {color:#55f;}
 
 /* Header */
-#header-wrap {background:#333 url(images/stripes.png) repeat; 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: merged
Gerrit-Change-Id: If3ce941d4563108d279e077ab508c178ba629cda
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/skins/erudite
Gerrit-Branch: master
Gerrit-Owner: Njw <[email protected]>
Gerrit-Reviewer: Daniel Friesen <[email protected]>
Gerrit-Reviewer: Krinkle <[email protected]>
Gerrit-Reviewer: Matmarex <[email protected]>
Gerrit-Reviewer: Njw <[email protected]>
Gerrit-Reviewer: jenkins-bot

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

Reply via email to