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

De Wiki Gla
Ir para navegação Ir para pesquisar
m
 
(310 revisões intermediárias por 3 usuários não estão sendo mostradas)
Linha 1: Linha 1:
<div class="home-button-container">
<style>
  <!-- Card 1 -->
     .island-grid {
  <div class="home-button-item">
         display: flex;
     <a href="/index.php/Personagens" title="Personagens">
        flex-wrap: wrap;
      <div class="home-button-image">
         justify-content: center;
         <img src="https://wiki.gla.com.br/images/a/a8/Personagens_card.png" alt="Personagens">
         gap: 10px;
      </div>
         padding: 12px 0;
      <div class="home-button-title">PERSONAGENS</div>
     }
    </a>
  </div>
 
  <!-- Card 2 -->
  <div class="home-button-item">
    <a href="/index.php/Itens" title="Itens">
      <div class="home-button-image">
         <img src="https://wiki.gla.com.br/images/3/39/Itens_card.png" alt="Itens">
      </div>
      <div class="home-button-title">ITENS</div>
    </a>
  </div>
 
  <!-- Card 3 -->
  <div class="home-button-item">
    <a href="/index.php/Boss_Semanais" title="Semanais">
      <div class="home-button-image">
        <img src="https://wiki.gla.com.br/images/6/65/Weeklyboss_card.png" alt="Weekly Bosses">
      </div>
      <div class="home-button-title">SEMANAIS</div>
    </a>
  </div>
 
  <!-- Card 4 -->
  <div class="home-button-item">
    <a href="/index.php/World_Boss" title="World Bosses">
      <div class="home-button-image">
         <img src="https://wiki.gla.com.br/images/8/87/Worldboss_card.png" alt="World Bosses">
      </div>
      <div class="home-button-title">WORLD BOSS</div>
    </a>
  </div>
 
  <div class="home-button-item">
    <a href="/index.php/Wanted_Pirates" title="Piratas Procurados">
      <div class="home-button-image">
         <img src="https://wiki.gla.com.br/images/9/9d/Wantedpirates_card.png" alt="Wanted Pirates">
      </div>
      <div class="home-button-title">WANTED PIRATES</div>
     </a>
  </div>
 
  <div class="home-button-item">
    <a href="/wiki/NolandTales" title="Noland Tales">
      <div class="home-button-image">
        <img src="URL_DA_IMAGEM_NOLAND" alt="Noland Tales">
      </div>
      <div class="home-button-title">NOLAND TALES</div>
    </a>
  </div>


  <div class="home-button-item">
    .island-banner {
    <a href="/wiki/NolandTales" title="Noland Tales">
        position: relative;
      <div class="home-button-image">
        width: 380px;
         <img src="URL_DA_IMAGEM_NOLAND" alt="Noland Tales">
        height: 90px;
      </div>
        overflow: hidden;
      <div class="home-button-title">NOLAND TALES</div>
        border-radius: 8px;
     </a>
        box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 10px;
  </div>
         cursor: pointer;
        transition: transform 0.15s, box-shadow 0.15s;
        display: block;
        box-sizing: border-box;
     }


  <div class="home-button-item">
     .island-banner::before {
     <a href="/wiki/NolandTales" title="Noland Tales">
         content: "";
      <div class="home-button-image">
        position: absolute;
         <img src="URL_DA_IMAGEM_NOLAND" alt="Noland Tales">
        top: 0;
      </div>
        left: 0;
      <div class="home-button-title">NOLAND TALES</div>
        right: 0;
    </a>
        bottom: 0;
  </div>
        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%);
</div>
        pointer-events: none;
<style>
        z-index: 1;
.home-button-container {
    }
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 10px;
  box-sizing: border-box;
}


.home-button-item {
    .island-banner:hover {
  position: relative;
        transform: translateY(-2px);
  overflow: hidden;
        box-shadow: rgba(0, 0, 0, 0.35) 0px 4px 12px;
  border: 1px solid #ddd;
    }
  border-radius: 8px;
  background: #fff;
  /* Removemos o transform para que o card não se mova */
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
  box-sizing: border-box;
}


.home-button-item:hover {
    .island-banner .island-chests {
  border-color: #007bff;
        position: absolute;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
        top: 8px;
}
        left: 8px;
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        z-index: 2;
        pointer-events: none;
    }


.home-button-item a {
    .island-banner .island-chest-group {
  display: block;
        position: relative;
  text-decoration: none;
        display: inline-block;
  color: inherit;
    }
}


.home-button-image {
    .island-banner .island-chest-group img {
  width: 100%;
        display: block;
  aspect-ratio: 16/9;
        width: auto;
  overflow: hidden;
        height: auto;
}
    }


.home-button-image img {
    .island-banner .island-chest-count {
  width: 100%;
    position: absolute;
  height: 100%;
    left: 0;          /* era right: 0 */
  object-fit: cover;
    bottom: 0;
  display: block;
    font-size: 12.5px; /* era 11px */
  transition: transform 0.3s ease, filter 0.3s ease;
    font-weight: bold;
  will-change: transform;    
    color: #fff;
  backface-visibility: hidden;
    background: rgba(0, 0, 0, 0.75);
  transform: translateZ(0);  
    padding: 1px 3px;
}
    border-radius: 3px;
.home-button-item:hover .home-button-image img {
    line-height: 1;
  filter: brightness(1.1);
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    z-index: 10;
}
}


.home-button-title {
    .island-banner .island-title {
  font-weight: bold;
        position: absolute;
  font-size: 1.1em;
        bottom: 10px;
  background: #fff;
        left: 8px;
  color: #000;
        font-size: 1.35em;
  margin: 0;
        font-weight: bold;
  padding: 10px 5px;
        color: #fff;
  position: relative;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8), 0 2px 4px rgba(0, 0, 0, 0.5);
  text-transform: uppercase;
        line-height: 1.2;
  border-top: 1px solid #ddd;
        z-index: 2;
  text-align: center;
        pointer-events: none;
  transition: background-color 0.3s ease, transform 0.3s ease;
        text-transform: uppercase;
  transform: translateY(0);
    }
}


.home-button-item:hover .home-button-title {
    @media (max-width: 768px) {
  background-color: #f9f9f9;
        .island-grid {
  transform: translateY(-2px);
            flex-direction: column;
}
            align-items: stretch;
        }


/* Responsividade: 2 colunas abaixo de 1280px */
        .island-banner {
@media (max-width: 1280px) {
            width: 100%;
  .home-button-container {
            max-width: none;
    grid-template-columns: repeat(2, 1fr);
        }
  }
    }
}
</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>