Skip to content

Commit 1030dd7

Browse files
committed
chore: almost done
1 parent 4f4bad0 commit 1030dd7

37 files changed

+1076
-263
lines changed

components.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"tailwind": {
77
"config": "tailwind.config.js",
88
"css": "app/globals.css",
9-
"baseColor": "gray",
9+
"baseColor": "neutral",
1010
"cssVariables": true,
1111
"prefix": ""
1212
},

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"discord-oauth2": "^2.11.0",
2929
"discord.js": "^14.14.1",
3030
"jsonwebtoken": "^9.0.2",
31-
"lucide-react": "^0.307.0",
31+
"lucide-react": "^0.321.0",
3232
"next": "14.0.2",
3333
"next-auth": "^4.24.5",
3434
"next-themes": "^0.2.1",
@@ -39,7 +39,7 @@
3939
"react-notion-x": "^6.16.0",
4040
"react-resizable-panels": "^1.0.7",
4141
"recoil": "^0.7.7",
42-
"tailwind-merge": "^2.2.0",
42+
"tailwind-merge": "^2.2.1",
4343
"tailwindcss-animate": "^1.0.7",
4444
"video.js": "^8.6.1",
4545
"videojs-contrib-eme": "^3.11.1",

public/fonts/font.woff2

40 KB
Binary file not shown.

public/harkirat.png

73.5 KB
Loading

public/next.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

public/platform/dashboard.png

1.71 MB
Loading

public/platform/discord.png

1.22 MB
Loading

public/platform/platform.png

700 KB
Loading

public/platform/playstore.png

50.8 KB
Loading

public/vercel.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/app/(marketing)/layout.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import React from 'react';
2+
3+
const MarketingLayout = ({ children }: { children: React.ReactNode }) => {
4+
return (
5+
<div>
6+
<main className="pt-36 pb-20">{children}</main>
7+
</div>
8+
);
9+
};
10+
11+
export default MarketingLayout;

src/app/page.tsx renamed to src/app/(marketing)/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { LoginGate } from '@/components/LoginGate';
21
import { MyCourses } from '@/components/MyCourses';
2+
import LandingPage from '@/components/landing/landing-page';
33
import { authOptions } from '@/lib/auth';
44
import { getServerSession } from 'next-auth';
55

@@ -23,5 +23,5 @@ export default async function Home() {
2323
);
2424
}
2525

26-
return <LoginGate />;
26+
return <LandingPage />;
2727
}

src/app/globals.css

Lines changed: 9 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,54 @@
11
@tailwind base;
22
@tailwind components;
33
@tailwind utilities;
4-
4+
55
@layer base {
66
:root {
77
--background: 0 0% 100%;
88
--foreground: 222.2 84% 4.9%;
9-
109
--card: 0 0% 100%;
1110
--card-foreground: 222.2 84% 4.9%;
12-
1311
--popover: 0 0% 100%;
1412
--popover-foreground: 222.2 84% 4.9%;
15-
16-
--primary: 222.2 47.4% 11.2%;
13+
--primary: 221.2 83.2% 53.3%;
1714
--primary-foreground: 210 40% 98%;
18-
1915
--secondary: 210 40% 96.1%;
2016
--secondary-foreground: 222.2 47.4% 11.2%;
21-
2217
--muted: 210 40% 96.1%;
2318
--muted-foreground: 215.4 16.3% 46.9%;
24-
2519
--accent: 210 40% 96.1%;
2620
--accent-foreground: 222.2 47.4% 11.2%;
27-
2821
--destructive: 0 84.2% 60.2%;
2922
--destructive-foreground: 210 40% 98%;
30-
3123
--border: 214.3 31.8% 91.4%;
3224
--input: 214.3 31.8% 91.4%;
33-
--ring: 222.2 84% 4.9%;
34-
25+
--ring: 221.2 83.2% 53.3%;
3526
--radius: 0.5rem;
3627
}
37-
28+
3829
.dark {
3930
--background: 222.2 84% 4.9%;
4031
--foreground: 210 40% 98%;
41-
4232
--card: 222.2 84% 4.9%;
4333
--card-foreground: 210 40% 98%;
44-
4534
--popover: 222.2 84% 4.9%;
4635
--popover-foreground: 210 40% 98%;
47-
48-
--primary: 210 40% 98%;
36+
--primary: 217.2 91.2% 59.8%;
4937
--primary-foreground: 222.2 47.4% 11.2%;
50-
5138
--secondary: 217.2 32.6% 17.5%;
5239
--secondary-foreground: 210 40% 98%;
53-
5440
--muted: 217.2 32.6% 17.5%;
5541
--muted-foreground: 215 20.2% 65.1%;
56-
5742
--accent: 217.2 32.6% 17.5%;
5843
--accent-foreground: 210 40% 98%;
59-
6044
--destructive: 0 62.8% 30.6%;
6145
--destructive-foreground: 210 40% 98%;
62-
6346
--border: 217.2 32.6% 17.5%;
6447
--input: 217.2 32.6% 17.5%;
65-
--ring: 212.7 26.8% 83.9%;
48+
--ring: 224.3 76.3% 48%;
6649
}
6750
}
68-
51+
6952
@layer base {
7053
* {
7154
@apply border-border;
@@ -75,5 +58,5 @@
7558
}
7659
}
7760
.video-js .vjs-progress-control:hover .vjs-play-progress:after {
78-
display:none;
79-
}
61+
display: none;
62+
}

src/app/layout.tsx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,23 @@ import './globals.css';
66
import { Appbar } from '@/components/Appbar';
77
import { Providers } from './providers';
88
import { GoogleAnalytics } from '@/components/analytics/GoogleAnalytics';
9+
import { siteConfig } from '@/config/site-config';
10+
import Footer from '@/components/landing/footer/footer';
911

1012
const fontSans = FontSans({
1113
subsets: ['latin'],
1214
variable: '--font-sans',
1315
});
1416

1517
export const metadata: Metadata = {
16-
title: '100xdevs cohort',
17-
description: '100xdevs Cohort by Harkirat Singh',
18+
title: siteConfig.title,
19+
description: siteConfig.description,
20+
icons: [
21+
{
22+
url: '/harkirat.png',
23+
href: '/harkirat.png',
24+
},
25+
],
1826
};
1927

2028
export default function RootLayout({
@@ -34,6 +42,7 @@ export default function RootLayout({
3442
<Providers>
3543
<Appbar />
3644
{children}
45+
<Footer />
3746
</Providers>
3847
</body>
3948
</html>

src/components/Appbar.tsx

Lines changed: 60 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,76 @@
11
'use client';
2+
23
import Link from 'next/link';
34
import React from 'react';
4-
import {
5-
NavigationMenu,
6-
NavigationMenuItem,
7-
NavigationMenuLink,
8-
NavigationMenuList,
9-
navigationMenuTriggerStyle,
10-
} from '@/components/ui/navigation-menu';
115
import { JoinDiscord } from './JoinDiscord';
126
import { AppbarAuth } from './AppbarAuth';
137
import { useSession } from 'next-auth/react';
8+
import Logo from './landing/logo/logo';
9+
import { Button } from './ui/button';
10+
import { Sparkles } from 'lucide-react';
1411

1512
export const Appbar = () => {
1613
const session = useSession();
1714

1815
return (
19-
<nav className="">
20-
<div className="flex flex-wrap items-center justify-between mx-auto p-4">
21-
<div className="flex">
22-
<Link
23-
href="/"
24-
className="flex items-center space-x-3 rtl:space-x-reverse"
25-
>
26-
<img
27-
src="https://appx-wsb.classx.co.in/subject/2023-01-17-0.17044360120951185.jpg"
28-
className="h-8 rounded-full"
29-
alt="Flowbite Logo"
30-
/>
31-
<span className="self-center text-2xl font-semibold whitespace-nowrap dark:text-white">
32-
100xdevs
33-
</span>
34-
</Link>
35-
<div className="flex justify-center ml-4">
36-
{session?.data?.user ? (
37-
<NavigationMenu>
38-
<NavigationMenuList>
39-
<NavigationMenuItem>
40-
<JoinDiscord />
41-
</NavigationMenuItem>
42-
<NavigationMenuItem>
43-
<Link
44-
href="https://github.com/100xdevs-cohort-2/assignments"
45-
legacyBehavior
46-
passHref
16+
<nav className="fixed z-50 top-0 px-4 w-full h-16 border-b shadow-sm bg-background/60 backdrop-blur-md flex items-center">
17+
<div className="md:max-w-screen-2xl mx-auto flex items-center justify-between w-full">
18+
<Logo />
19+
{/* {session?.data?.user ? (
20+
<NavigationMenu>
21+
<NavigationMenuList>
22+
<NavigationMenuItem>
23+
<JoinDiscord />
24+
</NavigationMenuItem>
25+
26+
<NavigationMenuItem>
27+
<Link
28+
href="https://github.com/100xdevs-cohort-2/assignments"
29+
legacyBehavior
30+
passHref
31+
>
32+
<NavigationMenuLink
33+
className={navigationMenuTriggerStyle()}
4734
>
48-
<NavigationMenuLink
49-
className={navigationMenuTriggerStyle()}
50-
>
51-
Assignments
52-
</NavigationMenuLink>
53-
</Link>
54-
</NavigationMenuItem>
55-
</NavigationMenuList>
56-
</NavigationMenu>
57-
) : null}
35+
Assignments
36+
</NavigationMenuLink>
37+
</Link>
38+
</NavigationMenuItem>
39+
</NavigationMenuList>
40+
</NavigationMenu>
41+
) : null} */}
42+
43+
{session?.data?.user ? (
44+
<div className="flex items-center justify-around md:w-auto md:block space-x-2">
45+
<Button variant={'outline'} size={'sm'} asChild>
46+
<JoinDiscord isNavigated={false} />
47+
</Button>
48+
49+
<Button size={'sm'} asChild>
50+
<Link
51+
href={'https://github.com/100xdevs-cohort-2/assignments'}
52+
target="_blank"
53+
>
54+
Assignments
55+
</Link>
56+
</Button>
57+
58+
<AppbarAuth />
59+
</div>
60+
) : (
61+
<div className="flex items-center justify-around md:w-auto md:block space-x-3">
62+
<AppbarAuth />
63+
64+
<Button size={'sm'} asChild>
65+
<Link
66+
href={'https://harkirat.classx.co.in/new-courses'}
67+
target="_blank"
68+
>
69+
Join now <Sparkles className="ml-1 h-4 w-4" />
70+
</Link>
71+
</Button>
5872
</div>
59-
</div>
60-
<AppbarAuth />
73+
)}
6174
</div>
6275
</nav>
6376
);

src/components/AppbarAuth.tsx

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,28 @@
11
'use client';
2+
23
import { signOut } from 'next-auth/react';
34
import { useSession } from 'next-auth/react';
45
import { useRouter } from 'next/navigation';
6+
import { Button } from './ui/button';
57

68
export const AppbarAuth = () => {
79
const session = useSession();
810
const router = useRouter();
911

1012
return (
11-
<div className="hidden w-full md:block md:w-auto" id="navbar-default">
12-
<ul className="font-medium flex flex-col p-4 md:p-0 mt-4 border border-gray-100 rounded-lg bg-gray-50 md:flex-row md:space-x-8 rtl:space-x-reverse md:mt-0 md:border-0 md:bg-white dark:bg-gray-800 md:dark:bg-gray-900 dark:border-gray-700 p-4">
13-
<li>
14-
<div
15-
onClick={() => {
16-
if (session.data?.user) {
17-
signOut();
18-
} else {
19-
router.push('/api/auth/signin');
20-
}
21-
}}
22-
className="cursor-pointer p-2 "
23-
>
24-
{session.data?.user ? 'Logout' : 'Sign in'}
25-
</div>
26-
</li>
27-
</ul>
28-
</div>
13+
<Button
14+
size={'sm'}
15+
variant={'outline'}
16+
id="navbar-default"
17+
onClick={() => {
18+
if (session.data?.user) {
19+
signOut();
20+
} else {
21+
router.push('/api/auth/signin');
22+
}
23+
}}
24+
>
25+
{session.data?.user ? 'Logout' : 'Login'}
26+
</Button>
2927
);
3028
};

src/components/JoinDiscord.tsx

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,28 @@ import {
44
NavigationMenuLink,
55
navigationMenuTriggerStyle,
66
} from '@/components/ui/navigation-menu';
7+
import { Button } from './ui/button';
8+
9+
export const JoinDiscord = ({
10+
isNavigated = true,
11+
}: {
12+
isNavigated?: boolean
13+
}) => {
14+
if (isNavigated) {
15+
return (
16+
<Link href={getOauthUrl()} target="_blank" legacyBehavior passHref>
17+
<NavigationMenuLink className={navigationMenuTriggerStyle()}>
18+
Join Discord
19+
</NavigationMenuLink>
20+
</Link>
21+
);
22+
}
723

8-
export const JoinDiscord = () => {
924
return (
1025
<Link href={getOauthUrl()} target="_blank" legacyBehavior passHref>
11-
<NavigationMenuLink className={navigationMenuTriggerStyle()}>
26+
<Button variant={'outline'} size={'sm'}>
1227
Join Discord
13-
</NavigationMenuLink>
28+
</Button>
1429
</Link>
1530
);
1631
};

0 commit comments

Comments
 (0)