Mudanças entre as edições de "Widget:Teste"

De Wiki Gla
Ir para navegação Ir para pesquisar
m
Etiqueta: Revertido
m
 
(176 revisões intermediárias por 3 usuários não estão sendo mostradas)
Linha 1: Linha 1:
<style>
<style>
.gx-overlay{position:fixed;inset:0;background:rgba(0,0,0,.86);display:none;align-items:center;justify-content:center;z-index:2147483647}
    .island-grid {
.gx-modal{position:relative;max-width:min(92vw,1200px);max-height:92vh;background:#000;border-radius:12px;box-shadow:0 10px 40px rgba(0,0,0,.5);overflow:hidden}
        display: flex;
.gx-modal img{display:block;max-width:100%;max-height:92vh;height:auto;width:auto;image-rendering:auto}
        flex-wrap: wrap;
.gx-close{position:absolute;top:8px;right:8px;width:34px;height:34px;border-radius:999px;background:rgba(255,255,255,.16);border:1px solid rgba(255,255,255,.38);color:#fff;font-size:22px;line-height:32px;text-align:center;cursor:pointer;user-select:none}
        justify-content: center;
.gx-close:hover{background:rgba(255,255,255,.25)}
        gap: 10px;
.gx-open{overflow:hidden!important}
        padding: 12px 0;
.gifbox{cursor:pointer;text-decoration:underline;color:#0645ad}
    }
.gifbox:visited{color:#0b0080}
 
body.gx-open #mw-head,
    .island-banner {
body.gx-open #mw-panel,
        position: relative;
body.gx-open #p-logo,
        width: 380px;
body.gx-open #footer,
        height: 90px;
body.gx-open .vector-header,
        overflow: hidden;
body.gx-open .vector-sitenotice,
        border-radius: 8px;
body.gx-open .mw-sidebar,
        box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 10px;
body.gx-open .mw-portlet,
        cursor: pointer;
body.gx-open .vector-sticky-header{pointer-events:none!important}
        transition: transform 0.15s, box-shadow 0.15s;
body.gx-open a:hover,
        display: block;
body.gx-open a:focus,
        box-sizing: border-box;
body.gx-open a:active{outline:none!important;text-decoration:none!important}
    }
body.gx-open #mw-content-text ~ *,
 
body.gx-open #content ~ *,
    .island-banner::before {
body.gx-open #mw-head,
        content: "";
body.gx-open #mw-panel,
        position: absolute;
body.gx-open #p-logo,
        top: 0;
body.gx-open #footer{filter:saturate(.2) brightness(.8)}
        left: 0;
</style>
        right: 0;
        bottom: 0;
        background: linear-gradient(105deg, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0.35) 40%, rgba(0, 0, 0, 0.1) 70%, transparent 100%);
        pointer-events: none;
        z-index: 1;
    }
 
    .island-banner:hover {
        transform: translateY(-2px);
        box-shadow: rgba(0, 0, 0, 0.35) 0px 4px 12px;
    }
 
    .island-banner .island-chests {
        position: absolute;
        top: 8px;
        left: 8px;
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        z-index: 2;
        pointer-events: none;
    }
 
    .island-banner .island-chest-group {
        position: relative;
        display: inline-block;
    }
 
    .island-banner .island-chest-group img {
        display: block;
        width: auto;
        height: auto;
    }
 
    .island-banner .island-chest-count {
    position: absolute;
    left: 0;          /* era right: 0 */
    bottom: 0;
    font-size: 12.5px;  /* era 11px */
    font-weight: bold;
    color: #fff;
    background: rgba(0, 0, 0, 0.75);
    padding: 1px 3px;
    border-radius: 3px;
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    z-index: 10;
}
 
    .island-banner .island-title {
        position: absolute;
        bottom: 10px;
        left: 8px;
        font-size: 1.35em;
        font-weight: bold;
        color: #fff;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8), 0 2px 4px rgba(0, 0, 0, 0.5);
        line-height: 1.2;
        z-index: 2;
        pointer-events: none;
        text-transform: uppercase;
    }


<div class="gx-overlay" role="dialog" aria-modal="true" aria-label="Visualização de imagem">
    @media (max-width: 768px) {
  <div class="gx-modal">
        .island-grid {
    <button class="gx-close" type="button" aria-label="Fechar">&times;</button>
            flex-direction: column;
    <img id="gx-img" src="" alt="" loading="eager" decoding="async" referrerpolicy="no-referrer">
            align-items: stretch;
  </div>
        }
</div>


        .island-banner {
            width: 100%;
            max-width: none;
        }
    }
</style>
<script>
<script>
(function(){
    (function () {
  var overlay=document.querySelector('.gx-overlay');
        function applyBackgrounds() {
  var modal=overlay.querySelector('.gx-modal');
            document.querySelectorAll('.island-banner[data-bgimg]').forEach(function (el) {
  var imgEl=overlay.querySelector('#gx-img');
                var filename = el.getAttribute('data-bgimg');
  var closeEl=overlay.querySelector('.gx-close');
                if (!filename) return;
  var lastActive=null;
                var url;
  function openBox(url,altText){
                if (typeof mw !== 'undefined' && mw.util && mw.util.getUrl) {
    if(!url)return;
                    url = mw.util.getUrl('Especial:FilePath/' + filename);
    lastActive=document.activeElement;
                } else {
    document.body.classList.add('gx-open');
                    url = '/index.php?title=Especial:FilePath/' + encodeURIComponent(filename);
    imgEl.src=url;
                }
    imgEl.alt=altText||'';
                el.style.backgroundImage = 'url(' + url + ')';
    overlay.style.display='flex';
                el.style.backgroundSize = 'cover';
    closeEl.setAttribute('tabindex','0');
                el.style.backgroundPosition = 'center';
    closeEl.focus();
                el.style.backgroundRepeat = 'no-repeat';
  }
            });
  function closeBox(){
        }
    overlay.style.display='none';
        function initClickable() {
    document.body.classList.remove('gx-open');
            document.querySelectorAll('.island-banner[data-href]').forEach(function (el) {
    imgEl.src='';
                if (el._icClick) return;
    imgEl.alt='';
                el._icClick = true;
    if(lastActive&&typeof lastActive.focus==='function'){lastActive.focus()}
                el.setAttribute('role', 'link');
  }
                el.setAttribute('tabindex', '0');
  overlay.addEventListener('click',function(e){if(e.target===overlay)closeBox()});
                el.addEventListener('click', function () {
  closeEl.addEventListener('click',closeBox);
                    var href = el.getAttribute('data-href');
  document.addEventListener('keydown',function(e){if(e.key==='Escape')closeBox()});
                    if (href) window.location.href = href;
  document.addEventListener('click',function(e){
                });
    var t=e.target;
                el.addEventListener('keydown', function (e) {
    while(t&&t!==document){
                    if (e.key === 'Enter' || e.key === ' ') {
      if(t.classList&&t.classList.contains('gifbox'))break;
                        e.preventDefault();
      t=t.parentNode;
                        var href = el.getAttribute('data-href');
    }
                        if (href) window.location.href = href;
    if(!t||t===document)return;
                    }
    e.preventDefault();
                });
    var url=t.getAttribute('data-gif')||t.getAttribute('href');
            });
    var alt=t.getAttribute('data-alt')||t.textContent.trim();
        }
    if(!url)return;
        function run() {
    openBox(url,alt);
            applyBackgrounds();
  },false);
            initClickable();
})();
        }
        if (document.readyState === 'loading') {
            document.addEventListener('DOMContentLoaded', run);
        } else {
            run();
        }
    })();
</script>
</script>

Edição atual tal como às 00h06min de 13 de março de 2026

<style>

   .island-grid {
       display: flex;
       flex-wrap: wrap;
       justify-content: center;
       gap: 10px;
       padding: 12px 0;
   }
   .island-banner {
       position: relative;
       width: 380px;
       height: 90px;
       overflow: hidden;
       border-radius: 8px;
       box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 10px;
       cursor: pointer;
       transition: transform 0.15s, box-shadow 0.15s;
       display: block;
       box-sizing: border-box;
   }
   .island-banner::before {
       content: "";
       position: absolute;
       top: 0;
       left: 0;
       right: 0;
       bottom: 0;
       background: linear-gradient(105deg, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0.35) 40%, rgba(0, 0, 0, 0.1) 70%, transparent 100%);
       pointer-events: none;
       z-index: 1;
   }
   .island-banner:hover {
       transform: translateY(-2px);
       box-shadow: rgba(0, 0, 0, 0.35) 0px 4px 12px;
   }
   .island-banner .island-chests {
       position: absolute;
       top: 8px;
       left: 8px;
       display: flex;
       flex-wrap: wrap;
       gap: 6px;
       z-index: 2;
       pointer-events: none;
   }
   .island-banner .island-chest-group {
       position: relative;
       display: inline-block;
   }
   .island-banner .island-chest-group img {
       display: block;
       width: auto;
       height: auto;
   }
   .island-banner .island-chest-count {
   position: absolute;
   left: 0;          /* era right: 0 */
   bottom: 0;
   font-size: 12.5px;  /* era 11px */
   font-weight: bold;
   color: #fff;
   background: rgba(0, 0, 0, 0.75);
   padding: 1px 3px;
   border-radius: 3px;
   line-height: 1;
   white-space: nowrap;
   box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
   z-index: 10;

}

   .island-banner .island-title {
       position: absolute;
       bottom: 10px;
       left: 8px;
       font-size: 1.35em;
       font-weight: bold;
       color: #fff;
       text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8), 0 2px 4px rgba(0, 0, 0, 0.5);
       line-height: 1.2;
       z-index: 2;
       pointer-events: none;
       text-transform: uppercase;
   }
   @media (max-width: 768px) {
       .island-grid {
           flex-direction: column;
           align-items: stretch;
       }
       .island-banner {
           width: 100%;
           max-width: none;
       }
   }

</style> <script>

   (function () {
       function applyBackgrounds() {
           document.querySelectorAll('.island-banner[data-bgimg]').forEach(function (el) {
               var filename = el.getAttribute('data-bgimg');
               if (!filename) return;
               var url;
               if (typeof mw !== 'undefined' && mw.util && mw.util.getUrl) {
                   url = mw.util.getUrl('Especial:FilePath/' + filename);
               } else {
                   url = '/index.php?title=Especial:FilePath/' + encodeURIComponent(filename);
               }
               el.style.backgroundImage = 'url(' + url + ')';
               el.style.backgroundSize = 'cover';
               el.style.backgroundPosition = 'center';
               el.style.backgroundRepeat = 'no-repeat';
           });
       }
       function initClickable() {
           document.querySelectorAll('.island-banner[data-href]').forEach(function (el) {
               if (el._icClick) return;
               el._icClick = true;
               el.setAttribute('role', 'link');
               el.setAttribute('tabindex', '0');
               el.addEventListener('click', function () {
                   var href = el.getAttribute('data-href');
                   if (href) window.location.href = href;
               });
               el.addEventListener('keydown', function (e) {
                   if (e.key === 'Enter' || e.key === ' ') {
                       e.preventDefault();
                       var href = el.getAttribute('data-href');
                       if (href) window.location.href = href;
                   }
               });
           });
       }
       function run() {
           applyBackgrounds();
           initClickable();
       }
       if (document.readyState === 'loading') {
           document.addEventListener('DOMContentLoaded', run);
       } else {
           run();
       }
   })();

</script>