feat: Implement dark mode support by adjusting background and text colors across various pages and components.
This commit is contained in:
@@ -22,7 +22,7 @@ export default function AuthGuard({ children }: { children: React.ReactNode }) {
|
||||
|
||||
if (loading) {
|
||||
return (
|
||||
<div className="min-h-screen bg-gray-950 flex items-center justify-center">
|
||||
<div className="min-h-screen bg-transparent flex items-center justify-center">
|
||||
<div className="w-12 h-12 border-4 border-blue-500/20 border-t-blue-500 rounded-full animate-spin"></div>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -32,8 +32,8 @@ export default function CourseEditorLayout({ children, activeTab }: CourseEditor
|
||||
return (
|
||||
<div className="space-y-8">
|
||||
{/* Tabs Navigation */}
|
||||
<nav className="glass p-1" aria-label="Course editor tabs">
|
||||
<ul className="flex border-b border-white/10 overflow-x-auto scrollbar-thin scrollbar-thumb-white/10 scrollbar-track-transparent">
|
||||
<nav className="glass p-1 bg-black/[0.02] dark:bg-white/[0.02] border border-black/5 dark:border-white/5 rounded-xl" aria-label="Course editor tabs">
|
||||
<ul className="flex border-b border-black/5 dark:border-white/10 overflow-x-auto scrollbar-thin scrollbar-thumb-black/10 dark:scrollbar-thumb-white/10 scrollbar-track-transparent">
|
||||
{tabs.map((tab) => {
|
||||
const Icon = tab.icon;
|
||||
const isActive = tab.key === activeTab;
|
||||
@@ -43,8 +43,8 @@ export default function CourseEditorLayout({ children, activeTab }: CourseEditor
|
||||
href={tab.href}
|
||||
aria-current={isActive ? "page" : undefined}
|
||||
className={`flex items-center gap-1.5 px-4 py-3 text-sm font-medium transition-colors whitespace-nowrap flex-shrink-0 ${isActive
|
||||
? "border-b-2 border-blue-500 bg-white/5 text-white"
|
||||
: "text-gray-500 hover:text-white"
|
||||
? "border-b-2 border-blue-600 dark:border-blue-500 bg-black/5 dark:bg-white/5 text-blue-600 dark:text-white"
|
||||
: "text-gray-500 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white"
|
||||
}`}
|
||||
>
|
||||
<Icon className="w-4 h-4 flex-shrink-0" aria-hidden="true" />
|
||||
|
||||
@@ -18,7 +18,7 @@ export function Navbar() {
|
||||
const platformName = branding?.platform_name || 'OpenCCB';
|
||||
|
||||
return (
|
||||
<nav className="fixed top-0 w-full z-50 glass border-b border-white/10 bg-black/40 backdrop-blur-xl">
|
||||
<nav className="fixed top-0 w-full z-50 glass border-b border-black/5 dark:border-white/10 bg-gray-50/70 dark:bg-black/40 backdrop-blur-xl">
|
||||
<div className="max-w-7xl mx-auto px-4 h-16 flex items-center justify-between">
|
||||
<Link href="/" className="flex items-center gap-2 md:gap-4 group" aria-label={`${platformName} Studio - Dashboard`}>
|
||||
<div className={`rounded-lg md:rounded-xl bg-blue-600 flex items-center justify-center font-black text-white shadow-lg shadow-blue-500/20 group-hover:scale-105 transition-all overflow-hidden relative border border-white/5 ${branding?.logo_variant === 'wide' ? 'w-32 h-8 md:w-48 md:h-10 px-2 bg-white' : 'w-8 h-8 md:w-10 md:h-10'}`}>
|
||||
@@ -32,10 +32,10 @@ export function Navbar() {
|
||||
</div>
|
||||
{branding?.logo_variant !== 'wide' && (
|
||||
<div className="flex flex-col -gap-1">
|
||||
<span className="font-black text-sm md:text-lg tracking-tighter text-white leading-none">
|
||||
<span className="font-black text-sm md:text-lg tracking-tighter text-gray-900 dark:text-white leading-none">
|
||||
{platformName.toUpperCase()}
|
||||
</span>
|
||||
<span className="text-[8px] md:text-[10px] font-black tracking-widest text-blue-500 uppercase">STUDIO</span>
|
||||
<span className="text-[8px] md:text-[10px] font-black tracking-widest text-blue-600 dark:text-blue-500 uppercase">STUDIO</span>
|
||||
</div>
|
||||
)}
|
||||
</Link>
|
||||
@@ -44,7 +44,7 @@ export function Navbar() {
|
||||
<div className="flex items-center gap-4">
|
||||
<Link
|
||||
href="/"
|
||||
className="text-sm font-medium text-gray-400 hover:text-blue-400 transition-colors flex items-center gap-2"
|
||||
className="text-sm font-medium text-gray-500 dark:text-gray-400 hover:text-blue-600 dark:hover:text-blue-400 transition-colors flex items-center gap-2"
|
||||
>
|
||||
<LayoutDashboard className="w-4 h-4" />
|
||||
{t('nav.courses')}
|
||||
@@ -52,7 +52,7 @@ export function Navbar() {
|
||||
|
||||
<Link
|
||||
href="/library/assets"
|
||||
className="text-sm font-medium text-gray-400 hover:text-blue-400 transition-colors flex items-center gap-2"
|
||||
className="text-sm font-medium text-gray-500 dark:text-gray-400 hover:text-blue-600 dark:hover:text-blue-400 transition-colors flex items-center gap-2"
|
||||
>
|
||||
<Library className="w-4 h-4" aria-hidden="true" />
|
||||
{t('nav.library') || 'Library'}
|
||||
@@ -117,9 +117,9 @@ export function Navbar() {
|
||||
aria-label={t('nav.selectLanguage') || 'Select Language'}
|
||||
className="bg-transparent text-[10px] font-black uppercase tracking-widest text-gray-400 hover:text-white transition-colors focus:outline-none cursor-pointer"
|
||||
>
|
||||
<option value="en" className="bg-gray-900">EN</option>
|
||||
<option value="es" className="bg-gray-900">ES</option>
|
||||
<option value="pt" className="bg-gray-900">PT</option>
|
||||
<option value="en" className="bg-white dark:bg-gray-900">EN</option>
|
||||
<option value="es" className="bg-white dark:bg-gray-900">ES</option>
|
||||
<option value="pt" className="bg-white dark:bg-gray-900">PT</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
@@ -128,12 +128,12 @@ export function Navbar() {
|
||||
{user ? (
|
||||
<div className="flex items-center gap-4">
|
||||
<div className="flex flex-col items-end">
|
||||
<span className="text-xs font-medium text-white">{user.full_name}</span>
|
||||
<span className="text-xs font-medium text-gray-900 dark:text-white">{user.full_name}</span>
|
||||
<span className="text-[10px] text-gray-500 uppercase tracking-wider">{user.role}</span>
|
||||
</div>
|
||||
<button
|
||||
onClick={logout}
|
||||
className="p-2 hover:bg-red-500/10 hover:text-red-400 rounded-lg transition-all text-gray-500"
|
||||
className="p-2 hover:bg-red-500/10 hover:text-red-600 dark:hover:text-red-400 rounded-lg transition-all text-gray-500"
|
||||
title={t('nav.signOut') || "Sign Out"}
|
||||
aria-label={t('nav.signOut') || "Sign Out"}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user