Mudanças entre as edições de "Widget:Conquistas"
Ir para navegação
Ir para pesquisar
m |
m |
||
| Linha 101: | Linha 101: | ||
<style> | <style> | ||
.gla-conquistas-root { | |||
--gla-ink: #1a1a1a; | |||
--gla-ink-2: #3a3a3a; | |||
--gla-dim: #8a8378; | |||
--gla-dim-2: #b8b0a0; | |||
--gla-gold: #b8923f; | |||
--gla-gold-soft: #d9b96b; | |||
--gla-gold-bg: #f4ead0; | |||
--gla-paper: #f8f5ed; | |||
--gla-paper-2: #efeadc; | |||
--gla-rule: #c9c0ad; | |||
--gla-spoiler-bg: #fdfaf2; | |||
--gla-shadow: 3px 3px 0 var(--gla-ink); | |||
} | |||
.gla-conquistas-headerbox { | .gla-conquistas-headerbox { | ||
margin: 0 0 20px; | margin: 0 0 20px; | ||
padding: | padding: 0; | ||
background: transparent; | |||
border: none; | |||
border: | border-radius: 0; | ||
} | } | ||
.gla-conquistas-header | .gla-conquistas-header { | ||
display: none; | |||
} | } | ||
.gla-conquistas-toolbar { | .gla-conquistas-toolbar { | ||
display: | display: block; | ||
width: 100%; | |||
} | } | ||
| Linha 132: | Linha 136: | ||
display: flex; | display: flex; | ||
flex-wrap: wrap; | flex-wrap: wrap; | ||
gap: 6px; | gap: 0; | ||
padding: 0 6px; | |||
position: relative; | |||
z-index: 2; | |||
margin-bottom: 0; | |||
} | } | ||
.gla-conquistas-tab { | .gla-conquistas-tab { | ||
font-size: 13px; | |||
padding: | font-weight: 600; | ||
border- | padding: 8px 16px 10px; | ||
border: | border: 2px solid var(--gla-ink); | ||
background: | border-bottom: none; | ||
border-radius: 10px 10px 0 0; | |||
background: var(--gla-paper-2); | |||
color: var(--gla-dim); | |||
margin: 0 -2px 0 0; | |||
position: relative; | |||
top: 2px; | |||
cursor: pointer; | cursor: pointer; | ||
transition: background 0.15s, color 0.15s; | |||
} | } | ||
.gla-conquistas-tab:hover { | .gla-conquistas-tab:hover { | ||
background: | background: var(--gla-paper); | ||
color: var(--gla-ink); | |||
color: | |||
} | } | ||
.gla-conquistas-tab.is-active { | .gla-conquistas-tab.is-active { | ||
background | background: #fff; | ||
color: var(--gla-ink); | |||
z-index: 2; | |||
font-weight: 700; | |||
box-shadow: inset 0 -3px 0 var(--gla-gold); | |||
} | } | ||
.gla-conquistas-controls { | .gla-conquistas-controls { | ||
display: flex; | display: flex; | ||
| Linha 272: | Linha 177: | ||
gap: 10px; | gap: 10px; | ||
flex-wrap: wrap; | flex-wrap: wrap; | ||
margin-top: | margin-top: 0; | ||
width: 100%; | width: 100%; | ||
box-sizing: border-box; | box-sizing: border-box; | ||
background: #fff; | |||
border: 2px solid var(--gla-ink); | |||
border-radius: 0 12px 12px 12px; | |||
box-shadow: var(--gla-shadow); | |||
padding: 14px 18px 16px; | |||
position: relative; | |||
z-index: 1; | |||
} | } | ||
.gla-conquistas-search { | .gla-conquistas-search { | ||
flex: 1 1 auto; | flex: 1 1 auto; | ||
min-width: 160px; | |||
min-width: | padding: 8px 16px; | ||
border: 1.5px solid var(--gla-ink); | |||
padding: | |||
border: | |||
border-radius: 999px; | border-radius: 999px; | ||
font-size: 13px; | font-size: 13px; | ||
background: #fff; | |||
color: var(--gla-ink); | |||
outline: none; | outline: none; | ||
font-family: inherit; | font-family: inherit; | ||
transition: box-shadow 0.15s; | |||
} | } | ||
.gla-conquistas-search:focus { | .gla-conquistas-search:focus { | ||
box-shadow: 0 0 0 3px var(--gla-gold-bg); | |||
border-color: var(--gla-gold); | |||
} | } | ||
| Linha 304: | Linha 215: | ||
.gla-conquistas-filter { | .gla-conquistas-filter { | ||
padding: 5px 14px; | |||
border: 1.5px solid var(--gla-ink); | |||
border-radius: 999px; | border-radius: 999px; | ||
background: #fff; | |||
background: # | |||
font-size: 12px; | font-size: 12px; | ||
font-weight: 600; | font-weight: 600; | ||
color: | color: var(--gla-ink); | ||
cursor: pointer; | |||
transition: all 0.15s; | |||
} | } | ||
.gla-conquistas-filter:hover { | .gla-conquistas-filter:hover { | ||
background: | background: var(--gla-paper-2); | ||
} | } | ||
.gla-conquistas-filter.is-active { | .gla-conquistas-filter.is-active { | ||
background: | background: var(--gla-gold); | ||
color: #fff; | color: #fff; | ||
border-color: | border-color: var(--gla-ink); | ||
} | |||
.gla-conquistas-panel { | |||
margin: 14px 0 0; | |||
display: none; | |||
} | |||
.gla-conquistas-panel.is-active { | |||
display: block; | |||
} | |||
.gla-conquistas-source { | |||
display: none; | |||
} | } | ||
.gla-list { | |||
.gla- | display: flex; | ||
.gla-item | flex-direction: column; | ||
gap: 12px; | |||
background: # | } | ||
.gla-item { | |||
display: flex; | |||
flex-direction: column; | |||
background: #fff; | |||
border: 2px solid var(--gla-ink); | |||
border-radius: 14px; | |||
box-shadow: var(--gla-shadow); | |||
transition: box-shadow 0.15s, transform 0.15s; | |||
} | } | ||
.gla-item. | .gla-item.has-spoiler:hover { | ||
box-shadow: 4px 4px 0 var(--gla-gold); | |||
transform: translate(-1px, -1px); | |||
} | } | ||
.gla-item | .gla-item-main { | ||
display: flex; | |||
align-items: center; | |||
gap: 18px; | |||
padding: 18px 16px 18px 20px; | |||
min-height: 88px; | |||
} | } | ||
.gla-item-left { | .gla-item-left { | ||
display: flex; | display: flex; | ||
align-items: center; | align-items: center; | ||
gap: | gap: 16px; | ||
flex: 1; | flex: 1; | ||
min-width: 0; | min-width: 0; | ||
padding-right: 14px; | |||
border-right: 1.5px dashed var(--gla-rule); | |||
} | |||
.gla-item-icon { | |||
flex: 0 0 80px; | |||
display: flex; | |||
align-items: center; | |||
justify-content: center; | |||
} | } | ||
.gla-item-icon img { | .gla-item-icon img { | ||
width: 80px; | |||
height: 80px; | |||
object-fit: contain; | object-fit: contain; | ||
border: none !important; | border: none !important; | ||
| Linha 360: | Linha 303: | ||
background: none !important; | background: none !important; | ||
box-shadow: none !important; | box-shadow: none !important; | ||
display: block; | |||
} | } | ||
.gla-item-title { | .gla-item-title { | ||
font-size: 20px; | |||
font-weight: 700; | font-weight: 700; | ||
color: var(--gla-ink); | |||
line-height: 1.15; | |||
} | } | ||
.gla-item-desc { | .gla-item-desc { | ||
font-size: | font-size: 14px; | ||
color: | color: var(--gla-ink-2); | ||
margin-top: | margin-top: 4px; | ||
line-height: 1.4; | |||
} | } | ||
.gla-item-reward { | .gla-item-reward { | ||
flex-shrink: 0; | flex-shrink: 0; | ||
display: flex; | display: flex; | ||
flex-direction: column; | flex-direction: column; | ||
align-items: center; | align-items: center; | ||
gap: 6px; | gap: 6px; | ||
padding: | padding: 10px 14px; | ||
background: var(--gla-gold-bg); | |||
border: 1.5px dashed var(--gla-gold); | |||
border-radius: 14px; | |||
max-width: 260px; | |||
min-width: 170px; | |||
} | } | ||
.gla-item-reward-label { | .gla-item-reward-label { | ||
font-size: 11px; | |||
font-weight: 700; | |||
letter-spacing: 0.18em; | |||
text-transform: uppercase; | |||
color: var(--gla-gold); | |||
white-space: nowrap; | |||
} | |||
.gla-item-spoiler-toggle { | |||
display: inline-flex; | |||
align-items: center; | |||
gap: 6px; | |||
margin-left: auto; | |||
border: 1.5px solid var(--gla-ink); | |||
background: #fff; | |||
border-radius: 999px; | |||
padding: 6px 10px; | |||
font: inherit; | |||
color: var(--gla-ink); | |||
cursor: pointer; | |||
transition: background 0.15s; | |||
} | |||
.gla-item-spoiler-toggle:hover { | |||
background: var(--gla-paper-2); | |||
} | |||
.gla-item-spoiler-text { | |||
font-size: 12px; | font-size: 12px; | ||
font-weight: 700; | font-weight: 700; | ||
letter-spacing: . | letter-spacing: 0.04em; | ||
text-transform: uppercase; | text-transform: uppercase; | ||
} | } | ||
.gla-item.is- | .gla-item-chevron { | ||
.gla-item | font-size: 20px; | ||
color: | color: var(--gla-gold); | ||
line-height: 1; | |||
flex-shrink: 0; | |||
transition: transform 0.2s ease; | |||
user-select: none; | |||
} | |||
.gla-item.has-spoiler.is-open .gla-item-chevron { | |||
transform: rotate(90deg); | |||
} | |||
.gla-item-spoiler { | |||
display: none; | |||
border-top: 1.5px dashed var(--gla-rule); | |||
background: var(--gla-spoiler-bg); | |||
padding: 16px 20px 18px; | |||
gap: 18px; | |||
flex-direction: row; | |||
align-items: flex-start; | |||
border-radius: 0 0 12px 12px; | |||
} | |||
.gla-item.is-open .gla-item-spoiler { | |||
display: flex; | |||
animation: gla-spoiler-in 0.25s ease-out; | |||
} | |||
@keyframes gla-spoiler-in { | |||
from { | |||
opacity: 0; | |||
transform: translateY(-8px); | |||
} | |||
to { | |||
opacity: 1; | |||
transform: translateY(0); | |||
} | |||
} | |||
.gla-item-spoiler-info { | |||
flex: 1; | |||
font-size: 14px; | |||
color: var(--gla-ink-2); | |||
line-height: 1.55; | |||
min-width: 0; | |||
} | |||
.gla-item-spoiler-media { | |||
flex: 0 0 280px; | |||
max-width: 400px; | |||
} | } | ||
.gla-item- | .gla-item-spoiler-media img, | ||
.gla-item-spoiler-media video { | |||
width: 100%; | width: 100%; | ||
height: auto; | |||
border-radius: 8px; | |||
border: 1.5px solid var(--gla-ink) !important; | |||
display: block; | display: block; | ||
} | } | ||
.gla-item.is-hidden, | |||
.gla-item[data-hidden="true"] { | |||
.gla-item-reward .item- | background: repeating-linear-gradient(45deg, #fafafa 0 8px, #f0ece2 8px 9px); | ||
border-color: var(--gla-dim-2); | |||
box-shadow: 3px 3px 0 var(--gla-dim-2); | |||
} | |||
.gla-item.is-hidden:hover, | |||
.gla-item[data-hidden="true"]:hover { | |||
transform: none; | |||
box-shadow: 3px 3px 0 var(--gla-dim-2); | |||
} | |||
.gla-item.is-hidden .gla-item-left, | |||
.gla-item[data-hidden="true"] .gla-item-left { | |||
border-right-color: var(--gla-dim-2); | |||
} | |||
.gla-item.is-hidden .gla-item-title, | |||
.gla-item[data-hidden="true"] .gla-item-title { | |||
color: var(--gla-dim); | |||
font-style: italic; | |||
} | |||
.gla-item.is-hidden .gla-item-desc, | |||
.gla-item[data-hidden="true"] .gla-item-desc { | |||
color: var(--gla-dim); | |||
} | |||
.gla-item.is-hidden .gla-item-reward, | |||
.gla-item[data-hidden="true"] .gla-item-reward { | |||
background: transparent; | |||
border-color: var(--gla-dim-2); | |||
} | } | ||
.gla-item-reward .item- | .gla-item.is-hidden .gla-item-reward-label, | ||
.gla-item[data-hidden="true"] .gla-item-reward-label { | |||
color: var(--gla-dim); | |||
} | } | ||
.gla-item- | .gla-item.is-hidden .gla-item-chevron, | ||
color: | .gla-item[data-hidden="true"] .gla-item-chevron { | ||
color: var(--gla-dim); | |||
} | } | ||
.gla-item-reward . | .gla-item-reward .reward-wrapper { | ||
width: 100%; | |||
display: block; | |||
} | } | ||
.gla-item-reward .item-wrapper-special | .gla-item-reward .item-wrapper-special { | ||
filter: none !important; | |||
} | } | ||
.gla-item-reward .reward-items { | .gla-item-reward .reward-items { | ||
display: flex !important; | display: flex !important; | ||
| Linha 450: | Linha 492: | ||
gap: 4px; | gap: 4px; | ||
width: 100%; | width: 100%; | ||
} | |||
@media (max-width: 720px) { | |||
.gla-item-main { | |||
flex-wrap: wrap; | |||
} | |||
.gla-item-left { | |||
border-right: none; | |||
padding-right: 0; | |||
flex: 1 1 100%; | |||
} | |||
.gla-item-reward { | |||
flex: 1 1 100%; | |||
flex-direction: row; | |||
justify-content: flex-start; | |||
max-width: none; | |||
} | |||
.gla-item-spoiler-toggle { | |||
margin-left: 0; | |||
} | |||
.gla-item-spoiler { | |||
flex-direction: column; | |||
} | |||
.gla-item-spoiler-media { | |||
flex: 1 1 100%; | |||
max-width: 100%; | |||
} | |||
} | } | ||
</style> | </style> | ||
| Linha 583: | Linha 657: | ||
}); | }); | ||
// Spoiler — abre/fecha | // Spoiler — abre/fecha só no botão "Spoiler" | ||
root.addEventListener("click", function (e) { | root.addEventListener("click", function (e) { | ||
var | var toggle = e.target.closest(".gla-item-spoiler-toggle"); | ||
if (!toggle) return; | |||
if (e.target.closest(".item-wrapper")) return; | |||
var card = toggle.closest(".gla-item.has-spoiler"); | |||
if (!card) return; | if (!card) return; | ||
e.preventDefault(); | |||
var isOpen = card.classList.contains("is-open"); | var isOpen = card.classList.contains("is-open"); | ||
root.querySelectorAll(".gla-item.is-open").forEach(function (c) { | root.querySelectorAll(".gla-item.is-open").forEach(function (c) { | ||
c.classList.remove("is-open"); | c.classList.remove("is-open"); | ||
}); | }); | ||
if (!isOpen) card.classList.add("is-open"); | root.querySelectorAll(".gla-item-spoiler-toggle").forEach(function (btn) { | ||
btn.setAttribute("aria-expanded", "false"); | |||
}); | |||
if (!isOpen) { | |||
card.classList.add("is-open"); | |||
toggle.setAttribute("aria-expanded", "true"); | |||
} | |||
}); | }); | ||