Mudanças entre as edições de "Widget:Conquistas"
Ir para navegação
Ir para pesquisar
m |
m |
||
| Linha 21: | Linha 21: | ||
<div class="gla-conquistas-toolbar"> | <div class="gla-conquistas-toolbar"> | ||
<div class="gla-conquistas-tabs"> | <!-- Wrapper com scroll horizontal — evita que as abas quebrem linha e fiquem flutuando --> | ||
<span class="gla-conquistas-tab is-active" data-tab="geral">Geral</span> | <div class="gla-conquistas-tabs-scroll"> | ||
<div class="gla-conquistas-tabs"> | |||
<span class="gla-conquistas-tab is-active" data-tab="geral">Geral</span> | |||
<span class="gla-conquistas-tab" data-tab="personagens">Personagens</span> | |||
<span class="gla-conquistas-tab" data-tab="missao">Missão</span> | |||
<span class="gla-conquistas-tab" data-tab="bau">Baú</span> | |||
<span class="gla-conquistas-tab" data-tab="navegacao">Navegação</span> | |||
<span class="gla-conquistas-tab" data-tab="pvp">PvP</span> | |||
<span class="gla-conquistas-tab" data-tab="pve">PvE</span> | |||
<span class="gla-conquistas-tab" data-tab="coliseu">Coliseu</span> | |||
<span class="gla-conquistas-tab" data-tab="poneglyph">Poneglyph</span> | |||
<span class="gla-conquistas-tab" data-tab="indicacao">Indicação</span> | |||
<span class="gla-conquistas-tab" data-tab="celular">Celular</span> | |||
<span class="gla-conquistas-tab" data-tab="bossrush">Boss Rush</span> | |||
</div> | |||
</div> | </div> | ||
| Linha 101: | Linha 104: | ||
<style> | <style> | ||
/* ─── Variáveis — light mode ─────────────────────────────────────────── */ | |||
/* Paleta azul/branca consistente, independente do skin da wiki. | |||
Os valores são fechados no .gla-conquistas-root pra não vazar | |||
pra outros widgets da página. */ | |||
.gla-conquistas-root { | .gla-conquistas-root { | ||
--gla-ink: # | /* Texto */ | ||
--gla-ink-2: # | --gla-ink: #0f172a; | ||
--gla-dim: # | /* slate-900 — texto principal */ | ||
--gla-dim-2: # | --gla-ink-2: #475569; | ||
--gla- | /* slate-600 — texto secundário */ | ||
--gla- | --gla-dim: #94a3b8; | ||
--gla- | /* slate-400 — placeholder/desabilitado */ | ||
--gla- | --gla-dim-2: #cbd5e1; | ||
--gla- | /* slate-300 — bordas sutis */ | ||
--gla- | |||
--gla- | /* Superfícies */ | ||
--gla-shadow: 3px | --gla-paper: #f8fafc; | ||
/* slate-50 — fundo de tabs inativas */ | |||
--gla-paper-2: #f1f5f9; | |||
/* slate-100 — hover */ | |||
--gla-rule: #e2e8f0; | |||
/* slate-200 — divisores */ | |||
--gla-spoiler-bg: #f8fafc; | |||
/* Accent azul */ | |||
--gla-accent: #3b82f6; | |||
/* blue-500 */ | |||
--gla-accent-soft: #93c5fd; | |||
/* blue-300 */ | |||
--gla-accent-bg: #eff6ff; | |||
/* blue-50 — fundo do bloco de reward */ | |||
/* Controles */ | |||
--gla-ctrl-bg: #ffffff; | |||
--gla-ctrl-border: #e2e8f0; | |||
/* borda neutra clara */ | |||
--gla-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), | |||
0 1px 2px rgba(15, 23, 42, 0.04); | |||
} | |||
/* ─── Variáveis — dark mode ──────────────────────────────────────────── */ | |||
/* Adapta automaticamente quando o sistema/skin tá em dark. | |||
Usar prefers-color-scheme cobre OS dark mode; muitos skins de wiki | |||
(Vector 2022 night mode, Cosmos dark) também herdam isso. */ | |||
@media (prefers-color-scheme: dark) { | |||
.gla-conquistas-root { | |||
--gla-ink: #f1f5f9; | |||
/* slate-100 */ | |||
--gla-ink-2: #cbd5e1; | |||
/* slate-300 */ | |||
--gla-dim: #64748b; | |||
/* slate-500 */ | |||
--gla-dim-2: #475569; | |||
/* slate-600 */ | |||
--gla-paper: #1e293b; | |||
/* slate-800 */ | |||
--gla-paper-2: #334155; | |||
/* slate-700 — hover */ | |||
--gla-rule: #334155; | |||
--gla-spoiler-bg: #0f172a; | |||
/* slate-900 */ | |||
--gla-accent: #60a5fa; | |||
/* blue-400 */ | |||
--gla-accent-soft: #3b82f6; | |||
/* blue-500 */ | |||
--gla-accent-bg: #172554; | |||
/* blue-950 */ | |||
--gla-ctrl-bg: #1e293b; | |||
--gla-ctrl-border: #334155; | |||
--gla-shadow: 0 1px 3px rgba(0, 0, 0, 0.35), | |||
0 1px 2px rgba(0, 0, 0, 0.25); | |||
} | |||
} | } | ||
/* ─── Layout principal ───────────────────────────────────────────────── */ | |||
.gla-conquistas-headerbox { | .gla-conquistas-headerbox { | ||
margin: 0 0 20px; | margin: 0 0 20px; | ||
| Linha 121: | Linha 187: | ||
background: transparent; | background: transparent; | ||
border: none; | border: none; | ||
} | } | ||
| Linha 128: | Linha 193: | ||
} | } | ||
/* ─── Toolbar unificado (tabs + controls) ────────────────────────────── */ | |||
/* É o "card" branco que envolve tabs + busca + filtros. Tem o fundo, | |||
a borda e a sombra — assim os filhos podem ser transparentes e o | |||
skin da wiki não passa por trás. */ | |||
.gla-conquistas-toolbar { | .gla-conquistas-toolbar { | ||
display: block; | display: block; | ||
width: 100%; | width: 100%; | ||
background: var(--gla-ctrl-bg); | |||
border: 1px solid var(--gla-ctrl-border); | |||
border-radius: 14px; | |||
box-shadow: var(--gla-shadow); | |||
} | |||
/* ─── Wrapper de scroll das abas ─────────────────────────────────────── */ | |||
/* overflow-x: auto ativa scroll horizontal em telas estreitas, evitando | |||
que as abas quebrem linha e fiquem "flutuando". A border-bottom faz | |||
o divisor entre as tabs e a área de busca/filtros. */ | |||
.gla-conquistas-tabs-scroll { | |||
position: relative; | |||
z-index: 2; | |||
overflow-x: auto; | |||
padding: 6px 10px 0; | |||
background: transparent; | |||
border: none; | |||
border-bottom: 1px solid var(--gla-ctrl-border); | |||
border-radius: 14px 14px 0 0; | |||
scrollbar-width: none; | |||
-ms-overflow-style: none; | |||
-webkit-overflow-scrolling: touch; | |||
} | |||
.gla-conquistas-tabs-scroll::-webkit-scrollbar { | |||
display: none; | |||
} | } | ||
/* ─── Container das abas ─────────────────────────────────────────────── */ | |||
.gla-conquistas-tabs { | .gla-conquistas-tabs { | ||
display: flex; | display: flex; | ||
flex-wrap: | flex-wrap: nowrap; | ||
gap: | gap: 4px; | ||
padding: 0 | padding: 0; | ||
/* width:100% + min-width:max-content: em telas largas, as abas | |||
preenchem todo o container igualmente. Em telas estreitas, o | |||
container ultrapassa a viewport e o wrapper faz scroll | |||
horizontal — sem quebrar linha. */ | |||
width: 100%; | |||
min-width: max-content; | |||
box-sizing: border-box; | |||
} | } | ||
/* ─── Aba individual ─────────────────────────────────────────────────── */ | |||
/* font-weight é o MESMO no ativo e no inativo. Antes a inativa era 600 | |||
e a ativa 700, o que mudava a largura do texto e causava o "tick" | |||
(leve deslocamento) das abas vizinhas ao clicar. | |||
margin-bottom: -1px faz a tab sobrepor à border-bottom do scroll; | |||
só a tab ativa "apaga" essa borda com border-bottom-color branco. */ | |||
.gla-conquistas-tab { | .gla-conquistas-tab { | ||
flex: 1 1 0; | |||
min-width: 80px; | |||
text-align: center; | |||
white-space: nowrap; | |||
font-size: 13px; | font-size: 13px; | ||
font-weight: | font-weight: 700; | ||
padding: | padding: 9px 14px 10px; | ||
border: | border: 1px solid transparent; | ||
border-bottom: | border-bottom: 1px solid transparent; | ||
border-radius: | border-radius: 8px 8px 0 0; | ||
background: var(--gla-paper-2); | background: var(--gla-paper-2); | ||
color: var(--gla- | color: var(--gla-ink-2); | ||
position: relative; | position: relative; | ||
cursor: pointer; | cursor: pointer; | ||
transition: background 0.15s, color 0.15s; | box-sizing: border-box; | ||
margin-bottom: -1px; | |||
transition: background 0.15s, color 0.15s, border-color 0.15s; | |||
} | } | ||
| Linha 165: | Linha 275: | ||
.gla-conquistas-tab.is-active { | .gla-conquistas-tab.is-active { | ||
background: | background: var(--gla-ctrl-bg); | ||
color: var(--gla- | color: var(--gla-accent); | ||
z-index: | z-index: 3; | ||
border-color: var(--gla-ctrl-border); | |||
box-shadow: inset 0 | /* mesma cor do fundo do toolbar — "apaga" o divisor nesse ponto. */ | ||
border-bottom-color: var(--gla-ctrl-bg); | |||
/* linha azul no topo via inset shadow — não altera dimensões, | |||
então clicar não causa deslocamento. */ | |||
box-shadow: inset 0 3px 0 var(--gla-accent); | |||
} | } | ||
/* ─── Box de controles (busca + filtros) ─────────────────────────────── */ | |||
/* Sem fundo/borda próprios — herda do .gla-conquistas-toolbar. */ | |||
.gla-conquistas-controls { | .gla-conquistas-controls { | ||
display: flex; | display: flex; | ||
| Linha 177: | Linha 293: | ||
gap: 10px; | gap: 10px; | ||
flex-wrap: wrap; | flex-wrap: wrap; | ||
width: 100%; | width: 100%; | ||
box-sizing: border-box; | box-sizing: border-box; | ||
background: | background: transparent; | ||
border: | border: none; | ||
border-radius: 0 | border-radius: 0 0 14px 14px; | ||
padding: 14px 18px; | |||
padding: 14px 18px | |||
position: relative; | position: relative; | ||
z-index: 1; | z-index: 1; | ||
} | } | ||
/* ─── Campo de busca ─────────────────────────────────────────────────── */ | |||
.gla-conquistas-search { | .gla-conquistas-search { | ||
flex: 1 1 auto; | flex: 1 1 auto; | ||
min-width: 160px; | min-width: 160px; | ||
padding: 8px 16px; | padding: 8px 16px; | ||
border: | border: 1px solid var(--gla-ctrl-border); | ||
border-radius: 999px; | border-radius: 999px; | ||
font-size: 13px; | font-size: 13px; | ||
background: | background: var(--gla-paper); | ||
color: var(--gla-ink); | color: var(--gla-ink); | ||
outline: none; | outline: none; | ||
font-family: inherit; | font-family: inherit; | ||
transition: box-shadow 0.15s; | transition: box-shadow 0.15s, border-color 0.15s, background 0.15s; | ||
} | |||
.gla-conquistas-search::placeholder { | |||
color: var(--gla-dim); | |||
} | } | ||
.gla-conquistas-search:focus { | .gla-conquistas-search:focus { | ||
box-shadow: 0 0 0 3px var(--gla- | box-shadow: 0 0 0 3px var(--gla-accent-bg); | ||
border-color: var(--gla- | border-color: var(--gla-accent); | ||
background: var(--gla-ctrl-bg); | |||
} | } | ||
/* ─── Filtros (pills) ────────────────────────────────────────────────── */ | |||
.gla-conquistas-filters { | .gla-conquistas-filters { | ||
display: flex; | display: flex; | ||
| Linha 215: | Linha 336: | ||
.gla-conquistas-filter { | .gla-conquistas-filter { | ||
padding: | padding: 6px 14px; | ||
border: | border: 1px solid var(--gla-ctrl-border); | ||
border-radius: 999px; | border-radius: 999px; | ||
background: | background: var(--gla-paper); | ||
font-size: 12px; | font-size: 12px; | ||
font-weight: 600; | font-weight: 600; | ||
color: var(--gla-ink); | color: var(--gla-ink-2); | ||
cursor: pointer; | cursor: pointer; | ||
transition: | transition: background 0.15s, color 0.15s, border-color 0.15s; | ||
} | } | ||
.gla-conquistas-filter:hover { | .gla-conquistas-filter:hover { | ||
background: var(--gla-paper-2); | background: var(--gla-paper-2); | ||
color: var(--gla-ink); | |||
} | } | ||
.gla-conquistas-filter.is-active { | .gla-conquistas-filter.is-active { | ||
background: var(--gla- | background: var(--gla-accent); | ||
color: # | color: #ffffff; | ||
border-color: var(--gla- | border-color: var(--gla-accent); | ||
} | } | ||
/* ─── Painéis de conteúdo ────────────────────────────────────────────── */ | |||
.gla-conquistas-panel { | .gla-conquistas-panel { | ||
margin: 14px 0 0; | margin: 14px 0 0; | ||
| Linha 255: | Linha 378: | ||
} | } | ||
/* ─── Card de conquista ───────────────────────────────────────────────── */ | |||
/* Visual minimalista: borda fina, sombra suave, hover sutil sem | |||
translate (causava reflow). Esquema branco + azul-claro. */ | |||
.gla-item { | .gla-item { | ||
display: flex; | display: flex; | ||
flex-direction: column; | flex-direction: column; | ||
background: | background: var(--gla-ctrl-bg); | ||
border: | border: 1px solid var(--gla-accent-soft); | ||
border-radius: | border-radius: 12px; | ||
box-shadow: var(--gla-shadow); | box-shadow: var(--gla-shadow); | ||
transition: | transition: border-color 0.15s, box-shadow 0.15s; | ||
} | } | ||
.gla-item.has-spoiler:hover { | .gla-item.has-spoiler:hover { | ||
border-color: var(--gla-accent); | |||
box-shadow: 0 4px 12px -2px rgba(59, 130, 246, 0.2); | |||
} | } | ||
| Linha 273: | Linha 399: | ||
display: flex; | display: flex; | ||
align-items: center; | align-items: center; | ||
gap: | gap: 16px; | ||
padding: 18px | padding: 14px 18px; | ||
min-height: | min-height: 76px; | ||
} | } | ||
| Linha 281: | Linha 407: | ||
display: flex; | display: flex; | ||
align-items: center; | align-items: center; | ||
gap: | gap: 14px; | ||
flex: 1; | flex: 1; | ||
min-width: 0; | min-width: 0; | ||
/* sem divisor vertical — minimalista */ | |||
} | } | ||
.gla-item-icon { | .gla-item-icon { | ||
flex: 0 0 | flex: 0 0 auto; | ||
display: flex; | display: flex; | ||
align-items: center; | align-items: center; | ||
| Linha 295: | Linha 420: | ||
} | } | ||
/* Ícone respeita o tamanho do arquivo da wiki (recomendado: 52×52). | |||
Sem dimensões fixas no CSS. */ | |||
.gla-item-icon img { | .gla-item-icon img { | ||
object-fit: contain; | object-fit: contain; | ||
border: none !important; | border: none !important; | ||
| Linha 307: | Linha 432: | ||
.gla-item-title { | .gla-item-title { | ||
font-size: | font-size: 15px; | ||
font-weight: 700; | font-weight: 700; | ||
color: var(--gla- | color: var(--gla-accent-soft); | ||
line-height: 1. | line-height: 1.2; | ||
} | |||
.gla-conquistas-root .gla-item-title { | |||
color: #1d4ed8; | |||
/* blue-700 — título da conquista forte */ | |||
} | |||
@media (prefers-color-scheme: dark) { | |||
.gla-conquistas-root .gla-item-title { | |||
color: #60a5fa; | |||
/* blue-400 no dark */ | |||
} | |||
} | } | ||
.gla-item-desc { | .gla-item-desc { | ||
font-size: | font-size: 13px; | ||
color: var(--gla-ink-2); | color: var(--gla-ink-2); | ||
margin-top: | margin-top: 2px; | ||
line-height: 1.4; | line-height: 1.4; | ||
} | } | ||
/* ─── Box de recompensa ──────────────────────────────────────────────── */ | |||
/* Coluna fixa centralizada. margin-top negativo + align-self start | |||
sobe o conjunto pra compensar o badge .qty (do Widget:Item) que sai | |||
~3px pra baixo do ícone — sem isso, o bloco parece "puxado pra baixo" | |||
mesmo estando tecnicamente centralizado. */ | |||
.gla-item-reward { | .gla-item-reward { | ||
flex-shrink: 0; | flex-shrink: 0; | ||
| Linha 325: | Linha 467: | ||
flex-direction: column; | flex-direction: column; | ||
align-items: center; | align-items: center; | ||
gap: | gap: 4px; | ||
padding: 10px | padding: 8px 14px 10px; | ||
background: var(--gla- | background: var(--gla-accent-bg); | ||
border: | border: 1px solid var(--gla-accent-soft); | ||
border-radius: | border-radius: 10px; | ||
min-width: 180px; | |||
max-width: 260px; | max-width: 260px; | ||
align-self: center; | |||
margin-top: -4px; | |||
} | } | ||
| Linha 337: | Linha 481: | ||
font-size: 11px; | font-size: 11px; | ||
font-weight: 700; | font-weight: 700; | ||
letter-spacing: 0. | letter-spacing: 0.14em; | ||
text-transform: uppercase; | text-transform: uppercase; | ||
color: var(--gla- | color: var(--gla-accent); | ||
white-space: nowrap; | white-space: nowrap; | ||
} | } | ||
/* ─── Botão spoiler ──────────────────────────────────────────────────── */ | |||
.gla-item-spoiler-toggle { | .gla-item-spoiler-toggle { | ||
display: inline-flex; | display: inline-flex; | ||
| Linha 348: | Linha 493: | ||
gap: 6px; | gap: 6px; | ||
margin-left: auto; | margin-left: auto; | ||
border: | align-self: center; | ||
background: | border: 1px solid var(--gla-accent-soft); | ||
background: var(--gla-accent-bg); | |||
border-radius: 999px; | border-radius: 999px; | ||
padding: 6px | padding: 6px 12px; | ||
font: inherit; | font: inherit; | ||
color: var(--gla- | color: var(--gla-accent); | ||
cursor: pointer; | cursor: pointer; | ||
transition: background 0.15s; | transition: background 0.15s, border-color 0.15s; | ||
} | } | ||
.gla-item-spoiler-toggle:hover { | .gla-item-spoiler-toggle:hover { | ||
background: var(--gla- | background: var(--gla-accent); | ||
border-color: var(--gla-accent); | |||
color: #ffffff; | |||
} | |||
.gla-item-spoiler-toggle:hover .gla-item-chevron { | |||
color: #ffffff; | |||
} | } | ||
.gla-item-spoiler-text { | .gla-item-spoiler-text { | ||
font-size: | font-size: 11px; | ||
font-weight: 700; | font-weight: 700; | ||
letter-spacing: 0. | letter-spacing: 0.08em; | ||
text-transform: uppercase; | text-transform: uppercase; | ||
} | } | ||
.gla-item-chevron { | .gla-item-chevron { | ||
font-size: | font-size: 18px; | ||
color: var(--gla- | color: var(--gla-accent); | ||
line-height: 1; | line-height: 1; | ||
flex-shrink: 0; | flex-shrink: 0; | ||
transition: transform 0.2s ease; | transition: transform 0.2s ease, color 0.15s; | ||
user-select: none; | user-select: none; | ||
} | } | ||
| Linha 382: | Linha 534: | ||
} | } | ||
/* ─── Conteúdo spoiler ────────────────────────────────────────────────── */ | |||
.gla-item-spoiler { | .gla-item-spoiler { | ||
display: none; | display: none; | ||
border-top: | border-top: 1px solid var(--gla-accent-soft); | ||
background: var(--gla-spoiler-bg); | background: var(--gla-spoiler-bg); | ||
padding: | padding: 14px 18px; | ||
gap: 18px; | gap: 18px; | ||
flex-direction: row; | flex-direction: row; | ||
| Linha 428: | Linha 581: | ||
height: auto; | height: auto; | ||
border-radius: 8px; | border-radius: 8px; | ||
border: 1.5px solid var(--gla- | border: 1.5px solid var(--gla-ctrl-border) !important; | ||
display: block; | display: block; | ||
} | } | ||
/* ─── Conquista oculta ────────────────────────────────────────────────── */ | |||
/* Cinza simples (sem padrão listrado) pra ficar visualmente leve. | |||
Diferencia da normal só pela cor da borda + texto esmaecido. */ | |||
.gla-item.is-hidden, | .gla-item.is-hidden, | ||
.gla-item[data-hidden="true"] { | .gla-item[data-hidden="true"] { | ||
background: | background: var(--gla-paper); | ||
border-color: var(--gla-dim-2); | border-color: var(--gla-dim-2); | ||
box-shadow: | box-shadow: var(--gla-shadow); | ||
} | } | ||
.gla-item.is-hidden:hover, | .gla-item.is-hidden:hover, | ||
.gla-item[data-hidden="true"]:hover { | .gla-item[data-hidden="true"]:hover { | ||
border-color: var(--gla-dim); | |||
box-shadow: | box-shadow: var(--gla-shadow); | ||
} | } | ||
.gla- | .gla-conquistas-root .gla-item.is-hidden .gla-item-title, | ||
.gla-conquistas-root .gla-item[data-hidden="true"] .gla-item-title { | |||
color: var(--gla-ink-2); | |||
.gla- | |||
color: var(--gla- | |||
font-style: italic; | font-style: italic; | ||
} | } | ||
| Linha 463: | Linha 614: | ||
.gla-item.is-hidden .gla-item-reward, | .gla-item.is-hidden .gla-item-reward, | ||
.gla-item[data-hidden="true"] .gla-item-reward { | .gla-item[data-hidden="true"] .gla-item-reward { | ||
background: | background: var(--gla-paper-2); | ||
border-color: var(--gla-dim-2); | border-color: var(--gla-dim-2); | ||
} | } | ||
| Linha 477: | Linha 628: | ||
} | } | ||
/* ─── Reward items (Widget:Item) ─────────────────────────────────────── */ | |||
.gla-item-reward .reward-wrapper { | .gla-item-reward .reward-wrapper { | ||
width: 100%; | width: 100%; | ||
| Linha 494: | Linha 646: | ||
} | } | ||
/* ─── Responsivo mobile ──────────────────────────────────────────────── */ | |||
@media (max-width: 720px) { | @media (max-width: 720px) { | ||
.gla-conquistas-tab { | |||
font-size: 12px; | |||
padding: 8px 12px 9px; | |||
min-width: 68px; | |||
} | |||
.gla-item-main { | .gla-item-main { | ||
flex-wrap: wrap; | flex-wrap: wrap; | ||
| Linha 500: | Linha 659: | ||
.gla-item-left { | .gla-item-left { | ||
padding-right: 0; | padding-right: 0; | ||
flex: 1 1 100%; | flex: 1 1 100%; | ||
| Linha 510: | Linha 668: | ||
justify-content: flex-start; | justify-content: flex-start; | ||
max-width: none; | max-width: none; | ||
margin-top: 0; | |||
align-self: stretch; | |||
} | } | ||