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

De Wiki Gla
Ir para navegação Ir para pesquisar
m
m
 
(3 revisões intermediárias pelo mesmo usuário não estão sendo mostradas)
Linha 3: Linha 3:
         display: flex;
         display: flex;
         flex-wrap: wrap;
         flex-wrap: wrap;
        justify-content: center;
         gap: 10px;
         gap: 10px;
         padding: 12px 0;
         padding: 12px 0;
        justify-content: center;
     }
     }


     .island-card {
     .island-banner {
         background: #eeeded;
         position: relative;
        width: 380px;
        height: 90px;
        overflow: hidden;
        border-radius: 8px;
         box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 10px;
         box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 10px;
         border-radius: 8px;
         cursor: pointer;
        text-align: center;
        padding: 16px;
        width: min-content;
        min-width: 0;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
         transition: transform 0.15s, box-shadow 0.15s;
         transition: transform 0.15s, box-shadow 0.15s;
        color: inherit;
        cursor: pointer;
    }
    .island-card:hover {
        transform: translateY(-2px);
        box-shadow: rgba(0, 0, 0, 0.35) 0px 4px 12px;
    }
    .island-card:visited {
        color: inherit;
    }
    .island-card .island-img {
         display: block;
         display: block;
         line-height: 0;
         box-sizing: border-box;
     }
     }


     .island-card .island-img img {
     .island-banner::before {
         display: block;
         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;
         pointer-events: none;
        z-index: 1;
     }
     }


     .island-card .island-name {
     .island-banner:hover {
         font-size: 0.9em;
         transform: translateY(-2px);
        font-weight: bold;
         box-shadow: rgba(0, 0, 0, 0.35) 0px 4px 12px;
         color: #000;
        pointer-events: none;
        line-height: 1.2;
        word-break: break-word;
     }
     }


     .island-card .island-chests {
     .island-banner .island-chests {
        position: absolute;
        top: 8px;
        left: 8px;
         display: flex;
         display: flex;
         align-items: flex-end;
         flex-wrap: wrap;
         justify-content: center;
         gap: 6px;
         gap: 8px;
         z-index: 2;
         pointer-events: none;
         pointer-events: none;
     }
     }


     .island-card .island-chest-group {
     .island-banner .island-chest-group {
         position: relative;
         position: relative;
         display: inline-block;
         display: inline-block;
     }
     }


     .island-card .island-chest-group img {
     .island-banner .island-chest-group img {
         display: block;
         display: block;
        width: auto;
        height: auto;
     }
     }


     /* Quantidade no canto da imagem do baú (estilo itemdata) */
     .island-banner .island-chest-count {
     .island-card .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;
         position: absolute;
         right: 0;
         bottom: 10px;
         bottom: 0;
         left: 8px;
         font-size: 11px;
         font-size: 1.35em;
         font-weight: bold;
         font-weight: bold;
         color: #fff;
         color: #fff;
         background: rgba(0, 0, 0, 0.75);
         text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8), 0 2px 4px rgba(0, 0, 0, 0.5);
        padding: 1px 3px;
         line-height: 1.2;
        border-radius: 3px;
         z-index: 2;
         line-height: 1;
         pointer-events: none;
         white-space: nowrap;
         text-transform: uppercase;
         box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
         z-index: 10;
     }
     }


     @media (max-width: 600px) {
     @media (max-width: 768px) {
         .island-card {
         .island-grid {
             padding: 12px;
             flex-direction: column;
        }
             align-items: stretch;
 
        .island-card .island-name {
             font-size: 0.9em;
         }
         }


         .island-card .island-chest-count {
         .island-banner {
             font-size: 10px;
             width: 100%;
             padding: 0 2px;
             max-width: none;
         }
         }
     }
     }
Linha 105: Linha 104:
<script>
<script>
     (function () {
     (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() {
         function initClickable() {
             document.querySelectorAll('.island-card[data-href]').forEach(function (el) {
             document.querySelectorAll('.island-banner[data-href]').forEach(function (el) {
                 if (el._icClick) return;
                 if (el._icClick) return;
                 el._icClick = true;
                 el._icClick = true;
                el.setAttribute('role', 'link');
                el.setAttribute('tabindex', '0');
                 el.addEventListener('click', function () {
                 el.addEventListener('click', function () {
                     var href = el.getAttribute('data-href');
                     var href = el.getAttribute('data-href');
Linha 121: Linha 138:
                 });
                 });
             });
             });
        }
        function run() {
            applyBackgrounds();
            initClickable();
         }
         }
         if (document.readyState === 'loading') {
         if (document.readyState === 'loading') {
             document.addEventListener('DOMContentLoaded', initClickable);
             document.addEventListener('DOMContentLoaded', run);
         } else {
         } else {
             initClickable();
             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>