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

De Wiki Gla
Ir para navegação Ir para pesquisar
m
 
(263 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>
     .island-grid {
     .wiki-social-wrapper .social-cards {
        display: flex;
      display: grid;
        flex-wrap: wrap;
      grid-template-columns: 1fr;
        justify-content: center;
      gap: 0.25em;
        gap: 10px;
        padding: 12px 0;
     }
     }


     @media screen and (max-width: 1024px) {
     .island-banner {
      .wiki-social-wrapper .social-cards {
        position: relative;
         grid-template-columns: repeat(2, 1fr);
        width: 380px;
         gap: 0.5em;
        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;
     }
     }


     .wiki-social-wrapper .social-card {
     .island-banner::before {
      position: relative;
        content: "";
      height: 4em;
        position: absolute;
      border-radius: 0.75em;
        top: 0;
      overflow: hidden;
        left: 0;
      cursor: pointer;
        right: 0;
      margin: 0;
        bottom: 0;
      text-decoration: none;
        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%);
      --overlay-color: rgba(30,144,255,0.6);
        pointer-events: none;
        z-index: 1;
     }
     }


     .wiki-social-wrapper .social-card::before {
     .island-banner:hover {
      content: "";
        transform: translateY(-2px);
      position: absolute;
        box-shadow: rgba(0, 0, 0, 0.35) 0px 4px 12px;
      inset: 0;
      background-image: var(--bg-url);
      background-size: cover;
      background-position: center;
      filter: blur(1px) brightness(0.8);
      transform: scale(1.05);
      z-index: 0;
     }
     }


     .wiki-social-wrapper .social-card::after {
     .island-banner .island-chests {
      content: "";
        position: absolute;
      position: absolute;
        top: 8px;
      inset: 0;
        left: 8px;
      background-color: var(--overlay-color);
        display: flex;
      z-index: 1;
        flex-wrap: wrap;
      transition: background-color 0.3s ease;
        gap: 6px;
        z-index: 2;
        pointer-events: none;
     }
     }


     .wiki-social-wrapper .social-card:hover::after {
     .island-banner .island-chest-group {
      background-color: var(--hover-color);
        position: relative;
        display: inline-block;
     }
     }


     .wiki-social-wrapper .social-card-content {
     .island-banner .island-chest-group img {
      position: relative;
        display: block;
      z-index: 2;
        width: auto;
      display: flex;
        height: auto;
      align-items: center;
      padding: 0 1em;
      height: 100%;
      color: #fff;
      transition: filter 0.3s ease;
     }
     }


     .wiki-social-wrapper .social-card:hover .social-card-content {
     .island-banner .island-chest-count {
      filter: brightness(1.1);
    position: absolute;
     }
    left: 0;          /* era right: 0 */
 
    bottom: 0;
     .wiki-social-wrapper .social-icon {
    font-size: 12.5px;  /* era 11px */
      width: 2em;
    font-weight: bold;
      height: 2em;
    color: #fff;
      margin-right: 0.75em;
    background: rgba(0, 0, 0, 0.75);
      flex-shrink: 0;
     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.25em;
        position: absolute;
      line-height: 1;
        bottom: 10px;
      font-weight: bold;
        left: 8px;
      text-decoration: none;
        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;
     }
     }


     /* Sprite que aparece ao passar o mouse */
     @media (max-width: 768px) {
    .wiki-social-wrapper .sprite-hover {
        .island-grid {
      position: absolute;
            flex-direction: column;
      bottom: -20px;
            align-items: stretch;
      right: -10px;
        }
      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;
        }
     }
     }
 
</style>
     /* URLs e cores por rede */
<script>
    .wiki-social-wrapper .social-card.discord {
     (function () {
      --bg-url: url('https://i.imgur.com/cbUqsXp.png');
        function applyBackgrounds() {
      --hover-color: rgba(114,137,218,0.85);
            document.querySelectorAll('.island-banner[data-bgimg]').forEach(function (el) {
    }
                var filename = el.getAttribute('data-bgimg');
    .wiki-social-wrapper .social-card.tiktok {
                if (!filename) return;
      --bg-url: url('https://i.imgur.com/cbUqsXp.png');
                var url;
      --hover-color: rgba(0,0,0,0.85);
                if (typeof mw !== 'undefined' && mw.util && mw.util.getUrl) {
    }
                    url = mw.util.getUrl('Especial:FilePath/' + filename);
    .wiki-social-wrapper .social-card.instagram {
                } else {
      --bg-url: url('https://i.imgur.com/cbUqsXp.png');
                    url = '/index.php?title=Especial:FilePath/' + encodeURIComponent(filename);
      --hover-color: rgba(193,53,132,0.85);
                }
    }
                el.style.backgroundImage = 'url(' + url + ')';
    .wiki-social-wrapper .social-card.facebook {
                el.style.backgroundSize = 'cover';
      --bg-url: url('https://i.imgur.com/cbUqsXp.png');
                el.style.backgroundPosition = 'center';
      --hover-color: rgba(24,119,242,0.85);
                el.style.backgroundRepeat = 'no-repeat';
    }
            });
  </style>
        }
 
        function initClickable() {
  <div class="social-cards">
            document.querySelectorAll('.island-banner[data-href]').forEach(function (el) {
    <a href="https://discord.gg/SEULINK" class="social-card discord" target="_blank" rel="noopener">
                if (el._icClick) return;
      <div class="social-card-content">
                el._icClick = true;
        <img src="https://cdn.simpleicons.org/Discord/ffffff" alt="Discord" class="social-icon"/>
                el.setAttribute('role', 'link');
        <span class="social-name">Discord</span>
                el.setAttribute('tabindex', '0');
      </div>
                el.addEventListener('click', function () {
      <img class="sprite-hover" src="https://wiki.gla.com.br/images/thumb/a/a0/DiscordSprite.png/64px-DiscordSprite.png" alt="">
                    var href = el.getAttribute('data-href');
    </a>
                    if (href) window.location.href = href;
 
                });
    <a href="https://tiktok.com/@SEUTIKTOK" class="social-card tiktok" target="_blank" rel="noopener">
                el.addEventListener('keydown', function (e) {
      <div class="social-card-content">
                    if (e.key === 'Enter' || e.key === ' ') {
        <img src="https://cdn.simpleicons.org/TikTok/ffffff" alt="TikTok" class="social-icon"/>
                        e.preventDefault();
        <span class="social-name">TikTok</span>
                        var href = el.getAttribute('data-href');
      </div>
                        if (href) window.location.href = href;
      <img class="sprite-hover" src="https://wiki.gla.com.br/images/thumb/3/3a/TiktokSprite.png/64px-TiktokSprite.png" alt="">
                    }
    </a>
                });
 
            });
    <a href="https://instagram.com/SEUINS" class="social-card instagram" target="_blank" rel="noopener">
         }
      <div class="social-card-content">
         function run() {
         <img src="https://cdn.simpleicons.org/Instagram/ffffff" alt="Instagram" class="social-icon"/>
            applyBackgrounds();
         <span class="social-name">Instagram</span>
            initClickable();
      </div>
        }
      <img class="sprite-hover" src="https://wiki.gla.com.br/images/thumb/f/fc/InstagramSprite.png/64px-InstagramSprite.png" alt="">
        if (document.readyState === 'loading') {
    </a>
            document.addEventListener('DOMContentLoaded', run);
 
         } else {
    <a href="https://facebook.com/SEUPAGE" class="social-card facebook" target="_blank" rel="noopener">
            run();
      <div class="social-card-content">
        }
        <img src="https://cdn.simpleicons.org/Facebook/ffffff" alt="Facebook" class="social-icon"/>
     })();
         <span class="social-name">Facebook</span>
</script>
      </div>
      <img class="sprite-hover" src="https://wiki.gla.com.br/images/thumb/7/7d/FacebookSprite.png/64px-FacebookSprite.png" alt="">
     </a>
  </div>
</div>

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>