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

De Wiki Gla
Ir para navegação Ir para pesquisar
m
 
(255 revisões intermediárias por 3 usuários não estão sendo mostradas)
Linha 1: Linha 1:
<div class="wiki-social-wrapper">
<style>
<style>
.wiki-social-wrapper .social-cards {
    .island-grid {
  display: grid;
        display: flex;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        flex-wrap: wrap;
  gap: 0.75em;
        justify-content: center;
  justify-content: center;
        gap: 10px;
}
        padding: 12px 0;
 
    }
@media screen and (max-width: 1024px) {
  .wiki-social-wrapper .social-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5em;
  }
}


.wiki-social-wrapper .social-card {
    .island-banner {
  position: relative;
        position: relative;
  height: 4em;
        width: 380px;
  border-radius: 1em;
        height: 90px;
  overflow: hidden;
        overflow: hidden;
  cursor: pointer;
        border-radius: 8px;
  margin: 0;
        box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 10px;
  text-decoration: none;
        cursor: pointer;
  display: flex;
        transition: transform 0.15s, box-shadow 0.15s;
  align-items: center;
        display: block;
  background-color: var(--bg-color);
        box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.1);
    }
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: border 0.3s ease, box-shadow 0.3s ease;
}


/* fundo de mapa no hover */
    .island-banner::before {
.wiki-social-wrapper .social-card::before {
        content: "";
  content: "";
        position: absolute;
  position: absolute;
        top: 0;
  inset: 0;
        left: 0;
  background-image: var(--bg-image);
        right: 0;
  background-size: cover;
        bottom: 0;
  background-position: center;
        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%);
  opacity: 0;
        pointer-events: none;
  z-index: 0;
        z-index: 1;
  transition: opacity 0.3s ease;
    }
}


.wiki-social-wrapper .social-card:hover::before {
    .island-banner:hover {
  opacity: 1;
        transform: translateY(-2px);
}
        box-shadow: rgba(0, 0, 0, 0.35) 0px 4px 12px;
    }


.wiki-social-wrapper .social-card:hover {
    .island-banner .island-chests {
  border: 1px solid var(--hover-color);
        position: absolute;
  box-shadow: 0 0 8px var(--hover-color);
        top: 8px;
}
        left: 8px;
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        z-index: 2;
        pointer-events: none;
    }


.wiki-social-wrapper .social-card-content {
    .island-banner .island-chest-group {
  position: relative;
        position: relative;
  z-index: 2;
        display: inline-block;
  display: flex;
    }
  align-items: center;
  padding: 0 1em;
  width: 100%;
  height: 100%;
  color: #fff;
  transition: filter 0.3s ease;
  text-shadow: 0 1px 2px black;
  font-smooth: always;
  -webkit-font-smoothing: antialiased;
  transform: translateZ(0);
}


.wiki-social-wrapper .social-card:hover .social-card-content {
    .island-banner .island-chest-group img {
  filter: brightness(1.2);
        display: block;
}
        width: auto;
        height: auto;
    }


.wiki-social-wrapper .social-icon {
    .island-banner .island-chest-count {
  width: 2em;
    position: absolute;
  height: 2em;
    left: 0;          /* era right: 0 */
  margin-right: 0.75em;
    bottom: 0;
  flex-shrink: 0;
    font-size: 12.5px; /* era 11px */
  filter: drop-shadow(0 1px 1px black);
    font-weight: bold;
  image-rendering: auto;
    color: #fff;
  transform: translateZ(0);
    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;
}
}


.wiki-social-wrapper .social-name {
    .island-banner .island-title {
  font-size: 1.2em;
        position: absolute;
  font-weight: bold;
        bottom: 10px;
  text-decoration: none;
        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;
    }


.wiki-social-wrapper .sprite-hover {
    @media (max-width: 768px) {
  position: absolute;
        .island-grid {
  bottom: -20px;
            flex-direction: column;
  right: -10px;
            align-items: stretch;
  width: 64px;
        }
  height: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 2;
}


.wiki-social-wrapper .social-card:hover .sprite-hover {
        .island-banner {
  opacity: 1;
            width: 100%;
  transform: translateY(-20px);
            max-width: none;
}
        }
 
    }
/* Cores, fundo inicial e imagem de mapa por rede */
.wiki-social-wrapper .social-card.discord {
  --hover-color: rgba(114,137,218,1);
  --bg-color: rgba(114,137,218,0.15);
  --bg-image: url('https://wiki.gla.com.br/images/3/35/Fundodawikiglatest.png');
}
.wiki-social-wrapper .social-card.tiktok {
  --hover-color: rgba(0,0,0,1);
  --bg-color: rgba(0,0,0,0.15);
  --bg-image: url('https://wiki.gla.com.br/images/3/31/Cinza_capriw.png');
}
.wiki-social-wrapper .social-card.instagram {
  --hover-color: rgba(193,53,132,1);
  --bg-color: rgba(193,53,132,0.15);
  --bg-image: url('https://wiki.gla.com.br/images/a/a8/Personagens_card.png');
}
.wiki-social-wrapper .social-card.facebook {
  --hover-color: rgba(24,119,242,1);
  --bg-color: rgba(24,119,242,0.15);
  --bg-image: url('https://wiki.gla.com.br/images/a/a8/Personagens_card.png');
}
</style>
</style>
 
<script>
<div class="social-cards">
    (function () {
 
        function applyBackgrounds() {
<a href="https://discord.gg/grandlineadventures" class="social-card discord" target="_blank" rel="noopener">
            document.querySelectorAll('.island-banner[data-bgimg]').forEach(function (el) {
  <div class="social-card-content">
                var filename = el.getAttribute('data-bgimg');
    <img src="https://cdn.simpleicons.org/Discord/ffffff" alt="Discord" class="social-icon" />
                if (!filename) return;
    <span class="social-name">Discord</span>
                var url;
  </div>
                if (typeof mw !== 'undefined' && mw.util && mw.util.getUrl) {
  <img class="sprite-hover" src="https://wiki.gla.com.br/images/e/ed/Deathstalker.png" alt="sprite">
                    url = mw.util.getUrl('Especial:FilePath/' + filename);
</a>
                } else {
 
                    url = '/index.php?title=Especial:FilePath/' + encodeURIComponent(filename);
<a href="https://tiktok.com/@grandlineadventures" class="social-card tiktok" target="_blank" rel="noopener">
                }
  <div class="social-card-content">
                el.style.backgroundImage = 'url(' + url + ')';
    <img src="https://cdn.simpleicons.org/TikTok/ffffff" alt="TikTok" class="social-icon" />
                el.style.backgroundSize = 'cover';
    <span class="social-name">TikTok</span>
                el.style.backgroundPosition = 'center';
  </div>
                el.style.backgroundRepeat = 'no-repeat';
  <img class="sprite-hover" src="https://wiki.gla.com.br/images/e/ed/Deathstalker.png" alt="sprite">
            });
</a>
        }
 
        function initClickable() {
<a href="https://instagram.com/grandlineadventures" class="social-card instagram" target="_blank" rel="noopener">
            document.querySelectorAll('.island-banner[data-href]').forEach(function (el) {
  <div class="social-card-content">
                if (el._icClick) return;
    <img src="https://cdn.simpleicons.org/Instagram/ffffff" alt="Instagram" class="social-icon" />
                el._icClick = true;
    <span class="social-name">Instagram</span>
                el.setAttribute('role', 'link');
  </div>
                el.setAttribute('tabindex', '0');
  <img class="sprite-hover" src="https://wiki.gla.com.br/images/e/ed/Deathstalker.png" alt="sprite">
                el.addEventListener('click', function () {
</a>
                    var href = el.getAttribute('data-href');
 
                    if (href) window.location.href = href;
<a href="https://facebook.com/grandlineadventures" class="social-card facebook" target="_blank" rel="noopener">
                });
  <div class="social-card-content">
                el.addEventListener('keydown', function (e) {
    <img src="https://cdn.simpleicons.org/Facebook/ffffff" alt="Facebook" class="social-icon" />
                    if (e.key === 'Enter' || e.key === ' ') {
    <span class="social-name">Facebook</span>
                        e.preventDefault();
  </div>
                        var href = el.getAttribute('data-href');
  <img class="sprite-hover" src="https://wiki.gla.com.br/images/e/ed/Deathstalker.png" alt="sprite">
                        if (href) window.location.href = href;
</a>
                    }
 
                });
</div>
            });
</div>
        }
        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>