MediaWiki:Centralnotice-template-Leichte Sprache Banner iPad: Unterschied zwischen den Versionen

Aus Hurraki - Wörterbuch für Leichte Sprache
Wechseln zu: Navigation, Suche
Zeile 1: Zeile 1:
 
<style>
 
<style>
#centralNotice.collapsed .cn-banner {
+
#{{{banner}}}-container {
 +
    position: fixed;
 +
    z-index: 101;
 +
    width: 100%;
 +
    background-color: #ffffff;
 +
    text-align: center;
 +
    overflow: hidden;
 +
    height: 140px;
 +
    min-width: 320px;
 +
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.5);
 
     display: none;
 
     display: none;
 
}
 
}
  
.cn-banner {
+
.{{{banner}}}-inner {
     position: relative;
+
     color: #ff6706;
     overflow: hidden;
+
     height: 100%;
     margin-bottom: 1em;
+
     text-align: center;
    border: solid 1px #aaaaaa;
 
 
}
 
}
  
/* Mobile skin */
+
.{{{banner}}}-title {
body.skin-minerva .cn-banner {
+
    font-size: 2.0em;
     margin-bottom: 0;
+
    display: inline-block;
 +
    text-align: left;
 +
    vertical-align: top;
 +
     margin-top: 1em;
 +
    font-weight: bold;
 
}
 
}
  
.cn-banner a.cn-full-banner-click {
+
.{{{banner}}}-image {
     display: block;
+
    background-image: url( "//upload.wikimedia.org/wikipedia/commons/1/15/1200-WIKI-Banner-orange-image.png" );
     height: 100%;
+
    background-color: #ffffff;
     width: 100%;
+
    background-position: center center;
     cursor: pointer;
+
    background-repeat: no-repeat;
 +
     display: inline-block;
 +
     vertical-align: top;
 +
     width: 199px;
 +
    height: 140px;
 +
     margin: 0 2em;
 
}
 
}
.cn-banner a:hover {
+
 
     text-decoration: none;
+
.{{{banner}}}-button {
 +
    background-color: #ffffff;
 +
    padding: 2px;
 +
    display: inline-block;
 +
    border: 1px solid #ff6706;
 +
    border-radius: 5px;
 +
    vertical-align: top;
 +
    margin-top: 2.4em;
 +
     text-align: left;
 
}
 
}
  
.cn-banner-content {
+
.{{{banner}}}-button::before {
     display: table;
+
     content: "→";
     box-sizing: border-box;
+
     margin-left: 0.65em;
     padding: 8px 30px 8px 8px;
+
     vertical-align: 100%;
    width: 100%;
 
 
}
 
}
body.rtl .cn-banner-content {
+
 
     padding: 8px 8px 8px 30px;
+
.{{{banner}}}-button-inner {
 +
    font-weight: bold;
 +
    background-color: #ffffff;
 +
    color: #ff6706;
 +
     padding: 0.65em 0.65em 0.65em 0.1em;
 +
    display: inline-block;
 
}
 
}
  
.cn-banner-logo img {
+
.{{{banner}}}-close {
    vertical-align: middle;
+
  position: absolute;
    height: 90px;
+
  right: 0.5em;
    width: 728px;
+
  top: 0.5em;
 
}
 
}
  
@media (min-width: 541px) {
+
#{{{banner}}}-close-tracking {
    .cn-banner-logo img {
+
    display: none;
        height: 90px;
 
        width: 728px;
 
    }
 
 
}
 
}
  
.cn-banner-text {
+
.{{{banner}}}-button-link,
    font-size: .9em;
+
.{{{banner}}}-button-link:hover,
    color: black;
+
.{{{banner}}}-button-link:visited {
    font-weight: bold;
+
     color: #ffffff;
     line-height: 1.4em;
+
     text-decoration: none;
     text-align: center;
 
 
}
 
}
  
@media (min-width: 728px) {
+
@media (max-width: 599px) {
     .cn-banner-text {
+
    #{{{banner}}}-container {
         font-size: 1em;
+
        height: 102px;
 +
    }
 +
 
 +
     .{{{banner}}}-inner {
 +
         padding-top: .3em;
 
     }
 
     }
     .cn-banner-text span {
+
 
 +
     .{{{banner}}}-title {
 +
        font-size: 1.1em;
 +
        padding-top: 0;
 
         display: block;
 
         display: block;
 +
        margin: 0 0 0.1em 1em;
 +
    }
 +
 +
    .{{{banner}}}-image {
 +
        background: url("//upload.wikimedia.org/wikipedia/commons/7/71/320-WIKI-Banner-orange-image.png");
 +
        position: absolute;
 +
        width: 105px;
 +
        height: 99px;
 +
        top: 7px;
 +
        right: -32px;
 +
        z-index: -1;
 +
    }
 +
 +
    .{{{banner}}}-button {
 +
        margin: 0 0 0 1.6em;
 +
        float: left;
 +
        font-size: .7em;
 
     }
 
     }
 
}
 
}
@media (min-width: 737px) {
+
 
     .cn-banner-text {
+
@media (min-width: 600px) and (max-width: 699px) {
         font-size: 1.1em;
+
    #{{{banner}}}-container {
 +
        height: 120px;
 +
    }
 +
 
 +
     .{{{banner}}}-title {
 +
         font-size: 1.2em;
 +
        margin-top: 2.2em;
 +
    }
 +
 
 +
    .{{{banner}}}-image {
 +
        background-image: url( "//upload.wikimedia.org/wikipedia/commons/3/35/600-WIKI-Banner-orange-image.png" );
 +
        width: 174px;
 +
        height: 120px;
 +
        margin: 0 0.1em;
 +
    }
 +
 
 +
    .{{{banner}}}-button {
 +
        font-size: 0.9em;
 +
        margin-top: 2.6em;
 
     }
 
     }
 +
 
}
 
}
  
.cn-banner .cn-banner-content:hover {
+
@media (min-width: 700px) and (max-width: 899px) {
     text-decoration: underline;
+
     #{{{banner}}}-container {
}
+
        height: 120px;
 +
    }
  
#cn-toggle-box {
+
    .{{{banner}}}-title {
    position: absolute;
+
        font-size: 1.3em;
    z-index: 98;
+
        margin-top: 1.6em;
    top: 0;
+
     }
    right: 0;
 
    opacity: .8;
 
}
 
body.rtl #cn-toggle-box {
 
     left: 0;
 
    right: auto;
 
}
 
  
#cn-toggle-box:hover {
+
    .{{{banner}}}-image {
    opacity: 1;
+
        background-image: url( "//upload.wikimedia.org/wikipedia/commons/3/35/600-WIKI-Banner-orange-image.png" );
}
+
        width: 174px;
 +
        height: 120px;
 +
    }
  
#cn-toggle-box img {
+
    .{{{banner}}}-button {
    padding: 6px;
+
        margin-top: 1.8em;
 +
    }
 
}
 
}
  
#cn-banner-translate-link {
+
@media (max-width: 1199px) {
     /* Change to display: none; if you don't need translations */
+
     .{{{banner}}}-inner {
    display: block;
+
        margin: 0 auto;
    position: absolute;
+
        width: 100%;
    z-index: 98;
+
     }
    bottom: 6px;
 
    right: 6px;
 
    font-size: 0.9em;
 
    white-space: nowrap;
 
     text-align: right;
 
}
 
#cn-banner-translate-link:hover {
 
    text-decoration: underline;
 
 
}
 
}
  
body.rtl #cn-banner-translate-link {
+
.skin-monobook .{{{banner}}}-inner {
     left: 6px;
+
     font-size: 140%;
    right: auto;
 
    text-align: left;
 
 
}
 
}
  
/* Translate extension doesn't work well on mobile */
 
body.skin-minerva #cn-banner-translate-link {
 
    display: none;
 
}
 
 
</style>
 
</style>
  
<div class="cn-banner" id="{{{banner}}}" style="display: none;">
+
<div id="{{{banner}}}-container">
     <a class="cn-full-banner-click cn-banner-link" href="https://de.wikipedia.org/wiki/Wikipedia:WikiDACH/2017">
+
    <div class="{{{banner}}}-close">
         <div class="cn-banner-content">
+
        <a href="#" title="Close"><div class="cn-closeButton">Close</div></a>
             <div class="cn-banner-logo">
+
    </div>
                 <img src="https://upload.wikimedia.org/wikipedia/commons/2/2e/BarCamp_WikiDACH_2017_Banner.png">
+
 
 +
     <a class="{{{banner}}}-button-link" href="https://de.wikipedia.org/wiki/Spezial:Benutzerkonto_anlegen?campaign=wmde_abc2017_gib_rg">
 +
         <div class="{{{banner}}}-inner">
 +
            <div class="{{{banner}}}-title">Du kannst dich an<br>Wikipedia beteiligen!</div>
 +
             <div class="{{{banner}}}-image"></div>
 +
            <div class="{{{banner}}}-button">
 +
                 <div class="{{{banner}}}-button-inner">
 +
                    Lege dir dein<br>Benutzerkonto an
 +
                </div>
 
             </div>
 
             </div>
 
         </div>
 
         </div>
 
     </a>
 
     </a>
 
+
     <img id="{{{banner}}}-close-tracking" src="" border="0" width="0" height="0" />
     <div id="cn-toggle-box">
 
        <a href="#" title="{{int:centralnotice-close-title}}" onclick="mw.centralNotice.hideBanner(); return false;"><img src="//upload.wikimedia.org/wikipedia/foundation/2/20/CloseWindow19x19.png" alt="{{int:centralnotice-close-title}}" /></a>
 
    </div>
 
 
 
 
</div>
 
</div>
  
 
<script>
 
<script>
$(document).ready(function() {
+
$( document ).ready( function () {
  
    /* Show banner */
+
  if ( wgPageName !== 'Wikipedia:Wikimedia_Deutschland/JetztMitmachen' && wgPageName !== 'Wikipedia:Wikimedia_Deutschland/Mach_mit' ) {
     if (!mw.centralNotice.bannerData.hideResult) {
+
    addBannerSpace();
        $('.cn-banner').show();
+
     $( 'body' ).prepend( $( '#centralNotice' ) );
 +
    $( '#{{{banner}}}-container' ).show();
 +
  } else {
 +
    mw.centralNotice.setBannerLoadedButHidden();
 +
  }
 +
 
 +
  $( '.{{{banner}}}-close' ).click( function () {
 +
    if ( Math.random() < 0.01 ) {
 +
      $( '#{{{banner}}}-close-tracking' ).attr( 'src', 'https://tracking.wikimedia.de/piwik.php?idsite=1&url=https://spenden.wikimedia.de/banner-closed/{{{banner}}}&rec=1' );
 
     }
 
     }
  
});
+
    $( '#{{{banner}}}-container' ).hide();
 +
    removeBannerSpace();
 +
    mw.centralNotice.hideBanner();
 +
 
 +
    return false;
 +
  } );
 +
 
 +
  $( '#ca-ve-edit, .mw-editsection-visualeditor' ).click( function () {
 +
    $( '#{{{banner}}}-container' ).hide();
 +
    removeBannerSpace();
 +
  } );
 +
} );
 +
 
 +
function addBannerSpace() {
 +
  var bannerHeight = $( '#{{{banner}}}-container' ).height() + 20;
 +
  switch( mw.config.get( 'skin' ) ) {
 +
    case 'vector':
 +
      $( '#mw-panel' ).css( 'top', bannerHeight );
 +
      $( '#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', 0 );
 +
      $( '#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>
 
</script>

Version vom 10. September 2018, 16:13 Uhr

<style>

  1. {{{banner}}}-container {
   position: fixed;
   z-index: 101;
   width: 100%;
   background-color: #ffffff;
   text-align: center;
   overflow: hidden;
   height: 140px;
   min-width: 320px;
   box-shadow: 0 3px 5px rgba(0, 0, 0, 0.5);
   display: none;

}

.{{{banner}}}-inner {

   color: #ff6706;
   height: 100%;
   text-align: center;

}

.{{{banner}}}-title {

   font-size: 2.0em;
   display: inline-block;
   text-align: left;
   vertical-align: top;
   margin-top: 1em;
   font-weight: bold;

}

.{{{banner}}}-image {

   background-image: url( "//upload.wikimedia.org/wikipedia/commons/1/15/1200-WIKI-Banner-orange-image.png" );
   background-color: #ffffff;
   background-position: center center;
   background-repeat: no-repeat;
   display: inline-block;
   vertical-align: top;
   width: 199px;
   height: 140px;
   margin: 0 2em;

}

.{{{banner}}}-button {

   background-color: #ffffff;
   padding: 2px;
   display: inline-block;
   border: 1px solid #ff6706;
   border-radius: 5px;
   vertical-align: top;
   margin-top: 2.4em;
   text-align: left;

}

.{{{banner}}}-button::before {

   content: "→";
   margin-left: 0.65em;
   vertical-align: 100%;

}

.{{{banner}}}-button-inner {

   font-weight: bold;
   background-color: #ffffff;
   color: #ff6706;
   padding: 0.65em 0.65em 0.65em 0.1em;
   display: inline-block;

}

.{{{banner}}}-close {

 position: absolute;
 right: 0.5em;
 top: 0.5em;

}

  1. {{{banner}}}-close-tracking {
   display: none;

}

.{{{banner}}}-button-link, .{{{banner}}}-button-link:hover, .{{{banner}}}-button-link:visited {

   color: #ffffff;
   text-decoration: none;

}

@media (max-width: 599px) {

   #{{{banner}}}-container {
       height: 102px;
   }
   .{{{banner}}}-inner {
       padding-top: .3em;
   }
   .{{{banner}}}-title {
       font-size: 1.1em;
       padding-top: 0;
       display: block;
       margin: 0 0 0.1em 1em;
   }
   .{{{banner}}}-image {
       background: url("//upload.wikimedia.org/wikipedia/commons/7/71/320-WIKI-Banner-orange-image.png");
       position: absolute;
       width: 105px;
       height: 99px;
       top: 7px;
       right: -32px;
       z-index: -1;
   }
   .{{{banner}}}-button {
       margin: 0 0 0 1.6em;
       float: left;
       font-size: .7em;
   }

}

@media (min-width: 600px) and (max-width: 699px) {

   #{{{banner}}}-container {
       height: 120px;
   }
   .{{{banner}}}-title {
       font-size: 1.2em;
       margin-top: 2.2em;
   }
   .{{{banner}}}-image {
       background-image: url( "//upload.wikimedia.org/wikipedia/commons/3/35/600-WIKI-Banner-orange-image.png" );
       width: 174px;
       height: 120px;
       margin: 0 0.1em;
   }
   .{{{banner}}}-button {
       font-size: 0.9em;
       margin-top: 2.6em;
   }

}

@media (min-width: 700px) and (max-width: 899px) {

   #{{{banner}}}-container {
       height: 120px;
   }
   .{{{banner}}}-title {
       font-size: 1.3em;
       margin-top: 1.6em;
   }
   .{{{banner}}}-image {
       background-image: url( "//upload.wikimedia.org/wikipedia/commons/3/35/600-WIKI-Banner-orange-image.png" );
       width: 174px;
       height: 120px;
   }
   .{{{banner}}}-button {
       margin-top: 1.8em;
   }

}

@media (max-width: 1199px) {

   .{{{banner}}}-inner {
       margin: 0 auto;
       width: 100%;
   }

}

.skin-monobook .{{{banner}}}-inner {

   font-size: 140%;

}

</style>

<a href="#" title="Close">
Close
</a>
   <a class="{{{banner}}}-button-link" href="https://de.wikipedia.org/wiki/Spezial:Benutzerkonto_anlegen?campaign=wmde_abc2017_gib_rg">
Du kannst dich an
Wikipedia beteiligen!
                   Lege dir dein
Benutzerkonto an
   </a>
   

<script> $( document ).ready( function () {

 if ( wgPageName !== 'Wikipedia:Wikimedia_Deutschland/JetztMitmachen' && wgPageName !== 'Wikipedia:Wikimedia_Deutschland/Mach_mit' ) {
   addBannerSpace();
   $( 'body' ).prepend( $( '#centralNotice' ) );
   $( '#{{{banner}}}-container' ).show();
 } else {
   mw.centralNotice.setBannerLoadedButHidden();
 }
 $( '.{{{banner}}}-close' ).click( function () {
   if ( Math.random() < 0.01 ) {
     $( '#{{{banner}}}-close-tracking' ).attr( 'src', 'https://tracking.wikimedia.de/piwik.php?idsite=1&url=https://spenden.wikimedia.de/banner-closed/{{{banner}}}&rec=1' );
   }
   $( '#{{{banner}}}-container' ).hide();
   removeBannerSpace();
   mw.centralNotice.hideBanner();
   return false;
 } );
 $( '#ca-ve-edit, .mw-editsection-visualeditor' ).click( function () {
   $( '#{{{banner}}}-container' ).hide();
   removeBannerSpace();
 } );

} );

function addBannerSpace() {

 var bannerHeight = $( '#{{{banner}}}-container' ).height() + 20;
 switch( mw.config.get( 'skin' ) ) {
   case 'vector':
     $( '#mw-panel' ).css( 'top', bannerHeight );
     $( '#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', 0 );
     $( '#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>