UI/UX enhancements: refined footer layout, dashboard sidebar fixes, header tweaks, and theme alignment

This commit is contained in:
2026-08-05 13:07:36 +05:30
parent 6760a21a7e
commit 54f60d097e
13 changed files with 152 additions and 139 deletions

View File

@@ -37,14 +37,30 @@ export default function RootLayout({
dangerouslySetInnerHTML={{
__html: `
try {
if (window.location.pathname.startsWith('/dashboard') || window.location.pathname.startsWith('/cbt')) {
if (localStorage.getItem('theme') === 'dark' || (!localStorage.getItem('theme') && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
document.documentElement.classList.add('dark')
if (window.location.pathname.startsWith('/admin')) {
// Admin panel: uses its own separate theme key, defaults to dark
const adminTheme = localStorage.getItem('admin-theme');
if (adminTheme === 'dark' || !adminTheme) {
document.documentElement.classList.add('dark');
} else {
document.documentElement.classList.remove('dark')
document.documentElement.classList.remove('dark');
}
} else if (window.location.pathname.startsWith('/dashboard') || window.location.pathname.startsWith('/cbt')) {
// Dashboard: uses 'theme' key, defaults to light
const theme = localStorage.getItem('theme');
if (theme === 'dark') {
document.documentElement.classList.add('dark');
} else {
document.documentElement.classList.remove('dark');
}
} else {
document.documentElement.classList.add('dark')
// Public pages: uses 'theme' key, defaults to light
const theme = localStorage.getItem('theme');
if (theme === 'dark') {
document.documentElement.classList.add('dark');
} else {
document.documentElement.classList.remove('dark');
}
}
} catch (_) {}
`,