diff --git a/assets/css/style.css b/assets/css/style.css index 2f92870..3fd6718 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -6800,12 +6800,22 @@ button.gear-guide-skill:hover { border-color: var(--gold); transform: translateY .gear-guide-skill-chip:hover, .gear-guide-skill-chip:focus-visible { outline: none; text-decoration: underline; text-decoration-color: rgba(227, 189, 110, 0.55); text-underline-offset: 3px; } .gear-guide-skill-chip.is-stigma { color: #c9adf5; } .gear-guide-skill-chip.is-stigma img { box-shadow: 0 0 0 1px rgba(160, 120, 230, 0.6); } -/* [[Skillname:2]]: dazu die Nummer der Spezialisierung (Stigmen: des Bonus) und ihr Text in Anfuehrungszeichen */ -.gear-guide-spec-no { display: inline-block; margin: 0 0.3em 0 0.35em; padding: 0 0.35em; border-radius: 3px; background: rgba(201, 162, 39, 0.22); color: #f1d98a; font-size: 0.75em; font-weight: 700; line-height: 1.45; vertical-align: 0.1em; } -.gear-guide-skill-chip.is-stigma .gear-guide-spec-no { background: rgba(160, 120, 230, 0.28); color: #e1d0ff; } -.gear-guide-spec-text { color: var(--text-muted); font-weight: 400; font-style: italic; white-space: normal; } -.gear-guide-spec-text::before { content: '„'; } -.gear-guide-spec-text::after { content: '“'; } +/* [[Skillname:2]]: Symbol der Spezialisierung und ihr Text; beim Drueberfahren die Skill-Info mit hervorgehobener Zeile */ +.gear-guide-spec-ref { display: inline; color: #e8dcc0; font-weight: 600; cursor: help; text-decoration: underline dotted rgba(227, 189, 110, 0.55); text-underline-offset: 3px; } +.gear-guide-spec-ref:hover, .gear-guide-spec-ref:focus-visible { outline: none; color: #f1d98a; text-decoration-style: solid; } +.gear-guide-spec-ref.is-stigma { color: #ddd0f5; text-decoration-color: rgba(160, 120, 230, 0.6); } +.gear-guide-spec-ref-icon { width: 1.25em; height: 1.25em; margin-right: 0.25em; object-fit: contain; vertical-align: -0.25em; } +.gear-guide-spec-ref.is-stigma .gear-guide-spec-ref-icon { border-radius: 3px; object-fit: cover; box-shadow: 0 0 0 1px rgba(160, 120, 230, 0.6); } +/* Spezialitaeten in der Info-Blase (nur bei [[Skill:N]]) */ +.gear-tip-parts { display: none; margin-top: 0.55rem; padding-top: 0.45rem; border-top: 1px solid rgba(255, 255, 255, 0.1); } +.gear-tip.has-spec .gear-tip-parts { display: block; } +.gear-tip-parts-head { margin-bottom: 0.3rem; font-size: 0.75rem; font-weight: 700; } +.gear-tip-part { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.2rem; padding: 0.25rem 0.4rem; border: 1px solid transparent; border-radius: 6px; color: var(--text-muted); font-size: 0.78rem; line-height: 1.3; } +.gear-tip-part img { flex: none; width: 20px; height: 20px; } +.gear-tip-part:not(.is-hl) img { filter: grayscale(1) brightness(0.65); opacity: 0.6; } +.gear-tip-part-no { flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 4px; background: rgba(160, 120, 230, 0.25); color: #e1d0ff; font-size: 0.72rem; } +.gear-tip-part-level { flex: none; width: 2.6rem; font-size: 0.7rem; } +.gear-tip-part.is-hl { border-color: rgba(201, 162, 39, 0.6); background: rgba(201, 162, 39, 0.12); color: var(--text); } .gear-guide-order + .gear-guide-order { margin-left: 0; } .gear-guide-chip-hint code { padding: 0.05rem 0.3rem; border-radius: 4px; background: rgba(255, 255, 255, 0.08); } .gear-guide-stats { margin-bottom: 1rem; } diff --git a/assets/js/gear.js b/assets/js/gear.js index 0539011..6c9ef05 100644 --- a/assets/js/gear.js +++ b/assets/js/gear.js @@ -71,8 +71,16 @@ } if (!src) return false; tip.innerHTML = src.innerHTML; + // [[Skill:N]] im Guide: Spezialisierungen zeigen, die gemeinte hervorheben (includes/gear_guide.php) + var spec = el.getAttribute('data-tip-spec'); + tip.classList.toggle('has-spec', !!spec); + if (spec) { + var part = tip.querySelector('[data-part="' + spec + '"]'); + if (part) part.classList.add('is-hl'); + } return true; } + tip.classList.remove('has-spec'); tip.textContent = ''; var head = document.createElement('div'); head.className = 'gear-tip-head'; diff --git a/includes/gear_guide.php b/includes/gear_guide.php index f4d6e58..ed1f876 100644 --- a/includes/gear_guide.php +++ b/includes/gear_guide.php @@ -268,7 +268,22 @@ function gear_guide_tip_sources(array $levels): string { $html = ''; foreach (gear_guide_tip_registry() as $id => $skill) { - $html .= '
';
+ $label = gear_skill_display_name($skill) . ' – ' . ($isStigma ? 'Bonus ' . $no : 'Spezialisierung ' . GEAR_SKILL_SPEC_NUMERALS[$no]);
+ return ''
+ . $icon . '' . e($part['text']) . '';
}
/**