Spaces:
Running
Running
Update docs.html
Browse files
docs.html
CHANGED
|
@@ -2518,7 +2518,11 @@ if (infoData.status) {
|
|
| 2518 |
const userNameEl = document.getElementById('userName');
|
| 2519 |
userNameEl.innerHTML = ''; // clear previous content
|
| 2520 |
|
| 2521 |
-
// Create
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2522 |
const img = document.createElement('img');
|
| 2523 |
img.src = iconURL;
|
| 2524 |
img.alt = 'icon';
|
|
@@ -2527,16 +2531,14 @@ if (infoData.status) {
|
|
| 2527 |
img.style.height = '20px';
|
| 2528 |
img.style.objectFit = 'contain';
|
| 2529 |
|
| 2530 |
-
//
|
| 2531 |
-
const nameText = document.createElement('span');
|
| 2532 |
-
nameText.textContent = fullName;
|
| 2533 |
-
|
| 2534 |
-
// Append image and username to #userName
|
| 2535 |
-
userNameEl.appendChild(img);
|
| 2536 |
userNameEl.appendChild(nameText);
|
|
|
|
| 2537 |
|
| 2538 |
-
|
|
|
|
| 2539 |
userNameEl.style.alignItems = 'center';
|
|
|
|
| 2540 |
userNameEl.style.gap = '6px';
|
| 2541 |
}
|
| 2542 |
|
|
|
|
| 2518 |
const userNameEl = document.getElementById('userName');
|
| 2519 |
userNameEl.innerHTML = ''; // clear previous content
|
| 2520 |
|
| 2521 |
+
// Create username text first
|
| 2522 |
+
const nameText = document.createElement('span');
|
| 2523 |
+
nameText.textContent = fullName;
|
| 2524 |
+
|
| 2525 |
+
// Create image element
|
| 2526 |
const img = document.createElement('img');
|
| 2527 |
img.src = iconURL;
|
| 2528 |
img.alt = 'icon';
|
|
|
|
| 2531 |
img.style.height = '20px';
|
| 2532 |
img.style.objectFit = 'contain';
|
| 2533 |
|
| 2534 |
+
// Append username first, then image (so image is on the right)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2535 |
userNameEl.appendChild(nameText);
|
| 2536 |
+
userNameEl.appendChild(img);
|
| 2537 |
|
| 2538 |
+
// Flex container to center content
|
| 2539 |
+
userNameEl.style.display = 'inline-flex';
|
| 2540 |
userNameEl.style.alignItems = 'center';
|
| 2541 |
+
userNameEl.style.justifyContent = 'center'; // center horizontally
|
| 2542 |
userNameEl.style.gap = '6px';
|
| 2543 |
}
|
| 2544 |
|