Utente:Laurentius/sandbox: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
m tolgo bozza dalla categoria |
copio da https://meta.wikimedia.org/wiki/Special:CentralNoticeBanners/edit/EU_Fixcopyright_Small_v2 |
||
Riga 1:
<!-- For guidance or help with this banner, contact Seddon (WMF) -->
<!-- This banners is set up to run to loggedin users only -->
<style>
@font-face {
font-family: 'Montserrat';
font-style: normal;
src: local('Montserrat'), local('Montserrat'), url(https://upload.wikimedia.org/wikipedia/donate/c/cd/Montserrat.woff2) format('woff2');}
/* Main banner container. Banner: background, border colour and width and adding a margin between banner and article header*/
.cnotice {
position: relative;
overflow: hidden;
border: 1px solid #d33;
font-family: system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Oxygen-Sans",Ubuntu,Cantarell,Lato,"Helvetica Neue",Helvetica,Arial,sans-serif;
border-radius: 2px;
margin-bottom: 1em;
cursor: pointer;
color: #222;
font-weight: 500;
}
/* Sets the minimum banner height. If img + logo-container margins > height. Banner will be larger*/
#cnotice-main {
display: table;
width: 100%;
height: 80px; /* need to set height for height 100% to work on elements within it */
}
/*MOBILE - Adjust mobile height of banner*/
body.skin-minerva #cnotice-main {
height: 100px;
}
/*IMPORTANT - don't touch*/
.cnotice-message-container,
.cnotice-logo-container,
.cnotice-misc-container {
display: table-cell;
height: 100%;
vertical-align: middle;
}
/* --- Main message --- */
.cnotice-message {
position: relative;
margin: 0;
padding: 5px 5px 5px 5px;
font-size: 22px;
line-height: 1.2;
}
@media (min-width: 1200px) {
.cnotice-message {
padding: 15px 0px 11px 30px;
}
}
body.rtl .cnotice-message {
padding: 5px 5px 5px 5px;
}
.cnotice-message p {
margin: 0;
color: #222;
font-weight: bold;
font-size: 20px;
opacity: 1;
text-align: center;
padding-top: 10px;
padding-bottom: 10px;
}
@media (min-width: 1200px) {
.cnotice-message p { font-size: 22px; }
}
/* --- Logo Image text --- */
.cnotice-logo-container {
width: 10%;
}
body.rtl .cnotice-logo-container {
padding: 0 .25em 0 .9em;
}
.cnotice-logo-container img {
opacity: 1;
display: block;
margin-left: 15%;
margin-top: 2px;
margin-bottom: 1px;
}
/*Misc containter stuff starts here*/
.cnotice-misc-container {
width: 10%;
padding-right: 40px;
}
/*Detects and adjusts for mobile skin */
body.skin-minerva .cnotice-misc-container {
padding-right: 10px;
}
/* --- Close Options --- */
#cnotice-toggle-box-options {
display: table-cell;
font-size: .8em;
text-transform: uppercase;
width: 38px;
height: 38px;
border-radius: 19px;
vertical-align: middle;
}
#cnotice-toggle-box {
cursor: pointer;
position: absolute;
top: 2px;
right: 3px;
z-index: 1;
opacity: .8;
}
body.rtl #cnotice-toggle-box {
left: 3px;
right: unset;
}
#cnotice-toggle-box:hover {
opacity: 1;
}
/* --- Full Banner Link --- */
.cnotice a.cnotice-full-banner-click {
display: block;
height: 100%;
width: 100%;
cursor: pointer;
text-decoration: none;
}
.cnotice a.cnotice-full-banner-click:hover {
text-decoration: underline;
}
.cnotice-button {
display: inline-block;
border: 2px solid #d33;
border-radius: 2px;
color: #fff;
padding: 5px 5px;
text-align: center;
font-weight: bold;
text-decoration: none;
font-size: 17px;
margin: 4px 2px;
-moz-transition-duration: 100ms; /* Firefox */
-webkit-transition-duration: 100ms; /* Safari */
transition-duration: 100ms;
cursor: pointer;
z-index: 1;
min-width: 80px;
}
@media (min-width: 1100px) {
.cnotice-button {
min-width: 110px;
width: 25%;
margin: auto;
}
}
/* --- Buttons --- */
.cnotice a.cnotice-buttonlink {
cursor: pointer;
text-decoration: none;
color: #000;
}
.cnotice a.cnotice-buttonlink:hover {
color: #fff;
}
.cnotice-button1 {
background-color: #d33;
border-color: #d33;
color: #fff;
}
.cnotice-button1:hover {
background-color: #447ff5;
border-color: #447ff5;
}
.cnotice-button1:active {
background-color: #2a4b8d;
border-color: #2a4b8d;
}
.rtl .cnotice-button1 {
left: 23px;
right: auto;
margin-left: 20px;
}
#cnotice-translation-link {
position: absolute;
right: 65px;
bottom: 0px;
font-size: 0.8em;
white-space: nowrap;
}
#cnotice-translation-link:hover {
text-decoration: underline;
}
.rtl #cnotice-translation-link {
text-align: left;
left: 65px;
}
@keyframes highlight-grow{
from {background-position: 0%;}
to {background-position: -99.99%; }
}
.cnotice-message .highlight {
background-image: linear-gradient(to right, transparent 50%, #ffff00 50%);
background-position: 0% 0;
background-size: 200% auto;
text-decoration: none;
transition: background-position 0.5s ease-out;
animation-name: highlight-grow;
animation-duration: 1s;
animation-timing-function: ease-out;
animation-delay: 2s;
animation-fill-mode: forwards;
}
.redtitle {
color: #d33;
}
</style>
<div class="cnotice" id="{{{banner}}}">
<a class="cnotice-full-banner-click external text" href="//meta.wikimedia.org/wiki/Meta:Example">
<div id="cnotice-main">
<div class="cnotice-message-container">
<div class="cnotice-message">
<p>To all our readers in <span class="ceb-replace-countryname">COUNTRY</span>. <span class="redtitle">It's time to <span class="highlight">fix copyright</span>.</span></p>
</div>
</div>
<div class="cnotice-misc-container">
<div class="cnotice-button cnotice-button1">Take Action</div>
</div>
</div>
</a>
<div id="cnotice-toggle-box">
<a href="#" title="{{int:centralnotice-shared-hide}}" onclick="mw.centralNotice.hideBanner();return false;"><img border="0" src="//upload.wikimedia.org/wikipedia/donate/a/ac/Close_oojs.png" alt="{{int:centralnotice-shared-hide}}" /></a>
</div>
</div>
|