Utente:Laurentius/sandbox: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
copio da https://meta.wikimedia.org/wiki/Special:CentralNoticeBanners/edit/EU_Fixcopyright_Small_v2 |
adatto |
||
Riga 1:
<!-- For guidance or help with this banner, contact Seddon (WMF) -->
<style>
/* Hide when editing */
.action-edit .ceb,
.ve-activated .ceb {
display: none !important;
}
.heading-holder {
overflow: visible;
}
#centralNotice.collapsed .ceb {
display: none;
}
/* z-index override for #siteNotice now having .mw-body-content class [https://phabricator.wikimedia.org/T155863] */
#siteNotice {
}
/* z-index override for German Wikipedia */
.mw-body {
z-index: auto;
}
/* Box-
.ceb,
.ceb *,
.ceb *:before,
.ceb *:after {
box-sizing: border-box;
}
/* Inline banner styles
---------------------------- */
/*Reset focus outlines*/
.ceb-inline-main:focus,
.ceb-inline-close:focus,
.ceb-rml-email:focus,
.ceb-btn-submit:focus {
outline: 0;
}
.ceb {
margin-bottom: 24px;
}
/*Default style is grey*/
.ceb-inline-main,
.ceb-inline-main:visited {
color: #222;
}
.ceb-inline-main {
text-align: center;
font-family: system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Oxygen-Sans",Ubuntu,Cantarell,Lato,"Helvetica Neue",Helvetica,Arial,sans-serif;
width: 100%;
padding: 15px 10px;
border: 3px solid #d33;
border-radius: 2px;
}
.ceb-inline-table {
display: block;
}
@media all and (min-width: 640px) {
.ceb-inline-table {
display: table;
}
.ceb-inline-main:hover {
text-decoration: none;
}
.ceb-inline-main:hover .ceb-btn-submit,
.ceb-inline-main:focus .ceb-btn-submit {
border: 1px solid #B8211F;
}
.ceb-inline-main:active .ceb-btn-submit {
background-color: #951B19;
}
.ceb-inline-main:focus .ceb-btn-submit {
box-shadow: inset 0 0 0 1px #d33, inset 0 0 0 2px #FFFFFF;
}
.ceb-inline-main,
.ceb-inline-message,
.ceb-inline-title,
.ceb-btn-submit {
}
.ceb-inline-main,
.ceb-inline-message,
.ceb-inline-title {
}
.ceb-inline-title {
line-height: 1.125; /*27px @24px*/
font-weight: bold;
}
@media all and (min-width: 960px) {
font-size: 22px;
line-height: 1.2; /*30px @25px*/
}
}
.ceb-inline-message {
margin-bottom: 10px;
line-height:
font-family: Georgia, Times, serif;
}
@media all and (min-width: 960px) {
.ceb-inline-message {
margin-bottom: 10px;
font-size: 17px;
width: 80%;
line-height: 1.5; /*25px @19px*/
}
}
.ceb-inline-title-icon {
}
/* --- Close button --- */
.ceb-inline-close {
position: absolute;
top: -20px;
right: -20px;
padding: 8px;
cursor: pointer;
}
.ceb-inline-close .ceb-icon-close path {
}
.ceb-inline-close .ceb-icon-close circle {
}
.ceb-inline-close:hover .ceb-icon-close circle,
.ceb-inline-close:focus .ceb-icon-close circle {
}
.ceb-inline-close:hover .ceb-icon-close path,
.ceb-inline-close:focus .ceb-icon-close path {
}
.ceb-icon-close {
}
.ceb-btn-submit {
text-align: center;
font-size: 15px;
font-weight: 600;
line-height: 1; /*17px @17px*/
border-radius: 2px;
cursor: pointer;
color: #fff;
}
.ceb-btn-table {
}
.ceb-btn-cell {
}
.ceb-btn-icon {
margin-right: 8px;
}
Riga 231 ⟶ 212:
}
.
background-image: linear-gradient(to right, transparent 50%, #ffff00 50%);
background-position: 0% 0;
Riga 249 ⟶ 230:
</style>
<div id="ceb-inline" class="ceb"><!-- the in-article banner -->
<a class="
<
<svg class="ceb-inline-title-icon" role="img" aria-labelledby="ceb-inline-title-icon-title" width="32" height="32" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><title id="ceb-inline-message-title-icon">Info icon</title><g fill="none" fill-rule="evenodd"><circle class="ceb-inline-message-title-icon-circle" fill="#d33" cx="16" cy="16" r="16"/><path d="M16.748 10.159c-1.494 0-2.042-.648-2.042-1.52 0-.174.025-.398.125-.995C15.005 6.598 15.678 6 17.17 6c1.495 0 2.043.647 2.043 1.519 0 .174-.025.398-.125.996-.174 1.046-.847 1.644-2.34 1.644zM15.728 25c-2.043 0-3.088-1.17-3.088-2.988 0-.548.05-.971.249-1.992l.996-5.33H10l.473-2.838h7.57l-1.917 10.21.423.124 3.486-3.56 1.993 1.767-1.52 1.743C18.84 24.03 17.447 25 15.729 25z" fill="#FFF"/></g></svg>
A tutti i nostri lettori in <span class="ceb-replace-countryname">COUNTRY</span>. <span class="redtitle">È tempo di <span class="highlight">aggiornare il diritto d'autore</span>.</span>
</span>
<span
<!--
<p>This <span class="ceb-replace-dayofweek"></span> we need your help. On September 12, the European Parliament will vote on changes to copyright law. It will define how you communicate online and how you share knowledge and culture in the digital age. European lawmakers have recognised the importance of this moment. Now they need to hear from you to make the right choice so that together, we can keep Wikipedia and the Internet a place for information to be exchanged and consumed freely in <span class="ceb-replace-countryname">COUNTRY</span> and around the world. Thank you. </p>
-->
<p>Solo per oggi abbiamo oscurato le immagini su Wikipedia. Tutti i giorni, però, i volontari di Wikipedia incontrano ostacoli nella loro missione di rendere la conoscenza accessibile a chiunque.</p>
<p>Il 12 settembre il Parlamento europeo voterà gli emendamenti alla direttiva sul diritto d'autore. È l'occasione per promuovere la creatività introducendo misure come la libertà di panorama e la protezione del pubblico dominio in <span class="ceb-replace-countryname">COUNTRY</span> e nel mondo.</p>
</span>
<span class="ceb-btn-submit ceb-btn-table">
<span class="ceb-btn-cell">
<svg class="ceb-btn-icon" role="img" aria-labelledby="ceb-btn-icon-title" width="20" height="21" viewBox="0 0 20 21" xmlns="http://www.w3.org/2000/svg"><title id="ceb-btn-icon-title">Edit Icon</title><path d="M17.521 7.83l2.156-2.222c.43-.433.43-1.133 0-1.567L15.966.375a1.111 1.111 0 0 0-1.567 0L12.222 2.53l5.3 5.3zm-6.455-4.122L0 14.774v5.278h5.278L16.344 8.986l-5.278-5.278z" fill="#FFF" fill-rule="nonzero"/></svg>
</span>
<span class="ceb-btn-cell ceb-btn-txt">
Approfondisci
</span>
</span>
</a>
<
<svg class="ceb-icon ceb-icon-close" role="img" aria-labelledby="ceb-icon-close-title" width="34" height="34" viewBox="0 0 34 34" xmlns="http://www.w3.org/2000/svg"><title id="ceb-icon-close-title">Close</title><g transform="translate(1 1)" fill="none" fill-rule="evenodd"><circle stroke="#A2A9B1" fill="#F8F9FA" cx="16" cy="16" r="16"></circle><path d="M10 10l12 12m0-12L10 22" stroke="#d33" stroke-width="3" stroke-linecap="round"></path></g></svg>
</
</div><!-- ceb-inline -->
<script>
var ceb = ceb || {};
// Check in user language first, then fall back to English
ceb.countryNames = {
'en' : {
'US' : 'the U.S.',
'BD' : 'Bangladesh',
'IN' : 'India',
'GB' : 'the UK',
}
};
ceb.dayNames = {
'en' : [ 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' ],
};
ceb.iPadTranslations = {
'en' : 'iPad'
};
ceb.getCurrentDate = function() {
var today = new Date();
var dd = today.getDate();
var mm = today.getMonth()+1; //January is 0!
var yyyy = today.getFullYear();
if(dd<10) {
dd='0'+dd;
}
if(mm<10) {
mm='0'+mm;
}
today = mm+'/'+dd+'/'+yyyy;
return today;
};
ceb.insertInlineBanner = function() {
var $inlineBanner = $('#ceb-inline');
if ( window.___location.href.indexOf('m.wikipedia') > -1 ) {
$('.pre-content').prepend( $inlineBanner );
} else {
$('#siteNotice').prepend($('#centralNotice'));
}
$inlineBanner.css('display', 'block');
};
$(function() {
var language = mw.centralNotice.data.uselang;
var country = mw.centralNotice.data.country;
// Country name
var countryName;
if ( ceb.countryNames[language] ) {
countryName = ceb.countryNames[language][country] || ceb.countryNames.en[country];
} else {
countryName = ceb.countryNames.en[country];
}
$('.ceb-replace-countryname').html( countryName );
// Day of week
var now = new Date();
var dayNumber = now.getDay();
if ( $('.ceb-replace-dayofweek').length > 0 ) {
if ( ceb.dayNames[language] ) {
$('.ceb-replace-dayofweek').html( ceb.dayNames[language][dayNumber] );
} else {
console.log('Warning: banner should contain a day of the week, but no translations found.');
}
}
// Replace device with iPad if needed
var ua = navigator.userAgent;
if ( ua.match( /ipad/i ) ) {
$('.ceb-replace-device').html( ceb.iPadTranslations[language] || ceb.iPadTranslations.en );
}
// Close top banner on click or return
$('.ceb-inline-close').on('click keypress', function(e) {
if (e.which === 13 || e.type === 'click') {
$('#ceb-inline').hide();
mw.centralNotice.hideBanner();
e.stopPropagation();
}
});
if (!mw.centralNotice.bannerData.hideResult) {
ceb.insertInlineBanner();
}
// Adjustments for mobile
if ( window.___location.href.indexOf('m.wikipedia') > -1 ) {
$('.ceb').addClass('ceb--is-mobile');
}
// Blackout the images
$('.mw-wiki-logo').css({'filter': 'brightness(0)', '-webkit-filter': 'brightness(0)'});
$('img').css({'filter': 'brightness(0)', '-webkit-filter': 'brightness(0)'});
});
</script>
|