Merge remote-tracking branch 'origin/codex/match-detail-scoreboard-and-player-links'
This commit is contained in:
@@ -253,6 +253,37 @@
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
|
||||
.historical-player-stats-panel__profiles {
|
||||
padding: 13px;
|
||||
}
|
||||
|
||||
.historical-player-profile-links {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.historical-player-profile-links a {
|
||||
display: inline-flex;
|
||||
min-height: 32px;
|
||||
align-items: center;
|
||||
padding: 0 11px;
|
||||
border: 1px solid rgba(210, 182, 118, 0.34);
|
||||
border-radius: 999px;
|
||||
color: var(--accent-warm);
|
||||
font-size: 0.72rem;
|
||||
font-weight: 900;
|
||||
letter-spacing: 0.08em;
|
||||
text-decoration: none;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.historical-player-profile-links a:hover,
|
||||
.historical-player-profile-links a:focus-visible {
|
||||
border-color: rgba(210, 182, 118, 0.62);
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
.historical-player-stats-panel__section h5 {
|
||||
font-size: 0.78rem;
|
||||
letter-spacing: 0.08em;
|
||||
|
||||
@@ -490,6 +490,7 @@ function renderPlayerStatsPanel(player, item, context) {
|
||||
${renderPlayerStatChip("KPM", context.kpm)}
|
||||
</div>
|
||||
</div>
|
||||
${renderExternalProfilesSection(player)}
|
||||
${
|
||||
hasExpandedStats
|
||||
? `
|
||||
@@ -506,6 +507,39 @@ function renderPlayerStatsPanel(player, item, context) {
|
||||
`;
|
||||
}
|
||||
|
||||
function renderExternalProfilesSection(player) {
|
||||
const links = [
|
||||
["steam", "Steam"],
|
||||
["hellor", "Hellor"],
|
||||
["hll_records", "HLL Records"],
|
||||
]
|
||||
.map(([key, label]) => [label, player.external_profile_links?.[key]])
|
||||
.filter(([, href]) => typeof href === "string" && href.trim());
|
||||
|
||||
return `
|
||||
<article class="historical-player-stats-panel__section historical-player-stats-panel__profiles">
|
||||
<h5>Perfiles externos</h5>
|
||||
${
|
||||
links.length
|
||||
? `
|
||||
<div class="historical-player-profile-links">
|
||||
${links
|
||||
.map(
|
||||
([label, href]) => `
|
||||
<a href="${escapeHtml(href)}" target="_blank" rel="noopener noreferrer">
|
||||
${escapeHtml(label)}
|
||||
</a>
|
||||
`,
|
||||
)
|
||||
.join("")}
|
||||
</div>
|
||||
`
|
||||
: "<p>Perfiles externos no disponibles.</p>"
|
||||
}
|
||||
</article>
|
||||
`;
|
||||
}
|
||||
|
||||
function renderPlayerStatChip(label, value) {
|
||||
return `
|
||||
<article>
|
||||
@@ -620,6 +654,7 @@ function renderActions(item, actionsNode) {
|
||||
actionsNode.innerHTML = `
|
||||
<a
|
||||
class="historical-match-card__link"
|
||||
data-match-detail-scoreboard-link
|
||||
href="${escapeHtml(matchUrl)}"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
|
||||
@@ -76,6 +76,7 @@
|
||||
Cargando detalle...
|
||||
</p>
|
||||
<div class="historical-summary-grid" id="match-detail-grid" hidden></div>
|
||||
<div class="historical-match-card__actions" id="match-detail-actions" hidden></div>
|
||||
<div class="historical-detail-section" id="match-detail-players-section" hidden>
|
||||
<div class="historical-detail-section__header">
|
||||
<div>
|
||||
@@ -148,7 +149,6 @@
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="historical-match-card__actions" id="match-detail-actions" hidden></div>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
Reference in New Issue
Block a user