step 9.1: done
This commit is contained in:
+11
-4
@@ -40,10 +40,17 @@ function renderProfile(data) {
|
||||
for (const stat of ['str', 'agi', 'int', 'vit']) {
|
||||
const row = document.createElement('div');
|
||||
row.className = 'profile-stat-row';
|
||||
row.innerHTML = `
|
||||
<span class="profile-stat-label">${stat}</span>
|
||||
<span class="profile-stat-value">${data[stat]}</span>
|
||||
`;
|
||||
|
||||
const label = document.createElement('span');
|
||||
label.className = 'profile-stat-label';
|
||||
label.textContent = stat;
|
||||
|
||||
const value = document.createElement('span');
|
||||
value.className = 'profile-stat-value';
|
||||
value.textContent = data[stat];
|
||||
|
||||
row.appendChild(label);
|
||||
row.appendChild(value);
|
||||
statsList.appendChild(row);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user