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

De Wiki Gla
Ir para navegação Ir para pesquisar
m
Etiqueta: Revertido
m
 
(193 revisões intermediárias por 3 usuários não estão sendo mostradas)
Linha 1: Linha 1:
<script>
<style>
(function() {
    .island-grid {
    // Seletores das skills
        display: flex;
    const skillIcons = document.querySelectorAll('.character-skillicon');
        flex-wrap: wrap;
    const descDiv = document.querySelector('.character-skilldesc');
        justify-content: center;
     const videoDiv = document.querySelector('.character-skillvideo');
        gap: 10px;
        padding: 12px 0;
     }


     function showSkill(el) {
     .island-banner {
         descDiv.innerHTML =
         position: relative;
            '<h3>' + (el.dataset.nome || '') + '</h3>' +
        width: 380px;
            (el.dataset.atr ? '<div class="character-attr"><b>Atributos:</b> ' + el.dataset.atr + '</div>' : '') +
        height: 90px;
            '<div class="character-skilltext">' + (el.dataset.desc || '') + '</div>';
        overflow: hidden;
         if (el.dataset.video) {
        border-radius: 8px;
            videoDiv.innerHTML = '<video src="' + el.dataset.video + '" controls playsinline></video>';
         box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 10px;
         } else {
        cursor: pointer;
            videoDiv.innerHTML = '<div style="color:#aaa; font-size:1.3em; text-align:center; padding-top:30px;">SEM VÍDEO</div>';
         transition: transform 0.15s, box-shadow 0.15s;
        }
        display: block;
        box-sizing: border-box;
     }
     }


     skillIcons.forEach(function(el, idx) {
     .island-banner::before {
         el.addEventListener('click', function() {
         content: "";
            skillIcons.forEach(e => e.classList.remove('active'));
        position: absolute;
            el.classList.add('active');
        top: 0;
            showSkill(el);
        left: 0;
         });
        right: 0;
         if(idx === 0) {
         bottom: 0;
            el.classList.add('active');
         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%);
            showSkill(el);
        pointer-events: none;
         }
         z-index: 1;
     });
     }
})();
</script>


<style>
    .island-banner:hover {
.character-box {
        transform: translateY(-2px);
    max-width: 1080px;
        box-shadow: rgba(0, 0, 0, 0.35) 0px 4px 12px;
    margin: 36px auto 0 auto;
     }
    font-family: 'Noto Sans', Arial, sans-serif;
    color: #222;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(80,80,80,0.07);
     padding: 0 20px 28px 20px;
    box-sizing: border-box;
}


.character-header {
    .island-banner .island-chests {
    display: flex;
        position: absolute;
    align-items: flex-start;
        top: 8px;
    gap: 18px;
        left: 8px;
    margin-bottom: 12px;
        display: flex;
    padding-top: 18px;
        flex-wrap: wrap;
}
        gap: 6px;
        z-index: 2;
        pointer-events: none;
    }


.character-icon {
    .island-banner .island-chest-group {
    width: 94px;
        position: relative;
    height: 94px;
        display: inline-block;
    border-radius: 10px;
     }
    object-fit: cover;
     border: 2px solid #e2e8f0;
    background: #fff;
}


.character-header-main {
    .island-banner .island-chest-group img {
    flex: 1;
        display: block;
    display: flex;
        width: auto;
    flex-direction: column;
        height: auto;
    justify-content: flex-start;
     }
     gap: 3px;
}


.character-name {
    .island-banner .island-chest-count {
     font-size: 2.6em;
    position: absolute;
     font-weight: 900;
    left: 0;          /* era right: 0 */
     margin: 0 0 2px 0;
    bottom: 0;
     letter-spacing: 0.01em;
     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;
     line-height: 1;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    z-index: 10;
}
}


.character-classes {
    .island-banner .island-title {
    display: flex;
        position: absolute;
    align-items: center;
        bottom: 10px;
    gap: 11px;
        left: 8px;
    margin-bottom: 3px;
        font-size: 1.35em;
    flex-wrap: wrap;
        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;
    }


.character-class {
     @media (max-width: 768px) {
    display: inline-block;
        .island-grid {
     font-size: 1em;
            flex-direction: column;
    font-weight: 600;
            align-items: stretch;
    background: #f5f6fa;
        }
    border-radius: 5px;
    padding: 3px 13px;
    border: 1.1px solid #d8e0f0;
    color: #184e73;
    margin-right: 2px;
}


.character-desc {
        .island-banner {
    font-size: 1.09em;
            width: 100%;
    margin: 10px 0 0 0;
            max-width: none;
    color: #454545;
         }
    line-height: 1.35;
    font-weight: 500;
    background: #f0f7fb;
    border-radius: 6px;
    padding: 7px 12px;
    display: inline-block;
}
 
.character-skillbar {
    display: flex;
    gap: 13px;
    margin: 30px 0 15px 0;
    overflow-x: auto;
    padding-bottom: 7px;
    border-bottom: 2.5px solid #e5e7eb;
    scrollbar-width: thin;
}
 
.character-skillicon {
    width: 49px;
    height: 49px;
    border-radius: 8px;
    border: 1.7px solid #e5e7eb;
    background: #f9f9f9;
    cursor: pointer;
    transition: border-color 0.14s, box-shadow 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    flex-shrink: 0;
    box-shadow: 0 0 0 0 #fff0;
}
.character-skillicon.active,
.character-skillicon:focus,
.character-skillicon:hover {
    border-color: #3ec8ff;
    box-shadow: 0 0 0 2px #c8eafd;
}
 
.character-skillicon img {
    width: 43px;
    height: 43px;
    border-radius: 6px;
    object-fit: cover;
    box-shadow: 0 1px 5px #0001;
    pointer-events: none;
}
 
.character-content {
    display: flex;
    gap: 34px;
    align-items: flex-start;
    min-height: 270px;
    margin-top: 15px;
}
 
.character-skilldesc {
    flex: 1.3;
    background: #f8fafb;
    border-radius: 10px;
    padding: 16px 18px 12px 18px;
    min-width: 240px;
    min-height: 155px;
    color: #223;
    box-shadow: 0 0 0 1px #e3e7eb;
}
 
.character-skilldesc h3 {
    font-size: 1.22em;
    font-weight: 700;
    margin: 0 0 6px 0;
    color: #2175c2;
}
 
.character-skilldesc .character-attr {
    font-size: 1.01em;
    margin-bottom: 7px;
    color: #2a72af;
    font-weight: 600;
}
 
.character-skilldesc .character-skilltext {
    font-size: 1.09em;
    margin-top: 7px;
    color: #21262b;
    line-height: 1.36;
}
 
.character-skillvideo {
    flex: 1;
    min-width: 220px;
    max-width: 390px;
    min-height: 115px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    background: #fafcff;
    border-radius: 10px;
    box-shadow: 0 0 0 1px #e3e7eb;
    padding: 12px;
}
 
.character-skillvideo video {
    width: 100%;
    max-width: 370px;
    border-radius: 7px;
    background: #222;
}
 
@media (max-width: 860px) {
    .character-header {
        flex-direction: column;
        align-items: flex-start;
         gap: 13px;
    }
    .character-content {
        flex-direction: column;
        gap: 18px;
    }
    .character-skillvideo {
        max-width: 100%;
     }
     }
    .character-name {
        font-size: 2.1em;
    }
}
@media (max-width: 570px) {
    .character-box {
        padding: 0 5px 18px 5px;
    }
    .character-skillbar {
        gap: 8px;
    }
    .character-header {
        gap: 7px;
    }
    .character-skilldesc {
        padding: 9px 6px 7px 9px;
    }
    .character-name {
        font-size: 1.5em;
    }
}
</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>