-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #81 from devxMani/master
Adding Dark mode / Light mode Toggle button
- Loading branch information
Showing
7 changed files
with
2,119 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,63 @@ | ||
"use client" | ||
import { Inter } from 'next/font/google' | ||
import './globals.css' | ||
import MyContextProvider from '@/context/SocketProvider' | ||
import Header from '@/components/Header'; | ||
import Footer from "@/components/Footer"; | ||
import { ClerkProvider } from '@clerk/nextjs'; | ||
import Header from '@/components/Header' | ||
import Footer from "@/components/Footer" | ||
import { ClerkProvider } from '@clerk/nextjs' | ||
import { ThemeProvider } from 'next-themes' | ||
|
||
const inter = Inter({ subsets: ['latin'] }) | ||
|
||
// Metadata moved outside of client component | ||
export const metadata = { | ||
title: 'Video Calling WebApp', | ||
description: 'Soumojit Shome Video Calling WebApp', | ||
}; | ||
} | ||
|
||
export default function RootLayout({ children }) { | ||
const baseUrl = process.env.NEXT_PUBLIC_FALLBACK_URL || 'https://soumojit-nextjs-videocall-webapp.vercel.app/'; | ||
const baseUrl = process.env.NEXT_PUBLIC_FALLBACK_URL || 'https://soumojit-nextjs-videocall-webapp.vercel.app/' | ||
|
||
return ( | ||
<ClerkProvider> | ||
<html lang="en"> | ||
<head> | ||
<title>{metadata.title}</title> | ||
<meta name="description" content={metadata.description} /> | ||
<meta | ||
name="keywords" | ||
content="Video calling, WebRTC, Communication app, Video conferencing, Soumojit Shome" | ||
/> | ||
<meta property="og:title" content="Video Calling WebApp" /> | ||
<meta | ||
property="og:description" | ||
content="A web application for seamless video calls built by Soumojit Shome." | ||
/> | ||
<meta property="og:image" content="/images/social-share-image.png" /> | ||
<meta property="og:url" content={baseUrl} /> | ||
<meta property="og:type" content="website" /> | ||
<meta name="robots" content="index, follow" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<link rel="icon" href="/favicon.ico" /> | ||
</head> | ||
<body className={inter.className}> | ||
<Header /> | ||
<MyContextProvider>{children}</MyContextProvider> | ||
<Footer /> | ||
</body> | ||
</html> | ||
<html lang="en" suppressHydrationWarning> | ||
<head> | ||
<title>{metadata.title}</title> | ||
<meta name="description" content={metadata.description} /> | ||
<meta | ||
name="keywords" | ||
content="Video calling, WebRTC, Communication app, Video conferencing, Soumojit Shome" | ||
/> | ||
<meta property="og:title" content="Video Calling WebApp" /> | ||
<meta | ||
property="og:description" | ||
content="A web application for seamless video calls built by Soumojit Shome." | ||
/> | ||
<meta property="og:image" content="/images/social-share-image.png" /> | ||
<meta property="og:url" content={baseUrl} /> | ||
<meta property="og:type" content="website" /> | ||
<meta name="robots" content="index, follow" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<meta name="color-scheme" content="light dark" /> | ||
<link rel="icon" href="/favicon.ico" /> | ||
</head> | ||
<body className={`${inter.className} antialiased`}> | ||
<ThemeProvider | ||
attribute="class" | ||
defaultTheme="system" | ||
enableSystem={true} | ||
disableTransitionOnChange={false} | ||
> | ||
<div className="min-h-screen bg-gradient-to-b from-background-start to-background-end"> | ||
<Header /> | ||
<main className="pt-16"> | ||
<MyContextProvider>{children}</MyContextProvider> | ||
</main> | ||
<Footer /> | ||
</div> | ||
</ThemeProvider> | ||
</body> | ||
</html> | ||
</ClerkProvider> | ||
); | ||
} | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,71 +1,92 @@ | ||
.header { | ||
background: linear-gradient(#0d1a3b,#132b67); | ||
padding: 1rem; | ||
color: #fff; | ||
z-index: 1; | ||
position: relative; | ||
@apply fixed top-0 left-0 right-0 z-50 px-4 py-2; | ||
background: rgba(255, 255, 255, 0.8); | ||
backdrop-filter: blur(8px); | ||
} | ||
|
||
.header.dark { | ||
background: rgba(15, 23, 42, 0.8); | ||
} | ||
|
||
.nav { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
@apply max-w-7xl mx-auto flex items-center justify-between; | ||
} | ||
|
||
.logo { | ||
font-size: 1.5rem; | ||
font-weight: bold; | ||
text-decoration: none; | ||
color: #fff; | ||
cursor: default; | ||
@apply text-xl font-bold text-blue-600 dark:text-blue-400; | ||
} | ||
|
||
.navLinks { | ||
list-style-type: none; | ||
display: flex; | ||
justify-content: space-between; | ||
gap: 1rem; | ||
margin: 0; | ||
padding: 0; | ||
width: 40%; | ||
flex-wrap: wrap; | ||
@apply hidden md:flex items-center space-x-8; | ||
} | ||
|
||
.navLink { | ||
text-decoration: none; | ||
color: #fff; | ||
@apply text-gray-600 hover:text-blue-600 dark:text-gray-300 dark:hover:text-blue-400 transition-colors duration-200; | ||
} | ||
|
||
/* Updated theme toggle button styles */ | ||
.theme-toggle-btn { | ||
padding: 8px; | ||
border-radius: 8px; | ||
background: transparent; | ||
border: none; | ||
cursor: pointer; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
transition: all 0.3s ease; | ||
@apply text-gray-600 dark:text-gray-300; | ||
@apply focus:outline-none focus:ring-2 focus:ring-blue-400 dark:focus:ring-blue-500; | ||
} | ||
|
||
.theme-toggle-btn:hover { | ||
background-color: rgba(0, 0, 0, 0.1); | ||
@apply dark:bg-white/10; | ||
} | ||
|
||
.navLink:hover { | ||
color: #007bff; | ||
.theme-toggle-btn svg { | ||
@apply w-5 h-5 transition-transform duration-200; | ||
} | ||
|
||
.buttonContainer { | ||
.theme-toggle-btn:hover svg { | ||
@apply rotate-12; | ||
} | ||
|
||
/* Layout utilities */ | ||
.flex { | ||
display: flex; | ||
align-items: center; | ||
} | ||
|
||
.button { | ||
padding: 0.5rem 1rem; | ||
background-color: #007bff; | ||
color: #fff; | ||
text-decoration: none; | ||
border-radius: 20px; | ||
transition: background-color 0.3s; | ||
.items-center { | ||
align-items: center; | ||
} | ||
|
||
.button:hover { | ||
background-color: #0056b3; | ||
.gap-4 { | ||
gap: 1rem; | ||
} | ||
|
||
/* Mobile navigation styles */ | ||
@media (max-width: 768px) { | ||
.nav { | ||
flex-direction: column; | ||
align-items: center; | ||
.navLinks { | ||
@apply absolute top-full left-0 right-0 flex-col items-start p-4 space-y-4 bg-white dark:bg-gray-900 border-t dark:border-gray-800; | ||
display: none; | ||
} | ||
|
||
.navLinks { | ||
margin: 1rem; | ||
width: 80%; | ||
.navLinks.active { | ||
display: flex; | ||
} | ||
} | ||
|
||
/* User button wrapper styles */ | ||
.user-button-wrapper { | ||
@apply ml-4; | ||
} | ||
|
||
/* Dark mode specific styles */ | ||
[data-theme='dark'] .theme-toggle-btn { | ||
color: #fff; | ||
} | ||
|
||
[data-theme='dark'] .theme-toggle-btn:hover { | ||
background-color: rgba(255, 255, 255, 0.1); | ||
} |
Oops, something went wrong.
cf9683a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR Merge (consisting of the PRs a988a63 and b943224) has unfortunately crashed the vercel deployment and also is causing issues for contributors to start the live server.
I would kindly advice you to revert the PR so that it doesn't cause further issues to the contributors.
cf9683a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Soumojitshome2023