MediaWiki:Centralnotice-template-WMDE editor campaign summer 2017 b static
Appearance
<style>
- {{{banner}}}-container {
position: absolute; width: 100%; background-color: #a4f2d4; text-align: center; box-shadow: 0 3px 5px rgba(0, 0, 0, 0.5); overflow: hidden;
}
.{{{banner}}}-inner {
width: 1400px; margin: 0 auto; display: block;
}
- {{{banner}}}-container img {
float: left;
}
.{{{banner}}}-close {
position: absolute; right: 0.5em; top: 0.5em;
}
- {{{banner}}}-close-tracking {
display: none;
}
</style>
<script> $( document ).ready( function () {
addBannerSpace(); $( 'body' ).prepend( $( '#centralNotice' ) );
$( '.{{{banner}}}-close' ).click( function () { if ( Math.random() < 0.01 ) { $( '#{{{banner}}}-close-tracking' ).attr( 'src', 'https://tracking.wikimedia.de/piwik/piwik.php?idsite=1&url=https://spenden.wikimedia.de/banner-closed/{{{banner}}}&rec=1' ); }
$( '#{{{banner}}}-container' ).hide(); removeBannerSpace();
return false; } );
$( '#ca-ve-edit, .mw-editsection-visualeditor' ).click( function () { $( '#{{{banner}}}-container' ).hide(); removeBannerSpace(); } );
} );
function addBannerSpace() {
var bannerHeight = 235; switch( mw.config.get( 'skin' ) ) { case 'vector': $( '#mw-panel' ).css( 'top', bannerHeight + 160 ); $( '#mw-head' ).css( 'top', bannerHeight ); $( '#mw-page-base' ).css( 'padding-top', bannerHeight ); break; case 'monobook': $( '#globalWrapper' ).css( 'position', 'relative' ); $( '#globalWrapper' ).css( 'top', bannerHeight ); $( '#{{{banner}}}' ).css( 'top', '-20px' ); $( '#{{{banner}}}' ).css( 'background', 'none' ); break; }
}
function removeBannerSpace() {
switch ( mw.config.get( 'skin' ) ) { case 'vector': $( '#mw-panel' ).css( 'top', 160 ); $( '#mw-head' ).css( 'top', 0 ); $( '#mw-page-base' ).css( 'padding-top', 0 ); break; case 'monobook': $( '#globalWrapper' ).css( 'position', 'relative' ); $( '#globalWrapper' ).css( 'top', 0 ); break; }
} </script>