MediaWiki:Centralnotice-template-Election2013 winners

From Meta, a Wikimedia project coordination wiki

<style type="text/css">

  1. centralNotice.collapsed #election2013 {
display: none;

}

  1. election2013 {
position: relative;
overflow: hidden;
background-image:url('//upload.wikimedia.org/wikipedia/commons/0/0d/Gray-gradient1.png');
background-repeat: repeat-x;
margin-bottom: 0.5em !important;
background-color:#FFFFFF;
border: solid 1px #aaaaaa; 
height:73px;
cursor: pointer;

}

  1. election2013-logo {
position: absolute;
top: 8px;
left: 25px;
background-image: url(//upload.wikimedia.org/wikipedia/commons/thumb/1/12/Wikimedia_logo_text_RGB.svg/60px-Wikimedia_logo_text_RGB.svg.png);
height: 60px;
width: 60px;
background-repeat: no-repeat;

}

  1. election2013-text {
font-size: 1em;
font-weight: bold;
color: #333;
padding: 10px 30px 10px 73px;
line-height: 1.3em;
text-align: center;

}

  1. election2013-text3 {
color: #006699;
display: block;

}

  1. election2013-text3:hover {
text-decoration: underline;

}

  1. election2013 a#cn-toggle-box {
position: absolute;
z-index: 98;
top: 2px;
right: 6px;
height: 30px;
width: 30px;

}

  1. election2013 .trans-box {
text-align: right;
font-size: 0.8em;
padding-right: 6px;
white-space: nowrap;

} .rtl #election2013-logo {

   left: auto;
   right: 25px;

} .rtl #election2013 div#cn-toggle-box {

   right: auto;
   left: 6px;

} .rtl #election2013 .trans-box {

   padding-right: 0;
   padding-left: 6px;

}

</style>

<script type="text/javascript"> jQuery(document).ready (function() {

 //CSS workaround for some rtl languages (probably bad CSS, feel free to replace)
 //Note: That wont work in the preview on meta, but it does on live projects ;)
 if(document.getElementById('mw-js-message')) {
   if(document.getElementById('mw-js-message').dir == 'rtl') {
     mw.util.addCSS('#election2013 div#cn-toggle-box { left: 6px !important; right: auto !important; }');
     mw.util.addCSS('#election2013-logo { left: auto !important; right: 25px !important; }');
   }
 }

}); </script>

 <a id="cn-toggle-box" href="#" title="Close" onclick="hideBanner();return false;">
   <img border="0" src="//upload.wikimedia.org/wikipedia/foundation/2/20/CloseWindow19x19.png" alt="Close" />
 </a>
{{{message}}}
   <a id="election2013-text3">{{{readmore-text}}}</a>
   <a href="//meta.wikimedia.org/w/index.php?title=Special:Translate&group=Centralnotice-tgroup-Election2013_winners&filter=" class="black-text2">

[ Help with translations! ]

   </a>

<script type="text/javascript"> jQuery(document).ready (function() {

 // Two things happen here
 // a) Create a link to a page on meta if a whitelisted language exists
 // b) Make any click on the banner text go to that link
 var langs = ['aa', 'de', 'es', 'fi', 'fr', 'it', 'pl', 'pt', 'zh'
   ],
   url = 'https://meta.wikimedia.org/wiki/Wikimedia_Foundation_elections_2013/Results',
   userlang = mw.config.get( 'wgUserLanguage' );
 
 if ( $.inArray( userlang, langs ) !== -1 ) {
   url = url.concat('/', userlang, '?uselang=', userlang);
 } else {
   url = url.concat('?uselang=', userlang);
 }
 $('#election2013-text3').attr('href', url);
 
 $('#election2013-text').click(function(){
   window.location = url;
 });

}); </script>