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

De Wiki Gla
Ir para navegação Ir para pesquisar
m
Etiqueta: Revertido
m
Etiqueta: Revertido
Linha 1: Linha 1:
<style>
.character-box {
    max-width: 720px; margin: 24px auto; border: 2px solid #222; border-radius: 12px;
    background: #1e2327; box-shadow: 0 2px 12px #0007; padding: 24px 32px; color: #f3f3f3;
    font-family: 'Noto Sans', Arial, sans-serif;
}
.character-header { display: flex; align-items: center; gap: 20px; }
.character-img { width: 104px; height: 104px; border-radius: 10px; object-fit: cover; border: 2px solid #555; background: #111; box-shadow: 0 2px 6px #0007; }
.character-header-main { flex: 1; }
.character-name { font-size: 2.3em; font-weight: 900; margin: 0 0 2px 0; }
.character-tier { font-size: 1.1em; color: #85d6ff; font-weight: 700; margin-bottom: 6px; }
.character-class { font-size: 1em; color: #b8bac1; margin-bottom: 6px; }
.character-desc { font-size: 1.05em; margin-bottom: 16px; color: #f5e9c6; background: #24282d; border-radius: 6px; padding: 7px 14px; }
.tabs-bar { display: flex; gap: 8px; margin-bottom: 20px; }
.tab-btn { padding: 7px 24px; border: none; border-radius: 6px 6px 0 0; background: #23272d; color: #fff; font-size: 1.15em; font-weight: 600; cursor: pointer; transition: background 0.15s; }
.tab-btn.active { background: #4a92e6; color: #fff; }
.tab-content { display: none; padding: 18px 0; border-top: 2px solid #333; }
.tab-content.active { display: flex; gap: 32px; }
.skills-bar { display: flex; gap: 10px; margin-bottom: 14px; overflow-x: auto; padding-bottom: 6px; }
.skill-icon { width: 56px; height: 56px; background: #202429; border: 2px solid #363b45; border-radius: 8px; cursor: pointer; transition: border-color 0.2s, box-shadow 0.2s; display: flex; align-items: center; justify-content: center; }
.skill-icon.active, .skill-icon:hover { border-color: #71e4fa; box-shadow: 0 0 8px #58e1ff60; }
.skill-detail { flex: 1.3; background: #23272d; border-radius: 8px; padding: 16px 18px; margin-bottom: 8px; min-height: 180px; }
.skill-detail h3 { font-size: 1.4em; margin: 0 0 10px 0; color: #58bfff; }
.skill-detail p { margin: 7px 0 0 0; font-size: 1.05em; }
.skill-video { flex: 1; display: flex; align-items: center; justify-content: center; background: #181a1d; border-radius: 8px; padding: 8px; min-width: 220px; max-width: 350px; min-height: 120px; }
.skin-bar { display: flex; gap: 18px; margin: 8px 0; overflow-x: auto; padding-bottom: 10px; }
.skin-card { min-width: 110px; max-width: 140px; border-radius: 8px; background: #24282d; border: 2px solid #474e58; padding: 4px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.skin-banner { width: 100%; height: 54px; border-radius: 5px; object-fit: cover; margin-bottom: 5px; background: #111; box-shadow: 0 1px 5px #0005; }
.skin-card img { border-radius: 5px; max-width: 98px; max-height: 92px; background: #232323; }
.skin-card[title] { cursor: pointer; }
@media (max-width: 650px) {
    .character-box { padding: 8px; }
    .character-header { flex-direction: column; gap: 8px; }
    .tab-content.active { flex-direction: column; gap: 12px; }
    .skin-bar { gap: 8px; }
}
</style>
<script>
<script>
(function() {
(function() {
     // Tabs
     // Seletores das skills
     var tabs = document.querySelectorAll('.tab-btn');
     const skillIcons = document.querySelectorAll('.character-skillicon');
     var contents = document.querySelectorAll('.tab-content');
     const descDiv = document.querySelector('.character-skilldesc');
     tabs.forEach(function(tab){
     const videoDiv = document.querySelector('.character-skillvideo');
        tab.addEventListener('click', function(){
            tabs.forEach(t => t.classList.remove('active'));
            contents.forEach(c => c.classList.remove('active'));
            tab.classList.add('active');
            document.getElementById('tab-' + tab.dataset.tab).classList.add('active');
        });
    });


    // Skills
     function showSkill(el) {
    var skillIcons = document.querySelectorAll('.skills-bar .skill-icon');
         descDiv.innerHTML =
    var details = document.querySelector('.skill-detail');
    var videoDiv = document.querySelector('.skill-video');
     function showSkill(el){
         details.innerHTML =
             '<h3>' + (el.dataset.nome || '') + '</h3>' +
             '<h3>' + (el.dataset.nome || '') + '</h3>' +
             (el.dataset.atr ? '<div style="font-size:0.98em; color:#c4e5ff; margin-bottom:5px"><b>Atributos:</b> ' + el.dataset.atr + '</div>' : '') +
             (el.dataset.atr ? '<div class="character-attr"><b>Atributos:</b> ' + el.dataset.atr + '</div>' : '') +
             '<p>' + (el.dataset.desc || '') + '</p>';
             '<div class="character-skilltext">' + (el.dataset.desc || '') + '</div>';
         if(el.dataset.video){
         if (el.dataset.video) {
             videoDiv.innerHTML = '<video src="' + el.dataset.video + '" controls width="300" style="margin-top:10px"></video>';
             videoDiv.innerHTML = '<video src="' + el.dataset.video + '" controls playsinline></video>';
         } else {
         } else {
             videoDiv.innerHTML = '';
             videoDiv.innerHTML = '<div style="color:#aaa; font-size:1.3em; text-align:center; padding-top:30px;">SEM VÍDEO</div>';
         }
         }
     }
     }
     skillIcons.forEach(function(el, idx){
 
         el.addEventListener('click', function(){
     skillIcons.forEach(function(el, idx) {
         el.addEventListener('click', function() {
             skillIcons.forEach(e => e.classList.remove('active'));
             skillIcons.forEach(e => e.classList.remove('active'));
             el.classList.add('active');
             el.classList.add('active');
Linha 78: Linha 31:
})();
})();
</script>
</script>
<style>
.character-box {
    max-width: 1080px;
    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 {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 12px;
    padding-top: 18px;
}
.character-icon {
    width: 94px;
    height: 94px;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid #e2e8f0;
    background: #fff;
}
.character-header-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 3px;
}
.character-name {
    font-size: 2.6em;
    font-weight: 900;
    margin: 0 0 2px 0;
    letter-spacing: 0.01em;
    line-height: 1;
}
.character-classes {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 3px;
    flex-wrap: wrap;
}
.character-class {
    display: inline-block;
    font-size: 1em;
    font-weight: 600;
    background: #f5f6fa;
    border-radius: 5px;
    padding: 3px 13px;
    border: 1.1px solid #d8e0f0;
    color: #184e73;
    margin-right: 2px;
}
.character-desc {
    font-size: 1.09em;
    margin: 10px 0 0 0;
    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>

Edição das 16h53min de 8 de agosto de 2025

<script> (function() {

   // Seletores das skills
   const skillIcons = document.querySelectorAll('.character-skillicon');
   const descDiv = document.querySelector('.character-skilldesc');
   const videoDiv = document.querySelector('.character-skillvideo');
   function showSkill(el) {
       descDiv.innerHTML =

'

' + (el.dataset.nome || ) + '

' + (el.dataset.atr ? '

Atributos: ' + el.dataset.atr + '

' : ) + '

' + (el.dataset.desc || ) + '

';

       if (el.dataset.video) {
           videoDiv.innerHTML = '<video src="' + el.dataset.video + '" controls playsinline></video>';
       } else {

videoDiv.innerHTML = '

SEM VÍDEO

';

       }
   }
   skillIcons.forEach(function(el, idx) {
       el.addEventListener('click', function() {
           skillIcons.forEach(e => e.classList.remove('active'));
           el.classList.add('active');
           showSkill(el);
       });
       if(idx === 0) {
           el.classList.add('active');
           showSkill(el);
       }
   });

})(); </script>

<style> .character-box {

   max-width: 1080px;
   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 {

   display: flex;
   align-items: flex-start;
   gap: 18px;
   margin-bottom: 12px;
   padding-top: 18px;

}

.character-icon {

   width: 94px;
   height: 94px;
   border-radius: 10px;
   object-fit: cover;
   border: 2px solid #e2e8f0;
   background: #fff;

}

.character-header-main {

   flex: 1;
   display: flex;
   flex-direction: column;
   justify-content: flex-start;
   gap: 3px;

}

.character-name {

   font-size: 2.6em;
   font-weight: 900;
   margin: 0 0 2px 0;
   letter-spacing: 0.01em;
   line-height: 1;

}

.character-classes {

   display: flex;
   align-items: center;
   gap: 11px;
   margin-bottom: 3px;
   flex-wrap: wrap;

}

.character-class {

   display: inline-block;
   font-size: 1em;
   font-weight: 600;
   background: #f5f6fa;
   border-radius: 5px;
   padding: 3px 13px;
   border: 1.1px solid #d8e0f0;
   color: #184e73;
   margin-right: 2px;

}

.character-desc {

   font-size: 1.09em;
   margin: 10px 0 0 0;
   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>