Skip to content

Commit f8ab515

Browse files
committed
first commit
1 parent 2154035 commit f8ab515

36 files changed

+2232
-268
lines changed

.prettierrc

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"printWidth": 80,
3+
"semi": true,
4+
"vueIndentScriptAndStyle": false,
5+
"bracketSpacing": true,
6+
"bracketSameLine": false,
7+
"singleAttributePerLine": false,
8+
"plugins": ["prettier-plugin-tailwindcss"]
9+
}

app/favicon.ico

-10.3 KB
Binary file not shown.

app/globals.css

+70-15
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,81 @@
22
@tailwind components;
33
@tailwind utilities;
44

5+
html,
6+
body,
57
:root {
6-
--foreground-rgb: 0, 0, 0;
7-
--background-start-rgb: 214, 219, 220;
8-
--background-end-rgb: 255, 255, 255;
8+
height: 100%;
99
}
1010

11-
@media (prefers-color-scheme: dark) {
11+
@layer base {
1212
:root {
13-
--foreground-rgb: 255, 255, 255;
14-
--background-start-rgb: 0, 0, 0;
15-
--background-end-rgb: 0, 0, 0;
13+
--background: 0 0% 100%;
14+
--foreground: 0 0% 3.9%;
15+
16+
--card: 0 0% 100%;
17+
--card-foreground: 0 0% 3.9%;
18+
19+
--popover: 0 0% 100%;
20+
--popover-foreground: 0 0% 3.9%;
21+
22+
--primary: 0 0% 9%;
23+
--primary-foreground: 0 0% 98%;
24+
25+
--secondary: 0 0% 96.1%;
26+
--secondary-foreground: 0 0% 9%;
27+
28+
--muted: 0 0% 96.1%;
29+
--muted-foreground: 0 0% 45.1%;
30+
31+
--accent: 0 0% 96.1%;
32+
--accent-foreground: 0 0% 9%;
33+
34+
--destructive: 0 84.2% 60.2%;
35+
--destructive-foreground: 0 0% 98%;
36+
37+
--border: 0 0% 89.8%;
38+
--input: 0 0% 89.8%;
39+
--ring: 0 0% 3.9%;
40+
41+
--radius: 0.5rem;
42+
}
43+
44+
.dark {
45+
--background: 0 0% 3.9%;
46+
--foreground: 0 0% 98%;
47+
48+
--card: 0 0% 3.9%;
49+
--card-foreground: 0 0% 98%;
50+
51+
--popover: 0 0% 3.9%;
52+
--popover-foreground: 0 0% 98%;
53+
54+
--primary: 0 0% 98%;
55+
--primary-foreground: 0 0% 9%;
56+
57+
--secondary: 0 0% 14.9%;
58+
--secondary-foreground: 0 0% 98%;
59+
60+
--muted: 0 0% 14.9%;
61+
--muted-foreground: 0 0% 63.9%;
62+
63+
--accent: 0 0% 14.9%;
64+
--accent-foreground: 0 0% 98%;
65+
66+
--destructive: 0 62.8% 30.6%;
67+
--destructive-foreground: 0 0% 98%;
68+
69+
--border: 0 0% 14.9%;
70+
--input: 0 0% 14.9%;
71+
--ring: 0 0% 83.1%;
1672
}
1773
}
1874

19-
body {
20-
color: rgb(var(--foreground-rgb));
21-
background: linear-gradient(
22-
to bottom,
23-
transparent,
24-
rgb(var(--background-end-rgb))
25-
)
26-
rgb(var(--background-start-rgb));
75+
@layer base {
76+
* {
77+
@apply border-border;
78+
}
79+
body {
80+
@apply bg-background text-foreground;
81+
}
2782
}

app/layout.tsx

+18-11
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,29 @@
1-
import type { Metadata } from 'next'
2-
import { Inter } from 'next/font/google'
3-
import './globals.css'
1+
import type { Metadata } from "next";
2+
import { Inter } from "next/font/google";
3+
import "./globals.css";
44

5-
const inter = Inter({ subsets: ['latin'] })
5+
import { ThemeProvider } from "@/providers/theme-provider";
6+
import { config } from "@/constants";
7+
8+
const inter = Inter({ subsets: ["latin"] });
69

710
export const metadata: Metadata = {
8-
title: 'Create Next App',
9-
description: 'Generated by create next app',
10-
}
11+
title: "Ahmed Mayara",
12+
description: config.description,
13+
};
1114

1215
export default function RootLayout({
1316
children,
1417
}: {
15-
children: React.ReactNode
18+
children: React.ReactNode;
1619
}) {
1720
return (
18-
<html lang="en">
19-
<body className={inter.className}>{children}</body>
21+
<html lang="en" suppressHydrationWarning>
22+
<body className={inter.className}>
23+
<ThemeProvider attribute="class" defaultTheme="system" enableSystem>
24+
{children}
25+
</ThemeProvider>
26+
</body>
2027
</html>
21-
)
28+
);
2229
}

app/page.tsx

+14-107
Original file line numberDiff line numberDiff line change
@@ -1,113 +1,20 @@
1-
import Image from 'next/image'
1+
import { Container } from "@/components/container";
2+
import { Footer } from "@/components/footer";
3+
import { LeftPanel } from "@/components/left-panel";
4+
import { RightPanel } from "@/components/right-panel";
25

36
export default function Home() {
47
return (
5-
<main className="flex min-h-screen flex-col items-center justify-between p-24">
6-
<div className="z-10 max-w-5xl w-full items-center justify-between font-mono text-sm lg:flex">
7-
<p className="fixed left-0 top-0 flex w-full justify-center border-b border-gray-300 bg-gradient-to-b from-zinc-200 pb-6 pt-8 backdrop-blur-2xl dark:border-neutral-800 dark:bg-zinc-800/30 dark:from-inherit lg:static lg:w-auto lg:rounded-xl lg:border lg:bg-gray-200 lg:p-4 lg:dark:bg-zinc-800/30">
8-
Get started by editing&nbsp;
9-
<code className="font-mono font-bold">app/page.tsx</code>
10-
</p>
11-
<div className="fixed bottom-0 left-0 flex h-48 w-full items-end justify-center bg-gradient-to-t from-white via-white dark:from-black dark:via-black lg:static lg:h-auto lg:w-auto lg:bg-none">
12-
<a
13-
className="pointer-events-none flex place-items-center gap-2 p-8 lg:pointer-events-auto lg:p-0"
14-
href="https://vercel.com?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
15-
target="_blank"
16-
rel="noopener noreferrer"
17-
>
18-
By{' '}
19-
<Image
20-
src="/vercel.svg"
21-
alt="Vercel Logo"
22-
className="dark:invert"
23-
width={100}
24-
height={24}
25-
priority
26-
/>
27-
</a>
28-
</div>
29-
</div>
30-
31-
<div className="relative flex place-items-center before:absolute before:h-[300px] before:w-[480px] before:-translate-x-1/2 before:rounded-full before:bg-gradient-radial before:from-white before:to-transparent before:blur-2xl before:content-[''] after:absolute after:-z-20 after:h-[180px] after:w-[240px] after:translate-x-1/3 after:bg-gradient-conic after:from-sky-200 after:via-blue-200 after:blur-2xl after:content-[''] before:dark:bg-gradient-to-br before:dark:from-transparent before:dark:to-blue-700 before:dark:opacity-10 after:dark:from-sky-900 after:dark:via-[#0141ff] after:dark:opacity-40 before:lg:h-[360px] z-[-1]">
32-
<Image
33-
className="relative dark:drop-shadow-[0_0_0.3rem_#ffffff70] dark:invert"
34-
src="/next.svg"
35-
alt="Next.js Logo"
36-
width={180}
37-
height={37}
38-
priority
39-
/>
40-
</div>
41-
42-
<div className="mb-32 grid text-center lg:max-w-5xl lg:w-full lg:mb-0 lg:grid-cols-4 lg:text-left">
43-
<a
44-
href="https://nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
45-
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
46-
target="_blank"
47-
rel="noopener noreferrer"
48-
>
49-
<h2 className={`mb-3 text-2xl font-semibold`}>
50-
Docs{' '}
51-
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
52-
-&gt;
53-
</span>
54-
</h2>
55-
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
56-
Find in-depth information about Next.js features and API.
57-
</p>
58-
</a>
8+
<Container>
9+
<main className="flex h-full w-full flex-col gap-6 px-6 xl:flex-row xl:gap-10">
10+
<LeftPanel />
5911

60-
<a
61-
href="https://nextjs.org/learn?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
62-
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
63-
target="_blank"
64-
rel="noopener noreferrer"
65-
>
66-
<h2 className={`mb-3 text-2xl font-semibold`}>
67-
Learn{' '}
68-
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
69-
-&gt;
70-
</span>
71-
</h2>
72-
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
73-
Learn about Next.js in an interactive course with&nbsp;quizzes!
74-
</p>
75-
</a>
12+
<RightPanel />
7613

77-
<a
78-
href="https://vercel.com/templates?framework=next.js&utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
79-
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
80-
target="_blank"
81-
rel="noopener noreferrer"
82-
>
83-
<h2 className={`mb-3 text-2xl font-semibold`}>
84-
Templates{' '}
85-
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
86-
-&gt;
87-
</span>
88-
</h2>
89-
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
90-
Explore starter templates for Next.js.
91-
</p>
92-
</a>
93-
94-
<a
95-
href="https://vercel.com/new?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
96-
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
97-
target="_blank"
98-
rel="noopener noreferrer"
99-
>
100-
<h2 className={`mb-3 text-2xl font-semibold`}>
101-
Deploy{' '}
102-
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
103-
-&gt;
104-
</span>
105-
</h2>
106-
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
107-
Instantly deploy your Next.js site to a shareable URL with Vercel.
108-
</p>
109-
</a>
110-
</div>
111-
</main>
112-
)
14+
<div className="block pb-6 xl:hidden">
15+
<Footer />
16+
</div>
17+
</main>
18+
</Container>
19+
);
11320
}

components.json

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"$schema": "https://ui.shadcn.com/schema.json",
3+
"style": "new-york",
4+
"rsc": true,
5+
"tsx": true,
6+
"tailwind": {
7+
"config": "tailwind.config.ts",
8+
"css": "app/globals.css",
9+
"baseColor": "neutral",
10+
"cssVariables": true
11+
},
12+
"aliases": {
13+
"components": "@/components",
14+
"utils": "@/lib/utils"
15+
}
16+
}

components/container.tsx

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
"use client";
2+
3+
import React from "react";
4+
5+
export function Container({ children }: { children: React.ReactNode }) {
6+
return <div className="mx-auto w-full max-w-[1500px]">{children}</div>;
7+
}

components/experience-item.tsx

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import { GridItem } from "@/types";
2+
import React from "react";
3+
4+
interface ExperienceItemProps {
5+
item: GridItem;
6+
}
7+
8+
export default function ExperienceItem({ item }: ExperienceItemProps) {
9+
return (
10+
<div className="flex flex-col">
11+
{item.icon ? <item.icon className="h-8 w-8" /> : null}
12+
<h1 className="w-full pt-2 text-lg font-semibold md:text-xl">
13+
{item.title}
14+
</h1>
15+
<p className="text-md w-full text-muted-foreground md:text-lg">
16+
{item.description}
17+
</p>
18+
19+
<span className="text-md w-full pt-2 text-muted-foreground">
20+
{item.startDate} - {item.endDate}
21+
</span>
22+
</div>
23+
);
24+
}

components/footer.tsx

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import React from "react";
2+
3+
import { Separator } from "@/components/ui/separator";
4+
import { ThemeSwitcher } from "@/components/theme-switcher";
5+
6+
export function Footer() {
7+
return (
8+
<>
9+
<Separator className="mt-4" />
10+
11+
<div className="mt-2 flex items-center justify-between">
12+
<p className="text-xs font-light text-muted-foreground">
13+
Built by Ahmed Mayara | &copy; {new Date().getFullYear()}. All rights
14+
reserved.
15+
</p>
16+
17+
<ThemeSwitcher />
18+
</div>
19+
</>
20+
);
21+
}

components/grid-item.tsx

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
"use client";
2+
3+
import { cn } from "@/lib/utils";
4+
import { cva, type VariantProps } from "class-variance-authority";
5+
6+
import { motion } from "framer-motion";
7+
8+
const variants = cva(
9+
"flex flex-col justify-center rounded-2xl border shadow-xl hover:bg-neutral-100 dark:bg-neutral-900 dark:hover:bg-neutral-800",
10+
{
11+
variants: {
12+
size: {
13+
"1x2": "md:col-span-1 col-span-2 row-span-2 md:p-8 p-4",
14+
"2x2": "md:col-span-2 col-span-full row-span-2 md:p-8 p-4",
15+
"2x1": "md:col-span-2 col-span-full row-span-1 py-4 md:px-8 px-4",
16+
"2x4":
17+
"md:col-span-2 col-span-full row-span-4 relative overflow-hidden",
18+
},
19+
},
20+
defaultVariants: {
21+
size: "1x2",
22+
},
23+
},
24+
);
25+
26+
export type GridItemProps = { children: React.ReactNode } & VariantProps<
27+
typeof variants
28+
>;
29+
30+
export function GridItem({ children, size }: GridItemProps) {
31+
return (
32+
<motion.div
33+
initial={{
34+
scale: 0.2,
35+
y: 120,
36+
opacity: 0,
37+
}}
38+
className={cn(
39+
"transition-colors duration-150 ease-in-out",
40+
variants({
41+
size,
42+
}),
43+
)}
44+
>
45+
{children}
46+
</motion.div>
47+
);
48+
}

0 commit comments

Comments
 (0)