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

De Wiki Gla
Ir para navegação Ir para pesquisar
m
Etiqueta: Revertido
m
 
(23 revisões intermediárias pelo mesmo usuário não estão sendo mostradas)
Linha 1: Linha 1:
<style>
<style>
/* === Sidebar "Vampire Survivors vibe" ===================================== */
    .island-grid {
/* Tokens (mexe aqui pra ajustar o tema) */
        display: flex;
:root {
        flex-wrap: wrap;
  --sb-bg: rgba(15, 16, 24, 0.78);     /* vidro/fumaça sobre bg claro/imagético */
        justify-content: center;
  --sb-bg-fallback: #161823;           /* fallback sólido se o blur não colar */
        gap: 10px;
  --sb-border: rgba(255,255,255,0.10);
        padding: 12px 0;
  --sb-shadow: 0 8px 24px rgba(0,0,0,0.35);
    }


  --sb-text: #E9ECF8;
    .island-banner {
  --sb-heading: #FFFFFF;
        position: relative;
  --sb-link: #DDE1FF;
        width: 380px;
  --sb-link-hover: #FFFFFF;
        height: 90px;
  --sb-pill-hover: rgba(255,255,255,0.08);
        overflow: hidden;
  --sb-pill-active: rgba(255,255,255,0.14);
        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;
    }


  --sb-radius: 14px;
    .island-banner::before {
  --sb-gap: 12px;
        content: "";
  --sb-pad-x: 12px;
        position: absolute;
  --sb-pad-y: 10px;
        top: 0;
}
        left: 0;
 
        right: 0;
/* Empacota cada portlet como "card" */
        bottom: 0;
#mw-panel .mw-portlet,
        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%);
#mw-panel.vector-legacy-sidebar .mw-portlet {
        pointer-events: none;
  background: var(--sb-bg-fallback);
        z-index: 1;
  border: 1px solid var(--sb-border);
    }
  border-radius: var(--sb-radius);
  box-shadow: var(--sb-shadow);
  margin: 0 var(--sb-pad-x) var(--sb-gap);
  padding: 0; /* a gente controla o padding dos filhos */
  overflow: hidden; /* arredondado real */
}
@supports ((-webkit-backdrop-filter: blur(6px)) or (backdrop-filter: blur(6px))) {
  #mw-panel .mw-portlet,
  #mw-panel.vector-legacy-sidebar .mw-portlet {
    background: var(--sb-bg);
    -webkit-backdrop-filter: blur(10px) saturate(120%);
    backdrop-filter: blur(10px) saturate(120%);
  }
}
 
/* Logo dá um respiro */
#mw-panel #p-logo { margin: 0 var(--sb-pad-x) var(--sb-gap); }
 
/* Cabeçalhos */
#mw-panel .vector-menu-heading,
#mw-panel.vector-legacy-sidebar .vector-menu-heading {
  color: var(--sb-heading);
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: none;
  padding: 10px var(--sb-pad-x);
  margin: 0;
  position: relative;
}
 
/* filete/acento no topo do card (sutil e gamer) */
#mw-panel .mw-portlet::before,
#mw-panel.vector-legacy-sidebar .mw-portlet::before {
  content: "";
  display: block;
  height: 2px;
  background: linear-gradient(90deg, #8D5CFF, #51E1FF 60%, transparent);
}


/* Conteúdo do portlet */
    .island-banner:hover {
#mw-panel .vector-menu-content,
        transform: translateY(-2px);
#mw-panel.vector-legacy-sidebar .vector-menu-content {
        box-shadow: rgba(0, 0, 0, 0.35) 0px 4px 12px;
  padding: var(--sb-pad-y) var(--sb-pad-x) calc(var(--sb-pad-y) + 2px);
    }
  color: var(--sb-text);
}


/* Zera estilos default e cria "pills" nos links */
    .island-banner .island-chests {
#mw-panel .vector-menu-content-list,
        position: absolute;
#mw-panel.vector-legacy-sidebar .vector-menu-content-list {
        top: 8px;
  list-style: none;
        left: 8px;
  margin: 0;
        display: flex;
  padding: 0;
        flex-wrap: wrap;
  display: flex;  
        gap: 6px;
  flex-direction: column;  
        z-index: 2;
  gap: 6px;
        pointer-events: none;
}
    }


#mw-panel .vector-menu-content-list .mw-list-item a,
    .island-banner .island-chest-group {
#mw-panel .vector-menu-content-list li a,
        position: relative;
#mw-panel.vector-legacy-sidebar .vector-menu-content-list .mw-list-item a,
        display: inline-block;
#mw-panel.vector-legacy-sidebar .vector-menu-content-list li a {
    }
  display: block;
  padding: 8px 10px;
  border-radius: 10px;
  line-height: 1.25;
  color: var(--sb-link);
  text-decoration: none;
  transition: background .18s ease, color .18s ease, transform .06s ease;
}


/* Hover/active/selecionado = pill destacada */
    .island-banner .island-chest-group img {
#mw-panel .vector-menu-content-list li a:hover,
        display: block;
#mw-panel.vector-legacy-sidebar .vector-menu-content-list li a:hover {
        width: auto;
  background: var(--sb-pill-hover);
        height: auto;
  color: var(--sb-link-hover);
    }
}
#mw-panel .vector-menu-content-list li.selected > a,
#mw-panel.vector-legacy-sidebar .vector-menu-content-list li.selected > a {
  background: var(--sb-pill-active);
  color: var(--sb-link-hover);
  font-weight: 600;
}


/* Acessibilidade: foco visível sem ficar brega */
    .island-banner .island-chest-count {
#mw-panel .vector-menu-content-list li a:focus-visible,
    position: absolute;
#mw-panel.vector-legacy-sidebar .vector-menu-content-list li a:focus-visible {
    left: 0;          /* era right: 0 */
  outline: 2px solid #9DA2FF;
    bottom: 0;
  outline-offset: 2px;
    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;
}
}


/* Compacta a densidade do "Ferramentas" que costuma ser longuinho */
    .island-banner .island-title {
#p-tb .vector-menu-content-list li a { padding: 7px 9px; }
        position: absolute;
 
        bottom: 10px;
/* Opcional: deixa o sidebar "grudado" enquanto a página rola (bom em telas largas) */
        left: 8px;
@media (min-width: 1100px) {
        font-size: 1.35em;
  /* só habilite se o seu #mw-panel não for absolutamente posicionado pelo skin */
        font-weight: bold;
  /* #mw-panel { position: sticky; top: 72px; } */
        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;
    }


/* Se o seu background é MUITO claro e quiser mais contraste:  
    @media (max-width: 768px) {
  descomenta a linha abaixo pra subir a opacidade dos cards. */
        .island-grid {
/* :root { --sb-bg: rgba(15,16,24,0.88); } */
            flex-direction: column;
            align-items: stretch;
        }


        .island-banner {
            width: 100%;
            max-width: none;
        }
    }
</style>
</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>

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>