Skip to content

Commit 2ef25e8

Browse files
committed
Dark mode
1 parent 6c43914 commit 2ef25e8

File tree

2 files changed

+28
-25
lines changed

2 files changed

+28
-25
lines changed

components/dashboard/DashboardHeader.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const DashboardHeader = () => {
1717
<>
1818
<div className="flex justify-between items-center p-4 shadow-sm">
1919
<button
20-
className="inline-flex items-center p-2 text-gray-500 rounded-lg sm:hidden hover:bg-gray-200 dark:bg-slate-800 hover:dark:bg-slate-900 focus:outline-none focus:ring-2 "
20+
className="inline-flex items-center p-2 text-gray-500 rounded-lg sm:hidden hover:bg-gray-200 dark:bg-slate-800 hover:dark:bg-slate-600 focus:outline-none focus:ring-2 "
2121
onClick={() => setIsSidebarOpen(!isSidebarOpen)}
2222
>
2323
<span className="sr-only">Open sidebar</span>
@@ -65,10 +65,10 @@ const DashboardHeader = () => {
6565
<img src={session?.user?.image} alt={session?.user?.name} className='w-24 h-24 mb-3 rounded-full shadow-lg' />
6666
<h5 className="mb-1 text-xl font-medium text-gray-900 dark:text-white">{session?.user?.name}</h5>
6767
<span className="text-sm text-gray-600 dark:text-white">{session?.user?.email}</span>
68-
<Button variant='outline' className='w-full mt-2' onClick={() => { window.location.href = '/dashboard' }}>
68+
<Button variant='outline' className='w-full mt-2 dark:hover:bg-slate-900' onClick={() => { window.location.href = '/dashboard' }}>
6969
Dashboard
7070
</Button>
71-
<Button variant='outline' onClick={logout} className='w-full mt-2'>
71+
<Button variant='outline' onClick={logout} className='w-full mt-2 dark:hover:bg-slate-900'>
7272
Logout
7373
</Button>
7474
</div>

pages/login/index.js

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -13,27 +13,30 @@ const Login = () => {
1313
}
1414
}, [session, router]);
1515

16-
return <>
17-
<section>
18-
<div className="py-8 px-4 mx-auto max-w-screen-xl text-center lg:py-10 relative z-10">
19-
<h1 className="mb-4 text-4xl font-extrabold tracking-tight leading-none text-gray-900 md:text-5xl lg:text-6xl">
20-
We invest in the future of development.
21-
</h1>
22-
<p className="mb-8 text-lg font-normal text-gray-500 lg:text-xl sm:px-16 lg:px-48 dark:text-gray-200">Here at Design2Code we focus on helping you find the best full stack templates and Designs built by developers for developers.</p>
23-
{session ? (
24-
<Button variant='default' onClick={ () => {window.location.href = '/dashboard'}}>
25-
Share your templates
26-
</Button>
27-
) : (
28-
<Button variant='default' onClick={() => signIn('google')}>
29-
Continue with google
30-
</Button>
31-
)}
32-
</div>
33-
<img src="/login.png" alt="hero image" className="object-cover w-full max-w-xl mx-auto h-auto" />
34-
35-
</section>
36-
</>
16+
return (
17+
<>
18+
<section>
19+
<div className="py-8 px-4 mx-auto max-w-screen-xl text-center lg:py-10 relative z-10">
20+
<h1 className="mb-4 text-4xl font-extrabold tracking-tight leading-none text-gray-900 dark:text-gray-200 md:text-5xl lg:text-6xl">
21+
We invest in the future of development.
22+
</h1>
23+
<p className="mb-8 text-lg font-normal text-gray-500 dark:text-gray-300 lg:text-xl sm:px-16 lg:px-48">
24+
Here at Design2Code we focus on helping you find the best full stack templates and designs built by developers for developers.
25+
</p>
26+
{session ? (
27+
<Button variant='default' onClick={() => { window.location.href = '/dashboard' }}>
28+
Share your templates
29+
</Button>
30+
) : (
31+
<Button variant='default' onClick={() => signIn('google')}>
32+
Continue with Google
33+
</Button>
34+
)}
35+
</div>
36+
<img src="/login.png" alt="hero image" className="object-cover w-full max-w-xl mx-auto h-auto" />
37+
</section>
38+
</>
39+
)
3740
}
3841

39-
export default Login
42+
export default Login

0 commit comments

Comments
 (0)