User:Seddon (WMF)/editcheck: Difference between revisions
Seddon (WMF) (talk | contribs) Created page with "{{MediaWiki:Centralnotice-shared-common-style-2011}} {{MediaWiki:Centralnotice-shared-button-2011}} <style type="text/css"> #centralNotice.collapsed #{{{utm-banner}}}{ disp..." |
m Pcoombe moved page User:Jseddon/editcheck to User:Seddon (WMF)/editcheck: Automatically moved page while renaming the user "Jseddon" to "Seddon (WMF)" |
||
(6 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
{{MediaWiki:Centralnotice-shared-common-style-2011}} |
{{MediaWiki:Centralnotice-shared-common-style-2011}} |
||
{{MediaWiki:Centralnotice-shared-button-2011}} |
{{MediaWiki:Centralnotice-shared-button-2011}} |
||
<style type="text/css"> |
<style type="text/css"> |
||
#centralNotice.collapsed #{{{utm-banner}}}{ |
#centralNotice.collapsed #{{{utm-banner}}}{ |
||
display: none; |
display: none; |
||
} |
|||
#{{{utm-banner}}} .cn-bottom-right-float { |
|||
position: relative !important; |
|||
} |
} |
||
#{{{utm-banner}}} { |
#{{{utm-banner}}} { |
||
position: relative; |
|||
background-image: url({{{image-url}}}); |
background-image: url({{{image-url}}}); |
||
background-position: bottom right; |
|||
background-repeat: no-repeat; |
background-repeat: no-repeat; |
||
display: none; // defaulting to none, setting visible when the margins are added as fail-safe and no-go-nuts-safe |
|||
margin-bottom: 0.5em !important; |
|||
position: relative; |
|||
background-color:#FFFFFF; |
|||
background-color: #CCE7CD; |
|||
border: solid 1px silver; |
|||
border: none; |
|||
height:100px; |
|||
overflow: hidden; |
overflow: hidden; |
||
} |
|||
body.ltr #{{{utm-banner}}} { |
|||
background-position: 0px 0px; |
|||
} |
|||
body.rtl #{{{utm-banner}}} { |
|||
background-position: 100% 0%; |
|||
} |
} |
||
Line 36: | Line 36: | ||
} |
} |
||
#cn-blue { |
|||
/* Bigger bold, blue text */ |
|||
color: blue; |
|||
#{{{utm-banner}}} #cn-bold-blue-text { |
|||
font-size: 2.25em; |
|||
font-weight: bold; |
|||
font-family: Helvetica, Arial, sans-serif; |
|||
color: navy; |
|||
padding: 0.8em 120px 0.2em 175px; |
|||
line-height: 1em; |
|||
text-align:center; |
|||
} |
} |
||
#cn-blue-underline { |
|||
#{{{utm-banner}}} #thermo-caption { |
|||
text-decoration: underline; |
|||
font-weight: bold; |
|||
font-family: Helvetica, Arial, sans-serif; |
|||
color: navy; |
|||
padding: 0; |
|||
line-height: 1.5em; |
|||
text-align:center; |
|||
margin: 0 0 0 75px; |
|||
} |
} |
||
#inlineblue { |
|||
<!-- start of Thermometer styles --> |
|||
text-decoration: underline; |
|||
color: blue; |
|||
} |
|||
/* Bigger bold, blue text */ |
|||
#{{{utm-banner}}} #thermometer-wrapper { |
|||
#{{{utm-banner}}} #cn-bold-blue-text { |
|||
position: relative; |
|||
font-size: 1em; |
|||
color: #111111; |
|||
padding: 1em; |
|||
line-height: 1em; |
|||
text-align:left; |
|||
text-direction:{{int:Centralnotice-2011translations-dir}}; |
|||
padding-bottom: 1.5em; |
|||
padding-top: 0.5em; |
|||
height: 100px; |
|||
} |
} |
||
#{{{utm-banner}}} #notice-thermometer, #{{{utm-banner}}} #notice-thermometer-daily { |
|||
body.ltr #{{{utm-banner}}} #cn-bold-blue-text{ |
|||
position: relative; |
|||
padding-right: 20px; |
|||
width: 800px; |
|||
margin: 0.75em 0.75em 0.25em 180px; |
|||
} |
} |
||
body.rtl #{{{utm-banner}}} #cn-bold-blue-text{ |
|||
padding-left: 20px; |
|||
background-image: url(//upload.wikimedia.org/wikipedia/foundation/3/3d/Fundraising-2010-thermometer2.png); |
|||
background-position: left top; |
|||
width: 10px; |
|||
height: 21px; |
|||
} |
} |
||
#{{{utm-banner}}} #notice-thermometer-base, #{{{utm-banner}}} #notice-thermometer-daily-base { |
|||
.banner-column{ |
|||
padding: 0.5em; |
|||
padding-right: 1em; |
|||
padding-left: 1em; |
|||
max-width: 28%; |
|||
float: left; |
float: left; |
||
background-image: url(//upload.wikimedia.org/wikipedia/foundation/3/3d/Fundraising-2010-thermometer2.png); |
|||
background-position: left 63px; |
|||
height: 21px; |
|||
color: #3474b5; |
|||
font-weight: bold; |
|||
text-align: right; |
|||
line-height: 23px; |
|||
overflow: hidden; |
|||
} |
} |
||
#{{{utm-banner}}} #notice-thermometer-togo, #{{{utm-banner}}} #notice-thermometer-daily-togo { |
|||
float: left; |
|||
height: 21px; |
|||
font-weight: bold; |
|||
line-height: 23px; |
|||
overflow: hidden; |
|||
margin-left: 1em; |
|||
} |
|||
#{{{utm-banner}}} #notice-thermometer-end, #{{{utm-banner}}} #notice-thermometer-daily-end { |
|||
float: left; |
|||
background-image: url(//upload.wikimedia.org/wikipedia/foundation/3/3d/Fundraising-2010-thermometer2.png); |
|||
background-position: right -63px; |
|||
width: 10px; |
|||
height: 21px; |
|||
} |
|||
#{{{utm-banner}}} #notice-thermometer-mercury, #{{{utm-banner}}} #notice-thermometer-daily-mercury { |
|||
position: absolute; |
|||
left: 10px; |
|||
height: 21px; |
|||
} |
|||
#{{{utm-banner}}} #notice-thermometer-fill, #{{{utm-banner}}} #notice-thermometer-daily-fill { |
|||
float: left; |
|||
background-image: url(//upload.wikimedia.org/wikipedia/foundation/3/3d/Fundraising-2010-thermometer2.png); |
|||
background-position: left -21px; |
|||
height: 21px; |
|||
color: #E8E8E8; |
|||
font-weight: bold; |
|||
text-align: right; |
|||
line-height: 23px; |
|||
overflow: hidden; |
|||
} |
|||
#{{{utm-banner}}} #notice-thermometer-arrow, #{{{utm-banner}}} #notice-thermometer-daily-arrow { |
|||
float: left; |
|||
background-image: url(//upload.wikimedia.org/wikipedia/foundation/d/d6/2010-thermometer2-transition.png); |
|||
height: 21px; |
|||
width: 23px; |
|||
} |
|||
#{{{utm-banner}}} #notice-thermometer-recieve, #{{{utm-banner}}} #notice-thermometer-daily-recieve { |
|||
float: left; |
|||
//background-image: url(//upload.wikimedia.org/wikipedia/foundation/d/d6/2010-thermometer2-transition.png); |
|||
background-color: #CCCCCC; |
|||
//background-position: right bottom; |
|||
height: 21px; |
|||
width: 23px; |
|||
} |
|||
<!-- end of Thermometer styles --> |
|||
</style> |
</style> |
||
Line 143: | Line 81: | ||
<script type="text/javascript"> |
<script type="text/javascript"> |
||
var countrySpecific = { {{Template:2011FR/ |
var countrySpecific = { {{Template:2011FR/Multicurrency2}} }; |
||
function getCountryValue(ii) |
function getCountryValue(ii) |
||
{ |
{ |
||
return countrySpecific[Geo.country][ii]; |
|||
} |
|||
return countrySpecific['XX'][ii]; |
|||
else |
|||
return countrySpecific[Geo.country][ii]; |
|||
} |
|||
</script> |
</script> |
||
Line 157: | Line 92: | ||
<div id="{{{utm-banner}}}"> |
<div id="{{{utm-banner}}}"> |
||
<a id="variable_lp" href="#"> |
<a id="variable_lp" href="#"> |
||
<div id="cn-bold-blue-text"> |
|||
<div |
<div class="banner-column"> |
||
< |
<li>{{{text-1}}} |
||
</div> |
|||
<span id="text-line-1">{{{text-2}}}</span><br /> |
|||
< |
<div class="banner-column"> |
||
<li>{{{text-2}}} |
|||
</div> |
|||
</div> |
|||
<div id="thermometer-wrapper"> |
|||
<div |
<div class="banner-column"> |
||
<li>{{{text-3}}} |
|||
<div id="notice-thermometer-start"></div> |
|||
<div style="width: 450px;" id="notice-thermometer-base"></div> |
|||
<!-- <div id="notice-thermometer-recieve"></div> --> |
|||
<div id="notice-thermometer-end"></div> |
|||
<div id="notice-thermometer-mercury"> |
|||
<div style="width: 60px;" id="notice-thermometer-fill">€{{MediaWiki:Centralnotice-shared-2011-fundraising-value}}M raised</div> |
|||
<div id="notice-thermometer-arrow"></div> |
|||
</div> |
</div> |
||
<div id="notice-thermometer-togo">{{MediaWiki:Centralnotice-shared-2011-fundraising-left}}M left</div> |
|||
</div> |
</div> |
||
<span id="thermo-caption">{{{caption}}}</span> |
|||
</div> |
|||
<div class="cn-bottom-right-float"> |
|||
<div id="notice-button-2011-start"></div> |
|||
<div id="notice-button-2011-label">{{int:Centralnotice-2011translations-read-now}}</div> |
|||
<!-- <div id="notice-button-2011-label"></div> --> |
|||
<div id="notice-button-2011-end"></div> |
|||
</div> |
|||
</a> |
</a> |
||
<div id="cn-close-box"> |
|||
<a href="#" title="Close" onclick="removeBannerSpace(); hideBanner();return false;"><img border="0" src="//bits.wikimedia.org/skins/common/images/closewindow19x19.png" alt="Close" /></a> |
|||
<div id="cn-toggle-box"> |
|||
</div> |
|||
<a href="#" onclick="hideBanner();return false;"><img border="0" src="//bits.wikimedia.org/skins-1.17/common/images/closewindow.png" alt="Close" /></a> |
|||
</div> |
|||
</div> |
</div> |
||
<script type="text/javascript"> |
<script type="text/javascript"> |
||
function addBannerSpace() |
|||
{ |
|||
$('#mw-panel').css('top', '260px'); |
|||
$('#mw-head').css('top', '100px'); |
|||
$('#{{{utm-banner}}}').css('display', 'block'); |
|||
} |
|||
function removeBannerSpace() |
|||
{ |
|||
$('#mw-panel').css('top', '160px'); |
|||
$('#mw-head').css('top', '0px'); |
|||
} |
|||
$('body').prepend($('#centralNotice')); |
|||
var bannerChooseRandom = function(choiceString) { |
|||
var choices = choiceString.split(','); |
|||
if ( choices.length ) { |
|||
return choices[Math.floor( Math.random() * choices.length )].replace(/^\s+|\s+$/, ''); |
|||
} |
|||
} |
|||
var bannerRewriteUrl = function() { |
var bannerRewriteUrl = function() { |
||
Line 208: | Line 149: | ||
'utm_medium' : 'sitenotice', |
'utm_medium' : 'sitenotice', |
||
'utm_source' : '{{{utm-banner}}}' + '_' + Geo.country, |
'utm_source' : '{{{utm-banner}}}' + '_' + Geo.country, |
||
'utm_campaign' : '{{{utm-campaign}}}' + '_' + getCountryValue(0) |
'utm_campaign' : '{{{utm-campaign}}}' + '_' + getCountryValue(0) |
||
} ); |
} ); |
||
var fullUrl = baseUrl + '?' + queryString; |
var fullUrl = baseUrl + '?' + queryString; |
||
Line 214: | Line 155: | ||
} ); |
} ); |
||
}; |
}; |
||
// Set thermometer sizes |
|||
var maxPixels = 450; |
|||
var range = (parseFloat( '{{MediaWiki:Centralnotice-shared-2011-fundraising-goal}}' )) * 0.78; |
|||
var value = (parseFloat( '{{{amount}}}' ) + parseFloat( '{{MediaWiki:Centralnotice-shared-2011-fundraising-extra}}' )) * 0.78; |
|||
var left = range - value; |
|||
var fill = parseInt( maxPixels * ( ( 1 / range ) * value ) ); |
|||
$(document).ready( function () { |
$(document).ready( function () { |
||
if ( wgCanonicalSpecialPageName != "CentralNotice" && wgCanonicalSpecialPageName != "NoticeTemplate" ){ |
|||
addBannerSpace(); |
|||
} |
|||
bannerRewriteUrl(); |
bannerRewriteUrl(); |
||
$('#notice-thermometer-fill').html( '€' + value.toFixed(1) + 'M raised' ); |
|||
$('#notice-thermometer-togo').html( '€' + left.toFixed(1) + 'M left' ); |
|||
$('#notice-thermometer-fill').animate( { width: fill }, 3000 ) |
|||
}); |
}); |
||
Latest revision as of 17:01, 5 June 2020
MediaWiki:Centralnotice-shared-common-style-2011 MediaWiki:Centralnotice-shared-button-2011
<style type="text/css">
- centralNotice.collapsed #{{{utm-banner}}}{
display: none;
}
- {{{utm-banner}}} .cn-bottom-right-float {
position: relative !important;
}
- {{{utm-banner}}} {
background-image: url({{{image-url}}}); background-position: bottom right; background-repeat: no-repeat; display: none; // defaulting to none, setting visible when the margins are added as fail-safe and no-go-nuts-safe position: relative; background-color: #CCE7CD; border: none; height:100px; overflow: hidden;
}
- {{{utm-banner}}} a {
text-decoration: none;
}
- {{{utm-banner}}} a:hover {
text-decoration: none;
}
- cn-bold-blue-text:hover {
text-decoration: underline;
}
- cn-blue {
color: blue; }
- cn-blue-underline {
text-decoration: underline;
}
- inlineblue {
text-decoration: underline; color: blue;
}
/* Bigger bold, blue text */
- {{{utm-banner}}} #cn-bold-blue-text {
font-size: 1em; color: #111111; padding: 1em; line-height: 1em; text-align:left; text-direction:⧼Centralnotice-2011translations-dir⧽; padding-bottom: 1.5em; padding-top: 0.5em; height: 100px;
}
body.ltr #{{{utm-banner}}} #cn-bold-blue-text{
padding-right: 20px;
} body.rtl #{{{utm-banner}}} #cn-bold-blue-text{
padding-left: 20px;
}
.banner-column{
padding: 0.5em; padding-right: 1em; padding-left: 1em; max-width: 28%; float: left;
}
</style>
<script type="text/javascript">
var countrySpecific = { Template:2011FR/Multicurrency2 };
function getCountryValue(ii) { return countrySpecific[Geo.country][ii]; }
</script>
<script type="text/javascript">
function addBannerSpace() {
$('#mw-panel').css('top', '260px'); $('#mw-head').css('top', '100px'); $('#{{{utm-banner}}}').css('display', 'block');
}
function removeBannerSpace() {
$('#mw-panel').css('top', '160px'); $('#mw-head').css('top', '0px');
}
$('body').prepend($('#centralNotice'));
var bannerChooseRandom = function(choiceString) {
var choices = choiceString.split(','); if ( choices.length ) { return choices[Math.floor( Math.random() * choices.length )].replace(/^\s+|\s+$/, ); }
}
var bannerRewriteUrl = function() {
$('#variable_lp').attr('href', function() { var baseUrl = 'https://donate.wikimedia.org/wiki/Special:FundraiserLandingPage'; var queryString = $.param( { 'uselang' : wgUserLanguage, 'country' : Geo.country, 'template' : 'Lp-layout-default', // landing page components 'appeal-template' : bannerChooseRandom( '{{{lp-appeal-template}}}' ), 'appeal': bannerChooseRandom( '{{{lp-appeal}}}' ), 'form-template' : bannerChooseRandom( '{{{lp-form-template}}}' ), 'form-countryspecific' : bannerChooseRandom( '{{{lp-form-countryspecific}}}' ), // utm tracking data 'utm_medium' : 'sitenotice', 'utm_source' : '{{{utm-banner}}}' + '_' + Geo.country, 'utm_campaign' : '{{{utm-campaign}}}' + '_' + getCountryValue(0) } ); var fullUrl = baseUrl + '?' + queryString; return fullUrl } );
};
$(document).ready( function () {
if ( wgCanonicalSpecialPageName != "CentralNotice" && wgCanonicalSpecialPageName != "NoticeTemplate" ){ addBannerSpace(); } bannerRewriteUrl();
});
</script>