Fix match detail faction assets
This commit is contained in:
@@ -32,14 +32,14 @@
|
||||
|
||||
.historical-scoreboard-side {
|
||||
display: grid;
|
||||
grid-template-columns: 76px minmax(0, 1fr);
|
||||
grid-template-columns: 112px minmax(0, 1fr);
|
||||
align-items: center;
|
||||
gap: 18px;
|
||||
min-height: 116px;
|
||||
min-height: 136px;
|
||||
}
|
||||
|
||||
.historical-scoreboard-side--axis {
|
||||
grid-template-columns: minmax(0, 1fr) 76px;
|
||||
grid-template-columns: minmax(0, 1fr) 112px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
@@ -51,12 +51,17 @@
|
||||
order: 1;
|
||||
}
|
||||
|
||||
.historical-scoreboard-side.is-emblem-missing,
|
||||
.historical-scoreboard-side--axis.is-emblem-missing {
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
}
|
||||
|
||||
.historical-scoreboard-side__emblem {
|
||||
width: 76px;
|
||||
height: 76px;
|
||||
width: 112px;
|
||||
height: 112px;
|
||||
border-radius: 999px;
|
||||
object-fit: contain;
|
||||
padding: 8px;
|
||||
padding: 10px;
|
||||
border: 1px solid rgba(210, 182, 118, 0.26);
|
||||
background:
|
||||
radial-gradient(circle at center, rgba(210, 182, 118, 0.15), transparent 60%),
|
||||
@@ -75,12 +80,6 @@
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.historical-scoreboard-side__text span {
|
||||
color: var(--text-soft);
|
||||
font-size: 0.86rem;
|
||||
letter-spacing: 0.04em;
|
||||
}
|
||||
|
||||
.historical-scoreboard-side__text em {
|
||||
color: var(--accent-strong);
|
||||
font-style: normal;
|
||||
@@ -176,7 +175,7 @@
|
||||
|
||||
.historical-scoreboard-side,
|
||||
.historical-scoreboard-side--axis {
|
||||
grid-template-columns: 70px minmax(0, 1fr);
|
||||
grid-template-columns: 96px minmax(0, 1fr);
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
@@ -184,4 +183,9 @@
|
||||
.historical-scoreboard-side--axis .historical-scoreboard-side__text {
|
||||
order: initial;
|
||||
}
|
||||
|
||||
.historical-scoreboard-side__emblem {
|
||||
width: 96px;
|
||||
height: 96px;
|
||||
}
|
||||
}
|
||||
|
||||
BIN
frontend/assets/img/factions/britain.webp
Normal file
BIN
frontend/assets/img/factions/britain.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 50 KiB |
BIN
frontend/assets/img/factions/germany.webp
Normal file
BIN
frontend/assets/img/factions/germany.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 49 KiB |
BIN
frontend/assets/img/factions/soviets.webp
Normal file
BIN
frontend/assets/img/factions/soviets.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 53 KiB |
BIN
frontend/assets/img/factions/us.webp
Normal file
BIN
frontend/assets/img/factions/us.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 54 KiB |
@@ -130,20 +130,21 @@ function renderScoreboardDetail(item, { mapName, serverName }) {
|
||||
}
|
||||
|
||||
function renderScoreboardSide({ sideClass, emblem, sideLabel, factionLabel, isWinner }) {
|
||||
const fallbackLabel = factionLabel || sideLabel;
|
||||
return `
|
||||
<div class="historical-scoreboard-side ${sideClass} ${isWinner ? "is-winner" : ""}">
|
||||
<img
|
||||
class="historical-scoreboard-side__emblem"
|
||||
src="${escapeHtml(emblem)}"
|
||||
alt="${escapeHtml(factionLabel)}"
|
||||
width="96"
|
||||
height="96"
|
||||
alt="${escapeHtml(fallbackLabel)}"
|
||||
width="128"
|
||||
height="128"
|
||||
loading="lazy"
|
||||
decoding="async"
|
||||
onerror="this.hidden = true; this.closest('.historical-scoreboard-side').classList.add('is-emblem-missing');"
|
||||
/>
|
||||
<div class="historical-scoreboard-side__text">
|
||||
<strong>${escapeHtml(sideLabel)}</strong>
|
||||
<span>${escapeHtml(factionLabel)}</span>
|
||||
${isWinner ? "<em>Ganador</em>" : ""}
|
||||
</div>
|
||||
</div>
|
||||
@@ -235,12 +236,12 @@ function resolveMatchFactions(item, mapName) {
|
||||
if (/(kursk|stalingrad|kharkov)/.test(normalizedMap)) {
|
||||
return {
|
||||
allied: {
|
||||
label: "Ejercito sovietico",
|
||||
emblem: "./assets/img/factions/soviets.svg",
|
||||
label: "Sovieticos",
|
||||
emblem: "./assets/img/factions/soviets.webp",
|
||||
},
|
||||
axis: {
|
||||
label: "Ejercito aleman",
|
||||
emblem: "./assets/img/factions/germany.svg",
|
||||
label: "Eje",
|
||||
emblem: "./assets/img/factions/germany.webp",
|
||||
},
|
||||
};
|
||||
}
|
||||
@@ -248,26 +249,26 @@ function resolveMatchFactions(item, mapName) {
|
||||
if (/(driel|elalamein|el alamein|tobruk)/.test(normalizedMap)) {
|
||||
return {
|
||||
allied: {
|
||||
label: "Fuerzas britanicas",
|
||||
emblem: "./assets/img/factions/britain.svg",
|
||||
label: "Britanicos",
|
||||
emblem: "./assets/img/factions/britain.webp",
|
||||
},
|
||||
axis: {
|
||||
label: normalizedMap.includes("tobruk") || normalizedMap.includes("elalamein")
|
||||
? "Afrika Korps"
|
||||
: "Ejercito aleman",
|
||||
emblem: "./assets/img/factions/germany.svg",
|
||||
: "Eje",
|
||||
emblem: "./assets/img/factions/germany.webp",
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
allied: {
|
||||
label: "Fuerzas estadounidenses",
|
||||
emblem: "./assets/img/factions/us.svg",
|
||||
label: "USA",
|
||||
emblem: "./assets/img/factions/us.webp",
|
||||
},
|
||||
axis: {
|
||||
label: "Ejercito aleman",
|
||||
emblem: "./assets/img/factions/germany.svg",
|
||||
label: "Eje",
|
||||
emblem: "./assets/img/factions/germany.webp",
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user