Commit ·
bc3796a
1
Parent(s): f5bbd0c
UI: Remove logo icon from header + replace guest avatar with profile silhouette SVG - Header now shows just 'بيان' text (no ب icon) - Guest avatar shows person silhouette instead of 'ض' letter - Both HTML default and JS auth-ui.js updated
Browse files- src/index.html +2 -2
- src/js/auth/auth-ui.js +6 -2
src/index.html
CHANGED
|
@@ -58,7 +58,7 @@
|
|
| 58 |
<button id="mobile-menu-btn" class="mobile-menu-btn md:hidden" aria-label="فتح القائمة" aria-expanded="false" aria-controls="mobile-drawer">
|
| 59 |
<svg width="22" height="22" fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"/></svg>
|
| 60 |
</button>
|
| 61 |
-
<button onclick="showPage('home')" class="flex items-center gap-3" style="background:none;border:none;cursor:pointer;" aria-label="الرئيسية"><
|
| 62 |
</div>
|
| 63 |
<div class="hidden md:flex items-center gap-8">
|
| 64 |
<button onclick="showPage('home')" class="nav-link active text-base font-medium" data-page="home">الرئيسية</button>
|
|
@@ -71,7 +71,7 @@
|
|
| 71 |
<div id="auth-menu-wrap" class="auth-menu-wrap is-hidden">
|
| 72 |
<div class="auth-dropdown">
|
| 73 |
<button id="auth-menu-trigger" class="auth-menu-trigger" type="button" aria-label="قائمة الحساب" aria-haspopup="true" aria-expanded="false">
|
| 74 |
-
<span id="auth-avatar" class="auth-avatar" aria-hidden="true">
|
| 75 |
<span id="auth-display-name" class="auth-display-name">ضيف</span>
|
| 76 |
<span class="auth-menu-chevron" aria-hidden="true">▾</span>
|
| 77 |
</button>
|
|
|
|
| 58 |
<button id="mobile-menu-btn" class="mobile-menu-btn md:hidden" aria-label="فتح القائمة" aria-expanded="false" aria-controls="mobile-drawer">
|
| 59 |
<svg width="22" height="22" fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"/></svg>
|
| 60 |
</button>
|
| 61 |
+
<button onclick="showPage('home')" class="flex items-center gap-3" style="background:none;border:none;cursor:pointer;" aria-label="الرئيسية"><span id="nav-brand" class="text-xl md:text-2xl font-bold text-gradient">بيان</span></button>
|
| 62 |
</div>
|
| 63 |
<div class="hidden md:flex items-center gap-8">
|
| 64 |
<button onclick="showPage('home')" class="nav-link active text-base font-medium" data-page="home">الرئيسية</button>
|
|
|
|
| 71 |
<div id="auth-menu-wrap" class="auth-menu-wrap is-hidden">
|
| 72 |
<div class="auth-dropdown">
|
| 73 |
<button id="auth-menu-trigger" class="auth-menu-trigger" type="button" aria-label="قائمة الحساب" aria-haspopup="true" aria-expanded="false">
|
| 74 |
+
<span id="auth-avatar" class="auth-avatar" aria-hidden="true"><svg width="18" height="18" fill="currentColor" viewBox="0 0 24 24"><path d="M12 12c2.7 0 4.8-2.1 4.8-4.8S14.7 2.4 12 2.4 7.2 4.5 7.2 7.2 9.3 12 12 12zm0 2.4c-3.2 0-9.6 1.6-9.6 4.8v2.4h19.2v-2.4c0-3.2-6.4-4.8-9.6-4.8z"/></svg></span>
|
| 75 |
<span id="auth-display-name" class="auth-display-name">ضيف</span>
|
| 76 |
<span class="auth-menu-chevron" aria-hidden="true">▾</span>
|
| 77 |
</button>
|
src/js/auth/auth-ui.js
CHANGED
|
@@ -160,7 +160,7 @@ function updateAuthUI(user) {
|
|
| 160 |
if (menuWrap) menuWrap.classList.remove('is-hidden');
|
| 161 |
if (nameEl) nameEl.textContent = 'ضيف';
|
| 162 |
if (providerEl) providerEl.textContent = 'ضيف';
|
| 163 |
-
if (avatarEl) avatarEl.
|
| 164 |
if (drawerName) drawerName.textContent = 'ضيف';
|
| 165 |
if (drawerProvider) drawerProvider.textContent = '';
|
| 166 |
// Show Google sign-in option, hide logout
|
|
@@ -193,7 +193,11 @@ function updateAuthUI(user) {
|
|
| 193 |
img.referrerPolicy = 'no-referrer';
|
| 194 |
avatarEl.appendChild(img);
|
| 195 |
} else {
|
| 196 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 197 |
}
|
| 198 |
}
|
| 199 |
|
|
|
|
| 160 |
if (menuWrap) menuWrap.classList.remove('is-hidden');
|
| 161 |
if (nameEl) nameEl.textContent = 'ضيف';
|
| 162 |
if (providerEl) providerEl.textContent = 'ضيف';
|
| 163 |
+
if (avatarEl) avatarEl.innerHTML = '<svg width="18" height="18" fill="currentColor" viewBox="0 0 24 24"><path d="M12 12c2.7 0 4.8-2.1 4.8-4.8S14.7 2.4 12 2.4 7.2 4.5 7.2 7.2 9.3 12 12 12zm0 2.4c-3.2 0-9.6 1.6-9.6 4.8v2.4h19.2v-2.4c0-3.2-6.4-4.8-9.6-4.8z"/></svg>';
|
| 164 |
if (drawerName) drawerName.textContent = 'ضيف';
|
| 165 |
if (drawerProvider) drawerProvider.textContent = '';
|
| 166 |
// Show Google sign-in option, hide logout
|
|
|
|
| 193 |
img.referrerPolicy = 'no-referrer';
|
| 194 |
avatarEl.appendChild(img);
|
| 195 |
} else {
|
| 196 |
+
if (isGuestUser(user)) {
|
| 197 |
+
avatarEl.innerHTML = '<svg width="18" height="18" fill="currentColor" viewBox="0 0 24 24"><path d="M12 12c2.7 0 4.8-2.1 4.8-4.8S14.7 2.4 12 2.4 7.2 4.5 7.2 7.2 9.3 12 12 12zm0 2.4c-3.2 0-9.6 1.6-9.6 4.8v2.4h19.2v-2.4c0-3.2-6.4-4.8-9.6-4.8z"/></svg>';
|
| 198 |
+
} else {
|
| 199 |
+
avatarEl.textContent = displayName.charAt(0).toUpperCase();
|
| 200 |
+
}
|
| 201 |
}
|
| 202 |
}
|
| 203 |
|