├── 01-Countdown-Timer
├── .eslintrc.json
├── app
│ ├── globals.css
│ ├── favicon.ico
│ ├── page.tsx
│ └── layout.tsx
├── next.config.mjs
├── postcss.config.mjs
├── lib
│ └── utils.ts
├── components.json
├── .gitignore
├── public
│ ├── vercel.svg
│ └── next.svg
├── tsconfig.json
├── package.json
├── components
│ ├── ui
│ │ ├── input.tsx
│ │ └── button.tsx
│ └── Countdown.tsx
├── README.md
└── tailwind.config.ts
├── 00-My-Portfolio
├── .eslintrc.json
├── src
│ ├── app
│ │ ├── globals.css
│ │ ├── favicon.ico
│ │ ├── fonts
│ │ │ ├── GeistVF.woff
│ │ │ └── GeistMonoVF.woff
│ │ ├── about
│ │ │ └── page.tsx
│ │ ├── layout.tsx
│ │ ├── project
│ │ │ └── page.tsx
│ │ ├── page.tsx
│ │ └── contact
│ │ │ └── page.tsx
│ └── components
│ │ ├── Button.tsx
│ │ ├── Card.tsx
│ │ ├── Section.tsx
│ │ ├── Footer.tsx
│ │ └── Navbar.tsx
├── postcss.config.mjs
├── next.config.mjs
├── tailwind.config.ts
├── .gitignore
├── tsconfig.json
├── package.json
└── README.md
├── 02-E-Commerce
├── .eslintrc.json
├── src
│ ├── app
│ │ ├── globals.css
│ │ ├── favicon.ico
│ │ ├── about
│ │ │ └── page.tsx
│ │ ├── fonts
│ │ │ ├── GeistVF.woff
│ │ │ └── GeistMonoVF.woff
│ │ ├── contact
│ │ │ └── page.tsx
│ │ ├── page.tsx
│ │ ├── layout.tsx
│ │ ├── products
│ │ │ ├── page.tsx
│ │ │ └── [id]
│ │ │ │ └── page.tsx
│ │ └── cart
│ │ │ └── page.tsx
│ ├── images
│ │ ├── T1.webp
│ │ ├── T2.jpg
│ │ ├── T3.jpg
│ │ └── About.png
│ └── components
│ │ ├── NewsLetter.tsx
│ │ ├── Hero.tsx
│ │ ├── Testimonials.tsx
│ │ ├── AboutUs.tsx
│ │ ├── SuccessModal.tsx
│ │ ├── Modal.tsx
│ │ ├── Navbar.tsx
│ │ ├── ContactUs.tsx
│ │ └── Footer.tsx
├── postcss.config.mjs
├── next.config.mjs
├── tailwind.config.ts
├── .gitignore
├── package.json
├── tsconfig.json
└── README.md
├── 03-Meme-Maker
├── .eslintrc.json
├── src
│ └── app
│ │ ├── globals.css
│ │ ├── favicon.ico
│ │ ├── fonts
│ │ ├── GeistVF.woff
│ │ └── GeistMonoVF.woff
│ │ ├── layout.tsx
│ │ ├── page.tsx
│ │ └── creatememe
│ │ └── page.tsx
├── postcss.config.mjs
├── next.config.mjs
├── tailwind.config.ts
├── .gitignore
├── tsconfig.json
├── package.json
└── README.md
├── 06-dynamic-blog
├── .eslintrc.json
├── src
│ ├── app
│ │ ├── globals.css
│ │ ├── favicon.ico
│ │ ├── fonts
│ │ │ ├── GeistVF.woff
│ │ │ └── GeistMonoVF.woff
│ │ ├── layout.tsx
│ │ ├── page.tsx
│ │ └── [id]
│ │ │ └── page.tsx
│ └── blogs
│ │ └── blogs.ts
├── next.config.mjs
├── postcss.config.mjs
├── tailwind.config.ts
├── .gitignore
├── package.json
├── tsconfig.json
└── README.md
├── 04-Weather-Widget
├── .eslintrc.json
├── next.config.mjs
├── src
│ ├── app
│ │ ├── favicon.ico
│ │ ├── fonts
│ │ │ ├── GeistVF.woff
│ │ │ └── GeistMonoVF.woff
│ │ ├── page.tsx
│ │ ├── layout.tsx
│ │ └── globals.css
│ ├── lib
│ │ └── utils.ts
│ └── components
│ │ ├── loadingSpinner.tsx
│ │ ├── ui
│ │ ├── input.tsx
│ │ ├── button.tsx
│ │ └── card.tsx
│ │ └── weather-widget.tsx
├── postcss.config.mjs
├── components.json
├── .gitignore
├── tsconfig.json
├── package.json
├── README.md
└── tailwind.config.ts
└── 05-Governor-Site
├── public
├── logo.png
├── about1.jpg
├── about2.jpg
├── about3.jpg
├── course1.jpg
├── course2.jpg
├── course3.jpg
├── course4.jpg
├── course5.jpg
├── course6.jpg
├── course7.jpg
├── course8.jpg
├── tiktok.png
├── twitter.png
├── youtube.png
├── course9.jpeg
├── download.jpeg
├── facebook.png
├── governor.png
├── instagram.png
├── slideShow1.jpg
├── slideShow2.jpg
├── slideShow3.jpg
├── slideShow4.jpg
├── slideShow5.jpg
├── slideShow6.jpg
├── slideShow7.jpg
└── slideShow8.jpg
├── src
├── app
│ ├── favicon.ico
│ ├── fonts
│ │ ├── GeistVF.woff
│ │ └── GeistMonoVF.woff
│ ├── page.tsx
│ ├── layout.tsx
│ └── globals.css
├── lib
│ └── utils.ts
└── components
│ ├── ImageSlider.tsx
│ ├── Slider.tsx
│ ├── ui
│ ├── button.tsx
│ ├── card.tsx
│ └── carousel.tsx
│ ├── About.tsx
│ ├── Hero.tsx
│ ├── Footer.tsx
│ ├── Courses.tsx
│ └── Header.tsx
├── .eslintrc.json
├── postcss.config.mjs
├── next.config.mjs
├── components.json
├── .gitignore
├── tsconfig.json
├── package.json
├── README.md
└── tailwind.config.ts
/01-Countdown-Timer/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "next/core-web-vitals"
3 | }
4 |
--------------------------------------------------------------------------------
/00-My-Portfolio/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": ["next/core-web-vitals", "next/typescript"]
3 | }
4 |
--------------------------------------------------------------------------------
/01-Countdown-Timer/app/globals.css:
--------------------------------------------------------------------------------
1 | @tailwind base;
2 | @tailwind components;
3 | @tailwind utilities;
--------------------------------------------------------------------------------
/02-E-Commerce/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": ["next/core-web-vitals", "next/typescript"]
3 | }
4 |
--------------------------------------------------------------------------------
/03-Meme-Maker/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": ["next/core-web-vitals", "next/typescript"]
3 | }
4 |
--------------------------------------------------------------------------------
/03-Meme-Maker/src/app/globals.css:
--------------------------------------------------------------------------------
1 | @tailwind base;
2 | @tailwind components;
3 | @tailwind utilities;
--------------------------------------------------------------------------------
/06-dynamic-blog/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": ["next/core-web-vitals", "next/typescript"]
3 | }
4 |
--------------------------------------------------------------------------------
/00-My-Portfolio/src/app/globals.css:
--------------------------------------------------------------------------------
1 | @tailwind base;
2 | @tailwind components;
3 | @tailwind utilities;
4 |
--------------------------------------------------------------------------------
/02-E-Commerce/src/app/globals.css:
--------------------------------------------------------------------------------
1 | @tailwind base;
2 | @tailwind components;
3 | @tailwind utilities;
4 |
--------------------------------------------------------------------------------
/04-Weather-Widget/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": ["next/core-web-vitals", "next/typescript"]
3 | }
4 |
--------------------------------------------------------------------------------
/06-dynamic-blog/src/app/globals.css:
--------------------------------------------------------------------------------
1 | @tailwind base;
2 | @tailwind components;
3 | @tailwind utilities;
4 |
--------------------------------------------------------------------------------
/01-Countdown-Timer/next.config.mjs:
--------------------------------------------------------------------------------
1 | /** @type {import('next').NextConfig} */
2 | const nextConfig = {};
3 |
4 | export default nextConfig;
5 |
--------------------------------------------------------------------------------
/02-E-Commerce/src/app/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/umarprogrammer19/NextJS-Project-Challenge/HEAD/02-E-Commerce/src/app/favicon.ico
--------------------------------------------------------------------------------
/02-E-Commerce/src/images/T1.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/umarprogrammer19/NextJS-Project-Challenge/HEAD/02-E-Commerce/src/images/T1.webp
--------------------------------------------------------------------------------
/02-E-Commerce/src/images/T2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/umarprogrammer19/NextJS-Project-Challenge/HEAD/02-E-Commerce/src/images/T2.jpg
--------------------------------------------------------------------------------
/02-E-Commerce/src/images/T3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/umarprogrammer19/NextJS-Project-Challenge/HEAD/02-E-Commerce/src/images/T3.jpg
--------------------------------------------------------------------------------
/03-Meme-Maker/src/app/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/umarprogrammer19/NextJS-Project-Challenge/HEAD/03-Meme-Maker/src/app/favicon.ico
--------------------------------------------------------------------------------
/04-Weather-Widget/next.config.mjs:
--------------------------------------------------------------------------------
1 | /** @type {import('next').NextConfig} */
2 | const nextConfig = {};
3 |
4 | export default nextConfig;
5 |
--------------------------------------------------------------------------------
/05-Governor-Site/public/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/umarprogrammer19/NextJS-Project-Challenge/HEAD/05-Governor-Site/public/logo.png
--------------------------------------------------------------------------------
/06-dynamic-blog/next.config.mjs:
--------------------------------------------------------------------------------
1 | /** @type {import('next').NextConfig} */
2 | const nextConfig = {};
3 |
4 | export default nextConfig;
5 |
--------------------------------------------------------------------------------
/00-My-Portfolio/src/app/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/umarprogrammer19/NextJS-Project-Challenge/HEAD/00-My-Portfolio/src/app/favicon.ico
--------------------------------------------------------------------------------
/01-Countdown-Timer/app/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/umarprogrammer19/NextJS-Project-Challenge/HEAD/01-Countdown-Timer/app/favicon.ico
--------------------------------------------------------------------------------
/02-E-Commerce/src/images/About.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/umarprogrammer19/NextJS-Project-Challenge/HEAD/02-E-Commerce/src/images/About.png
--------------------------------------------------------------------------------
/05-Governor-Site/public/about1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/umarprogrammer19/NextJS-Project-Challenge/HEAD/05-Governor-Site/public/about1.jpg
--------------------------------------------------------------------------------
/05-Governor-Site/public/about2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/umarprogrammer19/NextJS-Project-Challenge/HEAD/05-Governor-Site/public/about2.jpg
--------------------------------------------------------------------------------
/05-Governor-Site/public/about3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/umarprogrammer19/NextJS-Project-Challenge/HEAD/05-Governor-Site/public/about3.jpg
--------------------------------------------------------------------------------
/05-Governor-Site/public/course1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/umarprogrammer19/NextJS-Project-Challenge/HEAD/05-Governor-Site/public/course1.jpg
--------------------------------------------------------------------------------
/05-Governor-Site/public/course2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/umarprogrammer19/NextJS-Project-Challenge/HEAD/05-Governor-Site/public/course2.jpg
--------------------------------------------------------------------------------
/05-Governor-Site/public/course3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/umarprogrammer19/NextJS-Project-Challenge/HEAD/05-Governor-Site/public/course3.jpg
--------------------------------------------------------------------------------
/05-Governor-Site/public/course4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/umarprogrammer19/NextJS-Project-Challenge/HEAD/05-Governor-Site/public/course4.jpg
--------------------------------------------------------------------------------
/05-Governor-Site/public/course5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/umarprogrammer19/NextJS-Project-Challenge/HEAD/05-Governor-Site/public/course5.jpg
--------------------------------------------------------------------------------
/05-Governor-Site/public/course6.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/umarprogrammer19/NextJS-Project-Challenge/HEAD/05-Governor-Site/public/course6.jpg
--------------------------------------------------------------------------------
/05-Governor-Site/public/course7.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/umarprogrammer19/NextJS-Project-Challenge/HEAD/05-Governor-Site/public/course7.jpg
--------------------------------------------------------------------------------
/05-Governor-Site/public/course8.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/umarprogrammer19/NextJS-Project-Challenge/HEAD/05-Governor-Site/public/course8.jpg
--------------------------------------------------------------------------------
/05-Governor-Site/public/tiktok.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/umarprogrammer19/NextJS-Project-Challenge/HEAD/05-Governor-Site/public/tiktok.png
--------------------------------------------------------------------------------
/05-Governor-Site/public/twitter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/umarprogrammer19/NextJS-Project-Challenge/HEAD/05-Governor-Site/public/twitter.png
--------------------------------------------------------------------------------
/05-Governor-Site/public/youtube.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/umarprogrammer19/NextJS-Project-Challenge/HEAD/05-Governor-Site/public/youtube.png
--------------------------------------------------------------------------------
/06-dynamic-blog/src/app/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/umarprogrammer19/NextJS-Project-Challenge/HEAD/06-dynamic-blog/src/app/favicon.ico
--------------------------------------------------------------------------------
/04-Weather-Widget/src/app/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/umarprogrammer19/NextJS-Project-Challenge/HEAD/04-Weather-Widget/src/app/favicon.ico
--------------------------------------------------------------------------------
/05-Governor-Site/public/course9.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/umarprogrammer19/NextJS-Project-Challenge/HEAD/05-Governor-Site/public/course9.jpeg
--------------------------------------------------------------------------------
/05-Governor-Site/public/download.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/umarprogrammer19/NextJS-Project-Challenge/HEAD/05-Governor-Site/public/download.jpeg
--------------------------------------------------------------------------------
/05-Governor-Site/public/facebook.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/umarprogrammer19/NextJS-Project-Challenge/HEAD/05-Governor-Site/public/facebook.png
--------------------------------------------------------------------------------
/05-Governor-Site/public/governor.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/umarprogrammer19/NextJS-Project-Challenge/HEAD/05-Governor-Site/public/governor.png
--------------------------------------------------------------------------------
/05-Governor-Site/public/instagram.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/umarprogrammer19/NextJS-Project-Challenge/HEAD/05-Governor-Site/public/instagram.png
--------------------------------------------------------------------------------
/05-Governor-Site/public/slideShow1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/umarprogrammer19/NextJS-Project-Challenge/HEAD/05-Governor-Site/public/slideShow1.jpg
--------------------------------------------------------------------------------
/05-Governor-Site/public/slideShow2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/umarprogrammer19/NextJS-Project-Challenge/HEAD/05-Governor-Site/public/slideShow2.jpg
--------------------------------------------------------------------------------
/05-Governor-Site/public/slideShow3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/umarprogrammer19/NextJS-Project-Challenge/HEAD/05-Governor-Site/public/slideShow3.jpg
--------------------------------------------------------------------------------
/05-Governor-Site/public/slideShow4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/umarprogrammer19/NextJS-Project-Challenge/HEAD/05-Governor-Site/public/slideShow4.jpg
--------------------------------------------------------------------------------
/05-Governor-Site/public/slideShow5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/umarprogrammer19/NextJS-Project-Challenge/HEAD/05-Governor-Site/public/slideShow5.jpg
--------------------------------------------------------------------------------
/05-Governor-Site/public/slideShow6.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/umarprogrammer19/NextJS-Project-Challenge/HEAD/05-Governor-Site/public/slideShow6.jpg
--------------------------------------------------------------------------------
/05-Governor-Site/public/slideShow7.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/umarprogrammer19/NextJS-Project-Challenge/HEAD/05-Governor-Site/public/slideShow7.jpg
--------------------------------------------------------------------------------
/05-Governor-Site/public/slideShow8.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/umarprogrammer19/NextJS-Project-Challenge/HEAD/05-Governor-Site/public/slideShow8.jpg
--------------------------------------------------------------------------------
/05-Governor-Site/src/app/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/umarprogrammer19/NextJS-Project-Challenge/HEAD/05-Governor-Site/src/app/favicon.ico
--------------------------------------------------------------------------------
/02-E-Commerce/src/app/about/page.tsx:
--------------------------------------------------------------------------------
1 | import AboutUs from "@/components/AboutUs";
2 |
3 | export default function About() {
4 | return
5 | }
--------------------------------------------------------------------------------
/02-E-Commerce/src/app/fonts/GeistVF.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/umarprogrammer19/NextJS-Project-Challenge/HEAD/02-E-Commerce/src/app/fonts/GeistVF.woff
--------------------------------------------------------------------------------
/03-Meme-Maker/src/app/fonts/GeistVF.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/umarprogrammer19/NextJS-Project-Challenge/HEAD/03-Meme-Maker/src/app/fonts/GeistVF.woff
--------------------------------------------------------------------------------
/00-My-Portfolio/src/app/fonts/GeistVF.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/umarprogrammer19/NextJS-Project-Challenge/HEAD/00-My-Portfolio/src/app/fonts/GeistVF.woff
--------------------------------------------------------------------------------
/05-Governor-Site/src/app/fonts/GeistVF.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/umarprogrammer19/NextJS-Project-Challenge/HEAD/05-Governor-Site/src/app/fonts/GeistVF.woff
--------------------------------------------------------------------------------
/06-dynamic-blog/src/app/fonts/GeistVF.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/umarprogrammer19/NextJS-Project-Challenge/HEAD/06-dynamic-blog/src/app/fonts/GeistVF.woff
--------------------------------------------------------------------------------
/02-E-Commerce/src/app/contact/page.tsx:
--------------------------------------------------------------------------------
1 | import ContactUs from "@/components/ContactUs";
2 |
3 | export default function Contact() {
4 | return
5 | }
--------------------------------------------------------------------------------
/02-E-Commerce/src/app/fonts/GeistMonoVF.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/umarprogrammer19/NextJS-Project-Challenge/HEAD/02-E-Commerce/src/app/fonts/GeistMonoVF.woff
--------------------------------------------------------------------------------
/03-Meme-Maker/src/app/fonts/GeistMonoVF.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/umarprogrammer19/NextJS-Project-Challenge/HEAD/03-Meme-Maker/src/app/fonts/GeistMonoVF.woff
--------------------------------------------------------------------------------
/04-Weather-Widget/src/app/fonts/GeistVF.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/umarprogrammer19/NextJS-Project-Challenge/HEAD/04-Weather-Widget/src/app/fonts/GeistVF.woff
--------------------------------------------------------------------------------
/00-My-Portfolio/src/app/fonts/GeistMonoVF.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/umarprogrammer19/NextJS-Project-Challenge/HEAD/00-My-Portfolio/src/app/fonts/GeistMonoVF.woff
--------------------------------------------------------------------------------
/04-Weather-Widget/src/app/fonts/GeistMonoVF.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/umarprogrammer19/NextJS-Project-Challenge/HEAD/04-Weather-Widget/src/app/fonts/GeistMonoVF.woff
--------------------------------------------------------------------------------
/05-Governor-Site/src/app/fonts/GeistMonoVF.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/umarprogrammer19/NextJS-Project-Challenge/HEAD/05-Governor-Site/src/app/fonts/GeistMonoVF.woff
--------------------------------------------------------------------------------
/06-dynamic-blog/src/app/fonts/GeistMonoVF.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/umarprogrammer19/NextJS-Project-Challenge/HEAD/06-dynamic-blog/src/app/fonts/GeistMonoVF.woff
--------------------------------------------------------------------------------
/05-Governor-Site/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": ["next/core-web-vitals", "next/typescript"],
3 | "rules": {
4 | "@typescript-eslint/no-require-imports": "off"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/00-My-Portfolio/postcss.config.mjs:
--------------------------------------------------------------------------------
1 | /** @type {import('postcss-load-config').Config} */
2 | const config = {
3 | plugins: {
4 | tailwindcss: {},
5 | },
6 | };
7 |
8 | export default config;
9 |
--------------------------------------------------------------------------------
/02-E-Commerce/postcss.config.mjs:
--------------------------------------------------------------------------------
1 | /** @type {import('postcss-load-config').Config} */
2 | const config = {
3 | plugins: {
4 | tailwindcss: {},
5 | },
6 | };
7 |
8 | export default config;
9 |
--------------------------------------------------------------------------------
/03-Meme-Maker/postcss.config.mjs:
--------------------------------------------------------------------------------
1 | /** @type {import('postcss-load-config').Config} */
2 | const config = {
3 | plugins: {
4 | tailwindcss: {},
5 | },
6 | };
7 |
8 | export default config;
9 |
--------------------------------------------------------------------------------
/04-Weather-Widget/postcss.config.mjs:
--------------------------------------------------------------------------------
1 | /** @type {import('postcss-load-config').Config} */
2 | const config = {
3 | plugins: {
4 | tailwindcss: {},
5 | },
6 | };
7 |
8 | export default config;
9 |
--------------------------------------------------------------------------------
/05-Governor-Site/postcss.config.mjs:
--------------------------------------------------------------------------------
1 | /** @type {import('postcss-load-config').Config} */
2 | const config = {
3 | plugins: {
4 | tailwindcss: {},
5 | },
6 | };
7 |
8 | export default config;
9 |
--------------------------------------------------------------------------------
/06-dynamic-blog/postcss.config.mjs:
--------------------------------------------------------------------------------
1 | /** @type {import('postcss-load-config').Config} */
2 | const config = {
3 | plugins: {
4 | tailwindcss: {},
5 | },
6 | };
7 |
8 | export default config;
9 |
--------------------------------------------------------------------------------
/01-Countdown-Timer/postcss.config.mjs:
--------------------------------------------------------------------------------
1 | /** @type {import('postcss-load-config').Config} */
2 | const config = {
3 | plugins: {
4 | tailwindcss: {},
5 | },
6 | };
7 |
8 | export default config;
9 |
--------------------------------------------------------------------------------
/02-E-Commerce/next.config.mjs:
--------------------------------------------------------------------------------
1 | /** @type {import('next').NextConfig} */
2 | const nextConfig = {
3 | images: {
4 | domains: ["fakestoreapi.com"]
5 | }
6 | };
7 |
8 | export default nextConfig;
9 |
--------------------------------------------------------------------------------
/03-Meme-Maker/next.config.mjs:
--------------------------------------------------------------------------------
1 | /** @type {import('next').NextConfig} */
2 | const nextConfig = {
3 | images: {
4 | domains: ["i.imgflip.com"],
5 | }
6 | };
7 |
8 | export default nextConfig;
9 |
--------------------------------------------------------------------------------
/01-Countdown-Timer/app/page.tsx:
--------------------------------------------------------------------------------
1 | import Countdown from "@/components/Countdown";
2 |
3 | export default function Home() {
4 | return (
5 |
6 |
7 |
8 | );
9 | }
10 |
--------------------------------------------------------------------------------
/01-Countdown-Timer/lib/utils.ts:
--------------------------------------------------------------------------------
1 | import { clsx, type ClassValue } from "clsx"
2 | import { twMerge } from "tailwind-merge"
3 |
4 | export function cn(...inputs: ClassValue[]) {
5 | return twMerge(clsx(inputs))
6 | }
7 |
--------------------------------------------------------------------------------
/05-Governor-Site/src/lib/utils.ts:
--------------------------------------------------------------------------------
1 | import { clsx, type ClassValue } from "clsx"
2 | import { twMerge } from "tailwind-merge"
3 |
4 | export function cn(...inputs: ClassValue[]) {
5 | return twMerge(clsx(inputs))
6 | }
7 |
--------------------------------------------------------------------------------
/04-Weather-Widget/src/lib/utils.ts:
--------------------------------------------------------------------------------
1 | import { clsx, type ClassValue } from "clsx"
2 | import { twMerge } from "tailwind-merge"
3 |
4 | export function cn(...inputs: ClassValue[]) {
5 | return twMerge(clsx(inputs))
6 | }
7 |
--------------------------------------------------------------------------------
/05-Governor-Site/next.config.mjs:
--------------------------------------------------------------------------------
1 | /** @type {import('next').NextConfig} */
2 | const nextConfig = {
3 | images: {
4 | domains: ['cdn-icons-png.freepik.com']
5 | }
6 | };
7 |
8 | export default nextConfig;
9 |
--------------------------------------------------------------------------------
/04-Weather-Widget/src/app/page.tsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import WeatherWidget from "@/components/weather-widget";
3 |
4 | export default function Home() {
5 | return (
6 | <>
7 |
8 | >
9 | );
10 | }
11 |
--------------------------------------------------------------------------------
/04-Weather-Widget/src/components/loadingSpinner.tsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 |
3 | export default function LoadingSpinner() {
4 | return (
5 |
8 | );
9 | }
--------------------------------------------------------------------------------
/00-My-Portfolio/next.config.mjs:
--------------------------------------------------------------------------------
1 | /** @type {import('next').NextConfig} */
2 | const nextConfig = {
3 | images: {
4 | domains: ['i.pinimg.com','m.media-amazon.com','cdn.prod.website-files.com','assets.weforum.org','media.licdn.com'],
5 | },
6 | };
7 |
8 | export default nextConfig;
9 |
--------------------------------------------------------------------------------
/05-Governor-Site/src/components/ImageSlider.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import CarouselDemo from './Slider'
3 |
4 | const ImageSlider = () => {
5 | return (
6 |
11 | )
12 | }
13 |
14 | export default ImageSlider
--------------------------------------------------------------------------------
/02-E-Commerce/src/app/page.tsx:
--------------------------------------------------------------------------------
1 | import Hero from "@/components/Hero";
2 | import AboutUs from "@/components/AboutUs";
3 | import Testimonials from "@/components/Testimonials";
4 | import Newsletter from "@/components/NewsLetter";
5 |
6 | export default function Home() {
7 | return (
8 | <>
9 |
10 |
11 |
12 |
13 | >
14 | );
15 | }
16 |
--------------------------------------------------------------------------------
/05-Governor-Site/src/app/page.tsx:
--------------------------------------------------------------------------------
1 | import About from "@/components/About";
2 | import Courses from "@/components/Courses";
3 | import Footer from "@/components/Footer";
4 | import Hero from "@/components/Hero";
5 | import ImageSlider from "@/components/ImageSlider";
6 |
7 | export default function Home() {
8 | return (
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | );
17 | }
18 |
--------------------------------------------------------------------------------
/00-My-Portfolio/tailwind.config.ts:
--------------------------------------------------------------------------------
1 | import type { Config } from "tailwindcss";
2 |
3 | const config: Config = {
4 | content: [
5 | "./src/pages/**/*.{js,ts,jsx,tsx,mdx}",
6 | "./src/components/**/*.{js,ts,jsx,tsx,mdx}",
7 | "./src/app/**/*.{js,ts,jsx,tsx,mdx}",
8 | ],
9 | theme: {
10 | extend: {
11 | colors: {
12 | background: "var(--background)",
13 | foreground: "var(--foreground)",
14 | },
15 | },
16 | },
17 | plugins: [],
18 | };
19 | export default config;
20 |
--------------------------------------------------------------------------------
/02-E-Commerce/tailwind.config.ts:
--------------------------------------------------------------------------------
1 | import type { Config } from "tailwindcss";
2 |
3 | const config: Config = {
4 | content: [
5 | "./src/pages/**/*.{js,ts,jsx,tsx,mdx}",
6 | "./src/components/**/*.{js,ts,jsx,tsx,mdx}",
7 | "./src/app/**/*.{js,ts,jsx,tsx,mdx}",
8 | ],
9 | theme: {
10 | extend: {
11 | colors: {
12 | background: "var(--background)",
13 | foreground: "var(--foreground)",
14 | },
15 | },
16 | },
17 | plugins: [],
18 | };
19 | export default config;
20 |
--------------------------------------------------------------------------------
/03-Meme-Maker/tailwind.config.ts:
--------------------------------------------------------------------------------
1 | import type { Config } from "tailwindcss";
2 |
3 | const config: Config = {
4 | content: [
5 | "./src/pages/**/*.{js,ts,jsx,tsx,mdx}",
6 | "./src/components/**/*.{js,ts,jsx,tsx,mdx}",
7 | "./src/app/**/*.{js,ts,jsx,tsx,mdx}",
8 | ],
9 | theme: {
10 | extend: {
11 | colors: {
12 | background: "var(--background)",
13 | foreground: "var(--foreground)",
14 | },
15 | },
16 | },
17 | plugins: [],
18 | };
19 | export default config;
20 |
--------------------------------------------------------------------------------
/06-dynamic-blog/tailwind.config.ts:
--------------------------------------------------------------------------------
1 | import type { Config } from "tailwindcss";
2 |
3 | const config: Config = {
4 | content: [
5 | "./src/pages/**/*.{js,ts,jsx,tsx,mdx}",
6 | "./src/components/**/*.{js,ts,jsx,tsx,mdx}",
7 | "./src/app/**/*.{js,ts,jsx,tsx,mdx}",
8 | ],
9 | theme: {
10 | extend: {
11 | colors: {
12 | background: "var(--background)",
13 | foreground: "var(--foreground)",
14 | },
15 | },
16 | },
17 | plugins: [],
18 | };
19 | export default config;
20 |
--------------------------------------------------------------------------------
/01-Countdown-Timer/components.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://ui.shadcn.com/schema.json",
3 | "style": "default",
4 | "rsc": true,
5 | "tsx": true,
6 | "tailwind": {
7 | "config": "tailwind.config.ts",
8 | "css": "app/globals.css",
9 | "baseColor": "slate",
10 | "cssVariables": true,
11 | "prefix": ""
12 | },
13 | "aliases": {
14 | "components": "@/components",
15 | "utils": "@/lib/utils",
16 | "ui": "@/components/ui",
17 | "lib": "@/lib",
18 | "hooks": "@/hooks"
19 | }
20 | }
--------------------------------------------------------------------------------
/04-Weather-Widget/components.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://ui.shadcn.com/schema.json",
3 | "style": "default",
4 | "rsc": true,
5 | "tsx": true,
6 | "tailwind": {
7 | "config": "tailwind.config.ts",
8 | "css": "src/app/globals.css",
9 | "baseColor": "slate",
10 | "cssVariables": true,
11 | "prefix": ""
12 | },
13 | "aliases": {
14 | "components": "@/components",
15 | "utils": "@/lib/utils",
16 | "ui": "@/components/ui",
17 | "lib": "@/lib",
18 | "hooks": "@/hooks"
19 | }
20 | }
--------------------------------------------------------------------------------
/05-Governor-Site/components.json:
--------------------------------------------------------------------------------
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": "src/app/globals.css",
9 | "baseColor": "zinc",
10 | "cssVariables": true,
11 | "prefix": ""
12 | },
13 | "aliases": {
14 | "components": "@/components",
15 | "utils": "@/lib/utils",
16 | "ui": "@/components/ui",
17 | "lib": "@/lib",
18 | "hooks": "@/hooks"
19 | }
20 | }
--------------------------------------------------------------------------------
/00-My-Portfolio/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 | .yarn/install-state.gz
8 |
9 | # testing
10 | /coverage
11 |
12 | # next.js
13 | /.next/
14 | /out/
15 |
16 | # production
17 | /build
18 |
19 | # misc
20 | .DS_Store
21 | *.pem
22 |
23 | # debug
24 | npm-debug.log*
25 | yarn-debug.log*
26 | yarn-error.log*
27 |
28 | # local env files
29 | .env*.local
30 |
31 | # vercel
32 | .vercel
33 |
34 | # typescript
35 | *.tsbuildinfo
36 | next-env.d.ts
37 |
--------------------------------------------------------------------------------
/02-E-Commerce/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 | .yarn/install-state.gz
8 |
9 | # testing
10 | /coverage
11 |
12 | # next.js
13 | /.next/
14 | /out/
15 |
16 | # production
17 | /build
18 |
19 | # misc
20 | .DS_Store
21 | *.pem
22 |
23 | # debug
24 | npm-debug.log*
25 | yarn-debug.log*
26 | yarn-error.log*
27 |
28 | # local env files
29 | .env*.local
30 |
31 | # vercel
32 | .vercel
33 |
34 | # typescript
35 | *.tsbuildinfo
36 | next-env.d.ts
37 |
--------------------------------------------------------------------------------
/03-Meme-Maker/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 | .yarn/install-state.gz
8 |
9 | # testing
10 | /coverage
11 |
12 | # next.js
13 | /.next/
14 | /out/
15 |
16 | # production
17 | /build
18 |
19 | # misc
20 | .DS_Store
21 | *.pem
22 |
23 | # debug
24 | npm-debug.log*
25 | yarn-debug.log*
26 | yarn-error.log*
27 |
28 | # local env files
29 | .env*.local
30 |
31 | # vercel
32 | .vercel
33 |
34 | # typescript
35 | *.tsbuildinfo
36 | next-env.d.ts
37 |
--------------------------------------------------------------------------------
/06-dynamic-blog/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 | .yarn/install-state.gz
8 |
9 | # testing
10 | /coverage
11 |
12 | # next.js
13 | /.next/
14 | /out/
15 |
16 | # production
17 | /build
18 |
19 | # misc
20 | .DS_Store
21 | *.pem
22 |
23 | # debug
24 | npm-debug.log*
25 | yarn-debug.log*
26 | yarn-error.log*
27 |
28 | # local env files
29 | .env*.local
30 |
31 | # vercel
32 | .vercel
33 |
34 | # typescript
35 | *.tsbuildinfo
36 | next-env.d.ts
37 |
--------------------------------------------------------------------------------
/01-Countdown-Timer/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 | .yarn/install-state.gz
8 |
9 | # testing
10 | /coverage
11 |
12 | # next.js
13 | /.next/
14 | /out/
15 |
16 | # production
17 | /build
18 |
19 | # misc
20 | .DS_Store
21 | *.pem
22 |
23 | # debug
24 | npm-debug.log*
25 | yarn-debug.log*
26 | yarn-error.log*
27 |
28 | # local env files
29 | .env*.local
30 |
31 | # vercel
32 | .vercel
33 |
34 | # typescript
35 | *.tsbuildinfo
36 | next-env.d.ts
37 |
--------------------------------------------------------------------------------
/05-Governor-Site/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 | .yarn/install-state.gz
8 |
9 | # testing
10 | /coverage
11 |
12 | # next.js
13 | /.next/
14 | /out/
15 |
16 | # production
17 | /build
18 |
19 | # misc
20 | .DS_Store
21 | *.pem
22 |
23 | # debug
24 | npm-debug.log*
25 | yarn-debug.log*
26 | yarn-error.log*
27 |
28 | # local env files
29 | .env*.local
30 |
31 | # vercel
32 | .vercel
33 |
34 | # typescript
35 | *.tsbuildinfo
36 | next-env.d.ts
37 |
--------------------------------------------------------------------------------
/04-Weather-Widget/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 | .yarn/install-state.gz
8 |
9 | # testing
10 | /coverage
11 |
12 | # next.js
13 | /.next/
14 | /out/
15 |
16 | # production
17 | /build
18 |
19 | # misc
20 | .DS_Store
21 | *.pem
22 |
23 | # debug
24 | npm-debug.log*
25 | yarn-debug.log*
26 | yarn-error.log*
27 |
28 | # local env files
29 | .env
30 | .env*.local
31 |
32 | # vercel
33 | .vercel
34 |
35 | # typescript
36 | *.tsbuildinfo
37 | next-env.d.ts
38 |
--------------------------------------------------------------------------------
/01-Countdown-Timer/app/layout.tsx:
--------------------------------------------------------------------------------
1 | import type { Metadata } from "next";
2 | import { Inter } from "next/font/google";
3 | import "./globals.css";
4 |
5 | const inter = Inter({ subsets: ["latin"] });
6 |
7 | export const metadata: Metadata = {
8 | title: "Create Next App",
9 | description: "Generated by create next app",
10 | };
11 |
12 | export default function RootLayout({
13 | children,
14 | }: Readonly<{
15 | children: React.ReactNode;
16 | }>) {
17 | return (
18 |
19 | {children}
20 |
21 | );
22 | }
23 |
--------------------------------------------------------------------------------
/01-Countdown-Timer/public/vercel.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/06-dynamic-blog/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "06-dynamic-blog",
3 | "version": "0.1.0",
4 | "private": true,
5 | "scripts": {
6 | "dev": "next dev",
7 | "build": "next build",
8 | "start": "next start",
9 | "lint": "next lint"
10 | },
11 | "dependencies": {
12 | "react": "^18",
13 | "react-dom": "^18",
14 | "next": "14.2.15"
15 | },
16 | "devDependencies": {
17 | "typescript": "^5",
18 | "@types/node": "^20",
19 | "@types/react": "^18",
20 | "@types/react-dom": "^18",
21 | "postcss": "^8",
22 | "tailwindcss": "^3.4.1",
23 | "eslint": "^8",
24 | "eslint-config-next": "14.2.15"
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/02-E-Commerce/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "e-commerce",
3 | "version": "0.1.0",
4 | "private": true,
5 | "scripts": {
6 | "dev": "next dev",
7 | "build": "next build",
8 | "start": "next start",
9 | "lint": "next lint"
10 | },
11 | "dependencies": {
12 | "next": "14.2.11",
13 | "react": "^18",
14 | "react-dom": "^18",
15 | "react-icons": "^5.3.0"
16 | },
17 | "devDependencies": {
18 | "@types/node": "^20",
19 | "@types/react": "^18",
20 | "@types/react-dom": "^18",
21 | "eslint": "^8",
22 | "eslint-config-next": "14.2.11",
23 | "postcss": "^8",
24 | "tailwindcss": "^3.4.1",
25 | "typescript": "^5"
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/00-My-Portfolio/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "lib": ["dom", "dom.iterable", "esnext"],
4 | "allowJs": true,
5 | "skipLibCheck": true,
6 | "strict": true,
7 | "noEmit": true,
8 | "esModuleInterop": true,
9 | "module": "esnext",
10 | "moduleResolution": "bundler",
11 | "resolveJsonModule": true,
12 | "isolatedModules": true,
13 | "jsx": "preserve",
14 | "incremental": true,
15 | "plugins": [
16 | {
17 | "name": "next"
18 | }
19 | ],
20 | "paths": {
21 | "@/*": ["./src/*"]
22 | }
23 | },
24 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
25 | "exclude": ["node_modules"]
26 | }
27 |
--------------------------------------------------------------------------------
/01-Countdown-Timer/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "lib": ["dom", "dom.iterable", "esnext"],
4 | "allowJs": true,
5 | "skipLibCheck": true,
6 | "strict": true,
7 | "noEmit": true,
8 | "esModuleInterop": true,
9 | "module": "esnext",
10 | "moduleResolution": "bundler",
11 | "resolveJsonModule": true,
12 | "isolatedModules": true,
13 | "jsx": "preserve",
14 | "incremental": true,
15 | "plugins": [
16 | {
17 | "name": "next"
18 | }
19 | ],
20 | "paths": {
21 | "@/*": ["./*"]
22 | }
23 | },
24 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
25 | "exclude": ["node_modules"]
26 | }
27 |
--------------------------------------------------------------------------------
/02-E-Commerce/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "lib": ["dom", "dom.iterable", "esnext"],
4 | "allowJs": true,
5 | "skipLibCheck": true,
6 | "strict": true,
7 | "noEmit": true,
8 | "esModuleInterop": true,
9 | "module": "esnext",
10 | "moduleResolution": "bundler",
11 | "resolveJsonModule": true,
12 | "isolatedModules": true,
13 | "jsx": "preserve",
14 | "incremental": true,
15 | "plugins": [
16 | {
17 | "name": "next"
18 | }
19 | ],
20 | "paths": {
21 | "@/*": ["./src/*"]
22 | }
23 | },
24 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
25 | "exclude": ["node_modules"]
26 | }
27 |
--------------------------------------------------------------------------------
/03-Meme-Maker/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "lib": ["dom", "dom.iterable", "esnext"],
4 | "allowJs": true,
5 | "skipLibCheck": true,
6 | "strict": true,
7 | "noEmit": true,
8 | "esModuleInterop": true,
9 | "module": "esnext",
10 | "moduleResolution": "bundler",
11 | "resolveJsonModule": true,
12 | "isolatedModules": true,
13 | "jsx": "preserve",
14 | "incremental": true,
15 | "plugins": [
16 | {
17 | "name": "next"
18 | }
19 | ],
20 | "paths": {
21 | "@/*": ["./src/*"]
22 | }
23 | },
24 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
25 | "exclude": ["node_modules"]
26 | }
27 |
--------------------------------------------------------------------------------
/06-dynamic-blog/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "lib": ["dom", "dom.iterable", "esnext"],
4 | "allowJs": true,
5 | "skipLibCheck": true,
6 | "strict": true,
7 | "noEmit": true,
8 | "esModuleInterop": true,
9 | "module": "esnext",
10 | "moduleResolution": "bundler",
11 | "resolveJsonModule": true,
12 | "isolatedModules": true,
13 | "jsx": "preserve",
14 | "incremental": true,
15 | "plugins": [
16 | {
17 | "name": "next"
18 | }
19 | ],
20 | "paths": {
21 | "@/*": ["./src/*"]
22 | }
23 | },
24 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
25 | "exclude": ["node_modules"]
26 | }
27 |
--------------------------------------------------------------------------------
/04-Weather-Widget/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "lib": ["dom", "dom.iterable", "esnext"],
4 | "allowJs": true,
5 | "skipLibCheck": true,
6 | "strict": true,
7 | "noEmit": true,
8 | "esModuleInterop": true,
9 | "module": "esnext",
10 | "moduleResolution": "bundler",
11 | "resolveJsonModule": true,
12 | "isolatedModules": true,
13 | "jsx": "preserve",
14 | "incremental": true,
15 | "plugins": [
16 | {
17 | "name": "next"
18 | }
19 | ],
20 | "paths": {
21 | "@/*": ["./src/*"]
22 | }
23 | },
24 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
25 | "exclude": ["node_modules"]
26 | }
27 |
--------------------------------------------------------------------------------
/05-Governor-Site/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "lib": ["dom", "dom.iterable", "esnext"],
4 | "allowJs": true,
5 | "skipLibCheck": true,
6 | "strict": true,
7 | "noEmit": true,
8 | "esModuleInterop": true,
9 | "module": "esnext",
10 | "moduleResolution": "bundler",
11 | "resolveJsonModule": true,
12 | "isolatedModules": true,
13 | "jsx": "preserve",
14 | "incremental": true,
15 | "plugins": [
16 | {
17 | "name": "next"
18 | }
19 | ],
20 | "paths": {
21 | "@/*": ["./src/*"]
22 | }
23 | },
24 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
25 | "exclude": ["node_modules"]
26 | }
27 |
--------------------------------------------------------------------------------
/00-My-Portfolio/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "my-app",
3 | "version": "0.1.0",
4 | "private": true,
5 | "scripts": {
6 | "dev": "next dev",
7 | "build": "next build",
8 | "start": "next start",
9 | "lint": "next lint"
10 | },
11 | "dependencies": {
12 | "framer-motion": "^11.5.4",
13 | "next": "14.2.11",
14 | "react": "^18",
15 | "react-dom": "^18",
16 | "react-icons": "^5.3.0"
17 | },
18 | "devDependencies": {
19 | "@types/node": "^20",
20 | "@types/react": "^18",
21 | "@types/react-dom": "^18",
22 | "eslint": "^8",
23 | "eslint-config-next": "14.2.11",
24 | "postcss": "^8",
25 | "tailwindcss": "^3.4.1",
26 | "typescript": "^5"
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/00-My-Portfolio/src/app/about/page.tsx:
--------------------------------------------------------------------------------
1 | import Section from '@/components/Section'
2 | import React from 'react'
3 |
4 | const page = () => {
5 | return (
6 | <>
7 |
15 | >
16 | )
17 | }
18 |
19 | export default page
--------------------------------------------------------------------------------
/03-Meme-Maker/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "03-meme-maker",
3 | "version": "0.1.0",
4 | "private": true,
5 | "scripts": {
6 | "dev": "next dev",
7 | "build": "next build",
8 | "start": "next start",
9 | "lint": "next lint"
10 | },
11 | "dependencies": {
12 | "file-saver": "^2.0.5",
13 | "next": "14.2.14",
14 | "react": "^18",
15 | "react-dom": "^18"
16 | },
17 | "devDependencies": {
18 | "@types/file-saver": "^2.0.7",
19 | "@types/node": "^20",
20 | "@types/react": "^18",
21 | "@types/react-dom": "^18",
22 | "eslint": "^8",
23 | "eslint-config-next": "14.2.14",
24 | "i": "^0.3.7",
25 | "npm": "^10.9.0",
26 | "postcss": "^8",
27 | "tailwindcss": "^3.4.1",
28 | "typescript": "^5"
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/00-My-Portfolio/src/components/Button.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | interface ButtonProps {
4 | text: string;
5 | onClick?: () => void;
6 | href?: string;
7 | }
8 |
9 | const Button: React.FC = ({ text, onClick, href }) => {
10 | return href ? (
11 |
15 | {text}
16 |
17 | ) : (
18 |
22 | {text}
23 |
24 | );
25 | };
26 |
27 | export default Button;
28 |
--------------------------------------------------------------------------------
/01-Countdown-Timer/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "01-countdown-timer",
3 | "version": "0.1.0",
4 | "private": true,
5 | "scripts": {
6 | "dev": "next dev",
7 | "build": "next build",
8 | "start": "next start",
9 | "lint": "next lint"
10 | },
11 | "dependencies": {
12 | "@radix-ui/react-slot": "^1.1.0",
13 | "class-variance-authority": "^0.7.0",
14 | "clsx": "^2.1.1",
15 | "lucide-react": "^0.438.0",
16 | "next": "14.2.7",
17 | "react": "^18",
18 | "react-dom": "^18",
19 | "tailwind-merge": "^2.5.2",
20 | "tailwindcss-animate": "^1.0.7"
21 | },
22 | "devDependencies": {
23 | "@types/node": "^20",
24 | "@types/react": "^18",
25 | "@types/react-dom": "^18",
26 | "eslint": "^8",
27 | "eslint-config-next": "14.2.7",
28 | "postcss": "^8",
29 | "tailwindcss": "^3.4.1",
30 | "typescript": "^5"
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/04-Weather-Widget/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "04-weather-widget",
3 | "version": "0.1.0",
4 | "private": true,
5 | "scripts": {
6 | "dev": "next dev",
7 | "build": "next build",
8 | "start": "next start",
9 | "lint": "next lint"
10 | },
11 | "dependencies": {
12 | "@radix-ui/react-slot": "^1.1.0",
13 | "class-variance-authority": "^0.7.0",
14 | "clsx": "^2.1.1",
15 | "lucide-react": "^0.451.0",
16 | "next": "14.2.14",
17 | "react": "^18",
18 | "react-dom": "^18",
19 | "tailwind-merge": "^2.5.3",
20 | "tailwindcss-animate": "^1.0.7"
21 | },
22 | "devDependencies": {
23 | "@types/node": "^20",
24 | "@types/react": "^18",
25 | "@types/react-dom": "^18",
26 | "eslint": "^8",
27 | "eslint-config-next": "14.2.14",
28 | "postcss": "^8",
29 | "tailwindcss": "^3.4.1",
30 | "typescript": "^5"
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/03-Meme-Maker/src/app/layout.tsx:
--------------------------------------------------------------------------------
1 | import type { Metadata } from "next";
2 | import localFont from "next/font/local";
3 | import "./globals.css";
4 |
5 | const geistSans = localFont({
6 | src: "./fonts/GeistVF.woff",
7 | variable: "--font-geist-sans",
8 | weight: "100 900",
9 | });
10 | const geistMono = localFont({
11 | src: "./fonts/GeistMonoVF.woff",
12 | variable: "--font-geist-mono",
13 | weight: "100 900",
14 | });
15 |
16 | export const metadata: Metadata = {
17 | title: "Create Next App",
18 | description: "Generated by create next app",
19 | };
20 |
21 | export default function RootLayout({
22 | children,
23 | }: Readonly<{
24 | children: React.ReactNode;
25 | }>) {
26 | return (
27 |
28 |
31 | {children}
32 |
33 |
34 | );
35 | }
36 |
--------------------------------------------------------------------------------
/04-Weather-Widget/src/app/layout.tsx:
--------------------------------------------------------------------------------
1 | import type { Metadata } from "next";
2 | import localFont from "next/font/local";
3 | import "./globals.css";
4 |
5 | const geistSans = localFont({
6 | src: "./fonts/GeistVF.woff",
7 | variable: "--font-geist-sans",
8 | weight: "100 900",
9 | });
10 | const geistMono = localFont({
11 | src: "./fonts/GeistMonoVF.woff",
12 | variable: "--font-geist-mono",
13 | weight: "100 900",
14 | });
15 |
16 | export const metadata: Metadata = {
17 | title: "Weather Widget",
18 | description: "Generated by create next app",
19 | };
20 |
21 | export default function RootLayout({
22 | children,
23 | }: Readonly<{
24 | children: React.ReactNode;
25 | }>) {
26 | return (
27 |
28 |
31 | {children}
32 |
33 |
34 | );
35 | }
36 |
--------------------------------------------------------------------------------
/06-dynamic-blog/src/app/layout.tsx:
--------------------------------------------------------------------------------
1 | import type { Metadata } from "next";
2 | import localFont from "next/font/local";
3 | import "./globals.css";
4 |
5 | const geistSans = localFont({
6 | src: "./fonts/GeistVF.woff",
7 | variable: "--font-geist-sans",
8 | weight: "100 900",
9 | });
10 | const geistMono = localFont({
11 | src: "./fonts/GeistMonoVF.woff",
12 | variable: "--font-geist-mono",
13 | weight: "100 900",
14 | });
15 |
16 | export const metadata: Metadata = {
17 | title: "Create Next App",
18 | description: "Generated by create next app",
19 | };
20 |
21 | export default function RootLayout({
22 | children,
23 | }: Readonly<{
24 | children: React.ReactNode;
25 | }>) {
26 | return (
27 |
28 |
31 | {children}
32 |
33 |
34 | );
35 | }
36 |
--------------------------------------------------------------------------------
/01-Countdown-Timer/components/ui/input.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react"
2 |
3 | import { cn } from "@/lib/utils"
4 |
5 | export interface InputProps
6 | extends React.InputHTMLAttributes {}
7 |
8 | const Input = React.forwardRef(
9 | ({ className, type, ...props }, ref) => {
10 | return (
11 |
20 | )
21 | }
22 | )
23 | Input.displayName = "Input"
24 |
25 | export { Input }
26 |
--------------------------------------------------------------------------------
/04-Weather-Widget/src/components/ui/input.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react"
2 |
3 | import { cn } from "@/lib/utils"
4 |
5 | export interface InputProps
6 | extends React.InputHTMLAttributes {}
7 |
8 | const Input = React.forwardRef(
9 | ({ className, type, ...props }, ref) => {
10 | return (
11 |
20 | )
21 | }
22 | )
23 | Input.displayName = "Input"
24 |
25 | export { Input }
26 |
--------------------------------------------------------------------------------
/02-E-Commerce/src/app/layout.tsx:
--------------------------------------------------------------------------------
1 | import type { Metadata } from "next";
2 | import localFont from "next/font/local";
3 | import "./globals.css";
4 | import Navbar from "@/components/Navbar";
5 | import Footer from "@/components/Footer";
6 |
7 | const geistSans = localFont({
8 | src: "./fonts/GeistVF.woff",
9 | variable: "--font-geist-sans",
10 | weight: "100 900",
11 | });
12 | const geistMono = localFont({
13 | src: "./fonts/GeistMonoVF.woff",
14 | variable: "--font-geist-mono",
15 | weight: "100 900",
16 | });
17 |
18 | export const metadata: Metadata = {
19 | title: "UF-Store",
20 | description: "Generated by create next app",
21 | icons: "https://banner2.cleanpng.com/20180419/sfq/avf7f2ncu.webp",
22 | };
23 |
24 | export default function RootLayout({
25 | children,
26 | }: Readonly<{
27 | children: React.ReactNode;
28 | }>) {
29 | return (
30 |
31 |
34 |
35 | {children}
36 |
37 |
38 |
39 | );
40 | }
41 |
--------------------------------------------------------------------------------
/00-My-Portfolio/src/app/layout.tsx:
--------------------------------------------------------------------------------
1 | import type { Metadata } from "next";
2 | import localFont from "next/font/local";
3 | import "./globals.css";
4 | import Navbar from "@/components/Navbar";
5 | import Footer from "@/components/Footer";
6 |
7 | const geistSans = localFont({
8 | src: "./fonts/GeistVF.woff",
9 | variable: "--font-geist-sans",
10 | weight: "100 900",
11 | });
12 | const geistMono = localFont({
13 | src: "./fonts/GeistMonoVF.woff",
14 | variable: "--font-geist-mono",
15 | weight: "100 900",
16 | });
17 |
18 | export const metadata: Metadata = {
19 | title: "My Portfolio",
20 | description: "Generated by create next app",
21 | icons: "https://cdn-icons-png.flaticon.com/512/2720/2720550.png",
22 | };
23 |
24 | export default function RootLayout({
25 | children,
26 | }: Readonly<{
27 | children: React.ReactNode;
28 | }>) {
29 | return (
30 |
31 |
34 |
35 | {children}
36 |
37 |
38 |
39 | );
40 | }
41 |
--------------------------------------------------------------------------------
/05-Governor-Site/src/app/layout.tsx:
--------------------------------------------------------------------------------
1 | import type { Metadata } from "next";
2 | import localFont from "next/font/local";
3 | import "./globals.css";
4 | import Header from "@/components/Header";
5 |
6 | const geistSans = localFont({
7 | src: "./fonts/GeistVF.woff",
8 | variable: "--font-geist-sans",
9 | weight: "100 900",
10 | });
11 | const geistMono = localFont({
12 | src: "./fonts/GeistMonoVF.woff",
13 | variable: "--font-geist-mono",
14 | weight: "100 900",
15 | });
16 |
17 | export const metadata: Metadata = {
18 | title: "Governor Initiative",
19 | description: "Generated by create next app",
20 | };
21 |
22 | export default function RootLayout({
23 | children,
24 | }: Readonly<{
25 | children: React.ReactNode;
26 | }>) {
27 | return (
28 |
29 |
30 |
31 |
32 |
36 |
37 | {children}
38 |
39 |
40 | );
41 | }
42 |
--------------------------------------------------------------------------------
/01-Countdown-Timer/public/next.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/05-Governor-Site/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "governorweb-assignment",
3 | "version": "0.1.0",
4 | "private": true,
5 | "scripts": {
6 | "dev": "next dev",
7 | "build": "next build",
8 | "start": "next start",
9 | "lint": "next lint"
10 | },
11 | "dependencies": {
12 | "@emotion/react": "^11.13.3",
13 | "@emotion/styled": "^11.13.0",
14 | "@mui/icons-material": "^6.1.2",
15 | "@mui/material": "^6.1.2",
16 | "@radix-ui/react-icons": "^1.3.0",
17 | "@radix-ui/react-slot": "^1.1.0",
18 | "class-variance-authority": "^0.7.0",
19 | "clsx": "^2.1.1",
20 | "embla-carousel": "^8.3.0",
21 | "embla-carousel-autoplay": "^8.3.0",
22 | "embla-carousel-react": "^8.3.0",
23 | "lucide-react": "^0.447.0",
24 | "next": "14.2.14",
25 | "react": "^18",
26 | "react-dom": "^18",
27 | "react-slick": "^0.30.2",
28 | "react-slideshow-image": "^4.3.1",
29 | "slick-carousel": "^1.8.1",
30 | "tailwind-merge": "^2.5.2",
31 | "tailwindcss-animate": "^1.0.7"
32 | },
33 | "devDependencies": {
34 | "@types/node": "^20",
35 | "@types/react": "^18",
36 | "@types/react-dom": "^18",
37 | "@types/react-slick": "^0.23.13",
38 | "eslint": "^8",
39 | "eslint-config-next": "14.2.14",
40 | "postcss": "^8",
41 | "tailwindcss": "^3.4.1",
42 | "typescript": "^5"
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/02-E-Commerce/src/components/NewsLetter.tsx:
--------------------------------------------------------------------------------
1 | const Newsletter = () => {
2 | return (
3 |
4 |
5 |
Stay Updated
6 |
7 | Subscribe to our newsletter to get the latest updates on products, exclusive offers, and more!
8 |
9 |
23 |
24 |
25 | );
26 | };
27 |
28 | export default Newsletter;
29 |
--------------------------------------------------------------------------------
/06-dynamic-blog/src/app/page.tsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import { blogs, Blogs } from "@/blogs/blogs";
3 | import Link from "next/link";
4 |
5 | export default function Home() {
6 | return (
7 |
8 |
Good Morning Readers
9 |
10 | {blogs.length > 0 && blogs.map((blog: Blogs) => (
11 |
15 |
16 |
{blog.title}
17 |
By {blog.author} on {blog.date}
18 |
{blog.content.slice(0, 100)}...
19 |
20 |
21 | View More
22 |
23 |
24 |
25 |
26 | ))}
27 |
28 |
29 | );
30 | }
31 |
--------------------------------------------------------------------------------
/00-My-Portfolio/src/components/Card.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import Image from 'next/image';
3 | import Button from './Button';
4 |
5 | interface ProjectCardProps {
6 | imageSrc: string;
7 | imageAlt: string;
8 | title: string;
9 | description: string;
10 | buttonText: string;
11 | buttonLink?: string;
12 | buttonOnClick?: () => void;
13 | }
14 |
15 | const ProjectCard: React.FC = ({
16 | imageSrc,
17 | imageAlt,
18 | title,
19 | description,
20 | buttonText,
21 | buttonLink,
22 | buttonOnClick
23 | }) => {
24 | return (
25 | <>
26 |
27 |
28 |
34 |
35 |
36 |
{title}
37 |
{description}
38 | {buttonText && (
39 |
40 |
41 |
42 | )}
43 |
44 |
45 | >
46 | );
47 | };
48 |
49 | export default ProjectCard;
50 |
--------------------------------------------------------------------------------
/01-Countdown-Timer/README.md:
--------------------------------------------------------------------------------
1 | This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
2 |
3 | ## Getting Started
4 |
5 | First, run the development server:
6 |
7 | ```bash
8 | npm run dev
9 | # or
10 | yarn dev
11 | # or
12 | pnpm dev
13 | # or
14 | bun dev
15 | ```
16 |
17 | Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
18 |
19 | You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
20 |
21 | This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.
22 |
23 | ## Learn More
24 |
25 | To learn more about Next.js, take a look at the following resources:
26 |
27 | - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
28 | - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
29 |
30 | You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
31 |
32 | ## Deploy on Vercel
33 |
34 | The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
35 |
36 | Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
37 |
--------------------------------------------------------------------------------
/00-My-Portfolio/README.md:
--------------------------------------------------------------------------------
1 | This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
2 |
3 | ## Getting Started
4 |
5 | First, run the development server:
6 |
7 | ```bash
8 | npm run dev
9 | # or
10 | yarn dev
11 | # or
12 | pnpm dev
13 | # or
14 | bun dev
15 | ```
16 |
17 | Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
18 |
19 | You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
20 |
21 | This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
22 |
23 | ## Learn More
24 |
25 | To learn more about Next.js, take a look at the following resources:
26 |
27 | - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
28 | - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
29 |
30 | You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
31 |
32 | ## Deploy on Vercel
33 |
34 | The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
35 |
36 | Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
37 |
--------------------------------------------------------------------------------
/02-E-Commerce/README.md:
--------------------------------------------------------------------------------
1 | This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
2 |
3 | ## Getting Started
4 |
5 | First, run the development server:
6 |
7 | ```bash
8 | npm run dev
9 | # or
10 | yarn dev
11 | # or
12 | pnpm dev
13 | # or
14 | bun dev
15 | ```
16 |
17 | Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
18 |
19 | You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
20 |
21 | This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
22 |
23 | ## Learn More
24 |
25 | To learn more about Next.js, take a look at the following resources:
26 |
27 | - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
28 | - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
29 |
30 | You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
31 |
32 | ## Deploy on Vercel
33 |
34 | The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
35 |
36 | Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
37 |
--------------------------------------------------------------------------------
/03-Meme-Maker/README.md:
--------------------------------------------------------------------------------
1 | This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
2 |
3 | ## Getting Started
4 |
5 | First, run the development server:
6 |
7 | ```bash
8 | npm run dev
9 | # or
10 | yarn dev
11 | # or
12 | pnpm dev
13 | # or
14 | bun dev
15 | ```
16 |
17 | Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
18 |
19 | You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
20 |
21 | This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
22 |
23 | ## Learn More
24 |
25 | To learn more about Next.js, take a look at the following resources:
26 |
27 | - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
28 | - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
29 |
30 | You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
31 |
32 | ## Deploy on Vercel
33 |
34 | The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
35 |
36 | Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
37 |
--------------------------------------------------------------------------------
/04-Weather-Widget/README.md:
--------------------------------------------------------------------------------
1 | This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
2 |
3 | ## Getting Started
4 |
5 | First, run the development server:
6 |
7 | ```bash
8 | npm run dev
9 | # or
10 | yarn dev
11 | # or
12 | pnpm dev
13 | # or
14 | bun dev
15 | ```
16 |
17 | Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
18 |
19 | You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
20 |
21 | This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
22 |
23 | ## Learn More
24 |
25 | To learn more about Next.js, take a look at the following resources:
26 |
27 | - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
28 | - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
29 |
30 | You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
31 |
32 | ## Deploy on Vercel
33 |
34 | The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
35 |
36 | Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
37 |
--------------------------------------------------------------------------------
/05-Governor-Site/README.md:
--------------------------------------------------------------------------------
1 | This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
2 |
3 | ## Getting Started
4 |
5 | First, run the development server:
6 |
7 | ```bash
8 | npm run dev
9 | # or
10 | yarn dev
11 | # or
12 | pnpm dev
13 | # or
14 | bun dev
15 | ```
16 |
17 | Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
18 |
19 | You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
20 |
21 | This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
22 |
23 | ## Learn More
24 |
25 | To learn more about Next.js, take a look at the following resources:
26 |
27 | - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
28 | - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
29 |
30 | You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
31 |
32 | ## Deploy on Vercel
33 |
34 | The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
35 |
36 | Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
37 |
--------------------------------------------------------------------------------
/06-dynamic-blog/README.md:
--------------------------------------------------------------------------------
1 | This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
2 |
3 | ## Getting Started
4 |
5 | First, run the development server:
6 |
7 | ```bash
8 | npm run dev
9 | # or
10 | yarn dev
11 | # or
12 | pnpm dev
13 | # or
14 | bun dev
15 | ```
16 |
17 | Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
18 |
19 | You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
20 |
21 | This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
22 |
23 | ## Learn More
24 |
25 | To learn more about Next.js, take a look at the following resources:
26 |
27 | - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
28 | - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
29 |
30 | You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
31 |
32 | ## Deploy on Vercel
33 |
34 | The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
35 |
36 | Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
37 |
--------------------------------------------------------------------------------
/05-Governor-Site/src/components/Slider.tsx:
--------------------------------------------------------------------------------
1 | 'use client'
2 | import { CardContent } from "@/components/ui/card"
3 | import Autoplay from "embla-carousel-autoplay"
4 | import {
5 | Carousel,
6 | CarouselContent,
7 | CarouselItem,
8 | } from "@/components/ui/carousel"
9 | import Image from "next/image";
10 | import { useRef } from "react";
11 |
12 | const images = [
13 | '/slideShow1.jpg',
14 | '/slideShow2.jpg',
15 | '/slideShow3.jpg',
16 | '/slideShow4.jpg',
17 | '/slideShow5.jpg',
18 | '/slideShow6.jpg',
19 | '/slideShow7.jpg',
20 | '/slideShow8.jpg',
21 | ];
22 |
23 | const CarouselDemo = () => {
24 | const plugin = useRef(
25 | Autoplay({ delay: 1000, stopOnInteraction: true })
26 | )
27 | return (
28 |
34 |
35 | {images.map((image, index) => (
36 |
37 |
38 |
39 |
46 |
47 |
48 |
49 | ))}
50 |
51 |
52 | )
53 | }
54 | export default CarouselDemo;
55 |
--------------------------------------------------------------------------------
/04-Weather-Widget/tailwind.config.ts:
--------------------------------------------------------------------------------
1 | import type { Config } from "tailwindcss";
2 |
3 | const config: Config = {
4 | darkMode: ["class"],
5 | content: [
6 | "./src/pages/**/*.{js,ts,jsx,tsx,mdx}",
7 | "./src/components/**/*.{js,ts,jsx,tsx,mdx}",
8 | "./src/app/**/*.{js,ts,jsx,tsx,mdx}",
9 | ],
10 | theme: {
11 | extend: {
12 | colors: {
13 | background: 'hsl(var(--background))',
14 | foreground: 'hsl(var(--foreground))',
15 | card: {
16 | DEFAULT: 'hsl(var(--card))',
17 | foreground: 'hsl(var(--card-foreground))'
18 | },
19 | popover: {
20 | DEFAULT: 'hsl(var(--popover))',
21 | foreground: 'hsl(var(--popover-foreground))'
22 | },
23 | primary: {
24 | DEFAULT: 'hsl(var(--primary))',
25 | foreground: 'hsl(var(--primary-foreground))'
26 | },
27 | secondary: {
28 | DEFAULT: 'hsl(var(--secondary))',
29 | foreground: 'hsl(var(--secondary-foreground))'
30 | },
31 | muted: {
32 | DEFAULT: 'hsl(var(--muted))',
33 | foreground: 'hsl(var(--muted-foreground))'
34 | },
35 | accent: {
36 | DEFAULT: 'hsl(var(--accent))',
37 | foreground: 'hsl(var(--accent-foreground))'
38 | },
39 | destructive: {
40 | DEFAULT: 'hsl(var(--destructive))',
41 | foreground: 'hsl(var(--destructive-foreground))'
42 | },
43 | border: 'hsl(var(--border))',
44 | input: 'hsl(var(--input))',
45 | ring: 'hsl(var(--ring))',
46 | chart: {
47 | '1': 'hsl(var(--chart-1))',
48 | '2': 'hsl(var(--chart-2))',
49 | '3': 'hsl(var(--chart-3))',
50 | '4': 'hsl(var(--chart-4))',
51 | '5': 'hsl(var(--chart-5))'
52 | }
53 | },
54 | borderRadius: {
55 | lg: 'var(--radius)',
56 | md: 'calc(var(--radius) - 2px)',
57 | sm: 'calc(var(--radius) - 4px)'
58 | }
59 | }
60 | },
61 | plugins: [require("tailwindcss-animate")],
62 | };
63 | export default config;
64 |
--------------------------------------------------------------------------------
/05-Governor-Site/src/app/globals.css:
--------------------------------------------------------------------------------
1 | @tailwind base;
2 | @tailwind components;
3 | @tailwind utilities;
4 | @layer base {
5 | :root {
6 | --background: 0 0% 100%;
7 | --foreground: 240 10% 3.9%;
8 | --card: 0 0% 100%;
9 | --card-foreground: 240 10% 3.9%;
10 | --popover: 0 0% 100%;
11 | --popover-foreground: 240 10% 3.9%;
12 | --primary: 240 5.9% 10%;
13 | --primary-foreground: 0 0% 98%;
14 | --secondary: 240 4.8% 95.9%;
15 | --secondary-foreground: 240 5.9% 10%;
16 | --muted: 240 4.8% 95.9%;
17 | --muted-foreground: 240 3.8% 46.1%;
18 | --accent: 240 4.8% 95.9%;
19 | --accent-foreground: 240 5.9% 10%;
20 | --destructive: 0 84.2% 60.2%;
21 | --destructive-foreground: 0 0% 98%;
22 | --border: 240 5.9% 90%;
23 | --input: 240 5.9% 90%;
24 | --ring: 240 10% 3.9%;
25 | --chart-1: 12 76% 61%;
26 | --chart-2: 173 58% 39%;
27 | --chart-3: 197 37% 24%;
28 | --chart-4: 43 74% 66%;
29 | --chart-5: 27 87% 67%;
30 | --radius: 0.5rem
31 | }
32 | .dark {
33 | --background: 240 10% 3.9%;
34 | --foreground: 0 0% 98%;
35 | --card: 240 10% 3.9%;
36 | --card-foreground: 0 0% 98%;
37 | --popover: 240 10% 3.9%;
38 | --popover-foreground: 0 0% 98%;
39 | --primary: 0 0% 98%;
40 | --primary-foreground: 240 5.9% 10%;
41 | --secondary: 240 3.7% 15.9%;
42 | --secondary-foreground: 0 0% 98%;
43 | --muted: 240 3.7% 15.9%;
44 | --muted-foreground: 240 5% 64.9%;
45 | --accent: 240 3.7% 15.9%;
46 | --accent-foreground: 0 0% 98%;
47 | --destructive: 0 62.8% 30.6%;
48 | --destructive-foreground: 0 0% 98%;
49 | --border: 240 3.7% 15.9%;
50 | --input: 240 3.7% 15.9%;
51 | --ring: 240 4.9% 83.9%;
52 | --chart-1: 220 70% 50%;
53 | --chart-2: 160 60% 45%;
54 | --chart-3: 30 80% 55%;
55 | --chart-4: 280 65% 60%;
56 | --chart-5: 340 75% 55%
57 | }
58 | }
59 | @layer base {
60 | * {
61 | @apply border-border;
62 | }
63 | body {
64 | @apply bg-background text-foreground;
65 | }
66 | }
67 |
68 |
--------------------------------------------------------------------------------
/02-E-Commerce/src/components/Hero.tsx:
--------------------------------------------------------------------------------
1 | import Link from "next/link";
2 |
3 | const Hero = () => {
4 | return (
5 |
6 |
7 |
8 |
22 |
23 |
24 | Welcome to UF-Store
25 |
26 |
27 | Discover our range of products and enjoy a seamless shopping experience. Explore now!
28 |
29 |
30 |
34 | Shop Now
35 |
36 |
37 |
38 |
39 |
40 |
41 | );
42 | };
43 |
44 | export default Hero;
45 |
--------------------------------------------------------------------------------
/01-Countdown-Timer/components/ui/button.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react"
2 | import { Slot } from "@radix-ui/react-slot"
3 | import { cva, type VariantProps } from "class-variance-authority"
4 |
5 | import { cn } from "@/lib/utils"
6 |
7 | const buttonVariants = cva(
8 | "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
9 | {
10 | variants: {
11 | variant: {
12 | default: "bg-primary text-primary-foreground hover:bg-primary/90",
13 | destructive:
14 | "bg-destructive text-destructive-foreground hover:bg-destructive/90",
15 | outline:
16 | "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
17 | secondary:
18 | "bg-secondary text-secondary-foreground hover:bg-secondary/80",
19 | ghost: "hover:bg-accent hover:text-accent-foreground",
20 | link: "text-primary underline-offset-4 hover:underline",
21 | },
22 | size: {
23 | default: "h-10 px-4 py-2",
24 | sm: "h-9 rounded-md px-3",
25 | lg: "h-11 rounded-md px-8",
26 | icon: "h-10 w-10",
27 | },
28 | },
29 | defaultVariants: {
30 | variant: "default",
31 | size: "default",
32 | },
33 | }
34 | )
35 |
36 | export interface ButtonProps
37 | extends React.ButtonHTMLAttributes,
38 | VariantProps {
39 | asChild?: boolean
40 | }
41 |
42 | const Button = React.forwardRef(
43 | ({ className, variant, size, asChild = false, ...props }, ref) => {
44 | const Comp = asChild ? Slot : "button"
45 | return (
46 |
51 | )
52 | }
53 | )
54 | Button.displayName = "Button"
55 |
56 | export { Button, buttonVariants }
57 |
--------------------------------------------------------------------------------
/04-Weather-Widget/src/components/ui/button.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react"
2 | import { Slot } from "@radix-ui/react-slot"
3 | import { cva, type VariantProps } from "class-variance-authority"
4 |
5 | import { cn } from "@/lib/utils"
6 |
7 | const buttonVariants = cva(
8 | "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
9 | {
10 | variants: {
11 | variant: {
12 | default: "bg-primary text-primary-foreground hover:bg-primary/90",
13 | destructive:
14 | "bg-destructive text-destructive-foreground hover:bg-destructive/90",
15 | outline:
16 | "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
17 | secondary:
18 | "bg-secondary text-secondary-foreground hover:bg-secondary/80",
19 | ghost: "hover:bg-accent hover:text-accent-foreground",
20 | link: "text-primary underline-offset-4 hover:underline",
21 | },
22 | size: {
23 | default: "h-10 px-4 py-2",
24 | sm: "h-9 rounded-md px-3",
25 | lg: "h-11 rounded-md px-8",
26 | icon: "h-10 w-10",
27 | },
28 | },
29 | defaultVariants: {
30 | variant: "default",
31 | size: "default",
32 | },
33 | }
34 | )
35 |
36 | export interface ButtonProps
37 | extends React.ButtonHTMLAttributes,
38 | VariantProps {
39 | asChild?: boolean
40 | }
41 |
42 | const Button = React.forwardRef(
43 | ({ className, variant, size, asChild = false, ...props }, ref) => {
44 | const Comp = asChild ? Slot : "button"
45 | return (
46 |
51 | )
52 | }
53 | )
54 | Button.displayName = "Button"
55 |
56 | export { Button, buttonVariants }
57 |
--------------------------------------------------------------------------------
/05-Governor-Site/src/components/ui/button.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react"
2 | import { Slot } from "@radix-ui/react-slot"
3 | import { cva, type VariantProps } from "class-variance-authority"
4 |
5 | import { cn } from "@/lib/utils"
6 |
7 | const buttonVariants = cva(
8 | "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
9 | {
10 | variants: {
11 | variant: {
12 | default:
13 | "bg-primary text-primary-foreground shadow hover:bg-primary/90",
14 | destructive:
15 | "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
16 | outline:
17 | "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
18 | secondary:
19 | "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
20 | ghost: "hover:bg-accent hover:text-accent-foreground",
21 | link: "text-primary underline-offset-4 hover:underline",
22 | },
23 | size: {
24 | default: "h-9 px-4 py-2",
25 | sm: "h-8 rounded-md px-3 text-xs",
26 | lg: "h-10 rounded-md px-8",
27 | icon: "h-9 w-9",
28 | },
29 | },
30 | defaultVariants: {
31 | variant: "default",
32 | size: "default",
33 | },
34 | }
35 | )
36 |
37 | export interface ButtonProps
38 | extends React.ButtonHTMLAttributes,
39 | VariantProps {
40 | asChild?: boolean
41 | }
42 |
43 | const Button = React.forwardRef(
44 | ({ className, variant, size, asChild = false, ...props }, ref) => {
45 | const Comp = asChild ? Slot : "button"
46 | return (
47 |
52 | )
53 | }
54 | )
55 | Button.displayName = "Button"
56 |
57 | export { Button, buttonVariants }
58 |
--------------------------------------------------------------------------------
/05-Governor-Site/src/components/About.tsx:
--------------------------------------------------------------------------------
1 | import Image from 'next/image'
2 | import React from 'react'
3 |
4 | const About = () => {
5 | return (
6 |
7 |
8 |
9 |
Certified Cloud Applied Generative AI Engineer (GenEng) and Solopreneur Developing Billion-Dollar Valued Developers and Solopreneurs
10 |
The pace of technological change is accelerating, big players like Microsoft, Amazon, Google, and OpenAI are winning by providing infrastructure, large AI foundation models, frameworks, 3D Metaverse experiences, and massive distribution networks. Solopreneurs trained in this program will win by automating work typically outsourced to employees, by directly connecting to customers by eliminating the middleman, and by developing vertical metaverses, thus paving the way for the first billion-dollar valued solopreneur businesses. This program has the objective to train this new breed of billion-dollar solopreneurs. These solopreneurs will adopt the ultra-lean business model and work independently and will not need to hire employees or other team members.
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 | )
20 | }
21 |
22 | export default About
--------------------------------------------------------------------------------
/01-Countdown-Timer/tailwind.config.ts:
--------------------------------------------------------------------------------
1 | import type { Config } from "tailwindcss";
2 |
3 | const config: Config = {
4 | darkMode: ["class"],
5 | content: [
6 | "./pages/**/*.{js,ts,jsx,tsx,mdx}",
7 | "./components/**/*.{js,ts,jsx,tsx,mdx}",
8 | "./app/**/*.{js,ts,jsx,tsx,mdx}",
9 | ],
10 | theme: {
11 | extend: {
12 | backgroundImage: {
13 | 'gradient-radial': 'radial-gradient(var(--tw-gradient-stops))',
14 | 'gradient-conic': 'conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))'
15 | },
16 | borderRadius: {
17 | lg: 'var(--radius)',
18 | md: 'calc(var(--radius) - 2px)',
19 | sm: 'calc(var(--radius) - 4px)'
20 | },
21 | colors: {
22 | background: 'hsl(var(--background))',
23 | foreground: 'hsl(var(--foreground))',
24 | card: {
25 | DEFAULT: 'hsl(var(--card))',
26 | foreground: 'hsl(var(--card-foreground))'
27 | },
28 | popover: {
29 | DEFAULT: 'hsl(var(--popover))',
30 | foreground: 'hsl(var(--popover-foreground))'
31 | },
32 | primary: {
33 | DEFAULT: 'hsl(var(--primary))',
34 | foreground: 'hsl(var(--primary-foreground))'
35 | },
36 | secondary: {
37 | DEFAULT: 'hsl(var(--secondary))',
38 | foreground: 'hsl(var(--secondary-foreground))'
39 | },
40 | muted: {
41 | DEFAULT: 'hsl(var(--muted))',
42 | foreground: 'hsl(var(--muted-foreground))'
43 | },
44 | accent: {
45 | DEFAULT: 'hsl(var(--accent))',
46 | foreground: 'hsl(var(--accent-foreground))'
47 | },
48 | destructive: {
49 | DEFAULT: 'hsl(var(--destructive))',
50 | foreground: 'hsl(var(--destructive-foreground))'
51 | },
52 | border: 'hsl(var(--border))',
53 | input: 'hsl(var(--input))',
54 | ring: 'hsl(var(--ring))',
55 | chart: {
56 | '1': 'hsl(var(--chart-1))',
57 | '2': 'hsl(var(--chart-2))',
58 | '3': 'hsl(var(--chart-3))',
59 | '4': 'hsl(var(--chart-4))',
60 | '5': 'hsl(var(--chart-5))'
61 | }
62 | }
63 | }
64 | },
65 | plugins: [require("tailwindcss-animate")],
66 | };
67 | export default config;
68 |
--------------------------------------------------------------------------------
/02-E-Commerce/src/components/Testimonials.tsx:
--------------------------------------------------------------------------------
1 | import Image from 'next/image';
2 | import T1 from "@/images/T1.webp";
3 | import T2 from "@/images/T2.jpg";
4 | import T3 from "@/images/T3.jpg";
5 |
6 | const testimonials = [
7 | {
8 | name: 'Customer 1',
9 | role: 'Verified Buyer',
10 | quote: 'UF-Store has an amazing selection of products and their customer service is top-notch!',
11 | image: T1,
12 | },
13 | {
14 | name: 'Customer 2',
15 | role: 'Regular Customer',
16 | quote: 'I love shopping at UF-Store. The site is user-friendly and the delivery is always prompt.',
17 | image: T2,
18 | },
19 | {
20 | name: 'Customer 3',
21 | role: 'Happy Shopper',
22 | quote: 'Fantastic experience! The product quality is excellent and the prices are unbeatable.',
23 | image: T3,
24 | },
25 | ];
26 |
27 | const Testimonials = () => {
28 | return (
29 |
30 |
31 |
What Our Customers Say
32 |
33 | {testimonials.map((testimonial, index) => (
34 |
35 |
36 |
43 |
44 |
{testimonial.name}
45 |
{testimonial.role}
46 |
47 |
48 |
{`${testimonial.quote}`}
49 |
50 | ))}
51 |
52 |
53 |
54 | );
55 | };
56 |
57 | export default Testimonials;
58 |
--------------------------------------------------------------------------------
/05-Governor-Site/src/components/Hero.tsx:
--------------------------------------------------------------------------------
1 | import Image from "next/image"
2 |
3 | const Hero = () => {
4 | return (
5 |
6 |
7 |
8 |
9 |
10 |
Governor Sindh Kamran Khan Tessori
11 |
Certified Cloud Applied Generative AI Engineer (GenEng)
12 |
Earn up to $5,000 / month
13 |
Now admissions are open in Hyderabad
14 |
15 |
Apply Now
16 |
17 | 562,143
18 | Accepted Applications
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 | )
29 | }
30 |
31 | export default Hero
--------------------------------------------------------------------------------
/02-E-Commerce/src/components/AboutUs.tsx:
--------------------------------------------------------------------------------
1 | import Image from 'next/image';
2 | import AboutImage from "@/images/About.png"
3 | import Link from 'next/link';
4 |
5 | const AboutUs = () => {
6 | return (
7 |
8 |
9 |
10 |
11 |
About Us
12 |
13 | Welcome to UF-Store, your go-to destination for the best products and unbeatable deals.
14 | We are dedicated to providing you with a seamless shopping experience, top-notch customer service,
15 | and a wide range of high-quality products. Our mission is to make shopping easy and enjoyable for you,
16 | and we’re always here to help with any questions or concerns you may have.
17 |
18 |
19 |
23 | Get in Touch
24 |
25 |
26 |
27 |
28 |
35 |
36 |
37 |
38 |
39 | );
40 | };
41 |
42 | export default AboutUs;
43 |
--------------------------------------------------------------------------------
/05-Governor-Site/src/components/ui/card.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react"
2 |
3 | import { cn } from "@/lib/utils"
4 |
5 | const Card = React.forwardRef<
6 | HTMLDivElement,
7 | React.HTMLAttributes
8 | >(({ className, ...props }, ref) => (
9 |
17 | ))
18 | Card.displayName = "Card"
19 |
20 | const CardHeader = React.forwardRef<
21 | HTMLDivElement,
22 | React.HTMLAttributes
23 | >(({ className, ...props }, ref) => (
24 |
29 | ))
30 | CardHeader.displayName = "CardHeader"
31 |
32 | const CardTitle = React.forwardRef<
33 | HTMLParagraphElement,
34 | React.HTMLAttributes
35 | >(({ className, ...props }, ref) => (
36 |
41 | ))
42 | CardTitle.displayName = "CardTitle"
43 |
44 | const CardDescription = React.forwardRef<
45 | HTMLParagraphElement,
46 | React.HTMLAttributes
47 | >(({ className, ...props }, ref) => (
48 |
53 | ))
54 | CardDescription.displayName = "CardDescription"
55 |
56 | const CardContent = React.forwardRef<
57 | HTMLDivElement,
58 | React.HTMLAttributes
59 | >(({ className, ...props }, ref) => (
60 |
61 | ))
62 | CardContent.displayName = "CardContent"
63 |
64 | const CardFooter = React.forwardRef<
65 | HTMLDivElement,
66 | React.HTMLAttributes
67 | >(({ className, ...props }, ref) => (
68 |
73 | ))
74 | CardFooter.displayName = "CardFooter"
75 |
76 | export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent }
77 |
--------------------------------------------------------------------------------
/02-E-Commerce/src/components/SuccessModal.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { useRouter } from 'next/navigation';
3 |
4 | interface SuccessModalProps {
5 | isOpen: boolean;
6 | onClose: () => void;
7 | message: string;
8 | vCart?: boolean;
9 | }
10 |
11 | const SuccessModal: React.FC = ({ isOpen, onClose, message, vCart }) => {
12 | const router = useRouter();
13 |
14 | if (!isOpen) return null;
15 |
16 | return (
17 |
18 |
19 |
23 | ×
24 |
25 |
26 |
27 |
28 |
29 |
{message}
30 |
31 |
32 |
36 | Close
37 |
38 | {vCart && router.push('/cart')}
40 | className="bg-yellow-600 text-white py-2 px-4 rounded-md hover:bg-yellow-700"
41 | >
42 | View Cart
43 | }
44 |
45 |
46 |
47 | );
48 | };
49 |
50 | export default SuccessModal;
51 |
--------------------------------------------------------------------------------
/04-Weather-Widget/src/components/ui/card.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react"
2 |
3 | import { cn } from "@/lib/utils"
4 |
5 | const Card = React.forwardRef<
6 | HTMLDivElement,
7 | React.HTMLAttributes
8 | >(({ className, ...props }, ref) => (
9 |
17 | ))
18 | Card.displayName = "Card"
19 |
20 | const CardHeader = React.forwardRef<
21 | HTMLDivElement,
22 | React.HTMLAttributes
23 | >(({ className, ...props }, ref) => (
24 |
29 | ))
30 | CardHeader.displayName = "CardHeader"
31 |
32 | const CardTitle = React.forwardRef<
33 | HTMLParagraphElement,
34 | React.HTMLAttributes
35 | >(({ className, ...props }, ref) => (
36 |
44 | ))
45 | CardTitle.displayName = "CardTitle"
46 |
47 | const CardDescription = React.forwardRef<
48 | HTMLParagraphElement,
49 | React.HTMLAttributes
50 | >(({ className, ...props }, ref) => (
51 |
56 | ))
57 | CardDescription.displayName = "CardDescription"
58 |
59 | const CardContent = React.forwardRef<
60 | HTMLDivElement,
61 | React.HTMLAttributes
62 | >(({ className, ...props }, ref) => (
63 |
64 | ))
65 | CardContent.displayName = "CardContent"
66 |
67 | const CardFooter = React.forwardRef<
68 | HTMLDivElement,
69 | React.HTMLAttributes
70 | >(({ className, ...props }, ref) => (
71 |
76 | ))
77 | CardFooter.displayName = "CardFooter"
78 |
79 | export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent }
80 |
--------------------------------------------------------------------------------
/00-My-Portfolio/src/components/Section.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import Image from 'next/image';
3 | import Link from 'next/link';
4 |
5 | interface SectionProps {
6 | imageSrc: string;
7 | imageAlt: string;
8 | heading: string;
9 | text: string;
10 | buttonText?: string;
11 | buttonLink?: string;
12 | reverse?: boolean;
13 | marginTop?: boolean;
14 | isCircular?: boolean;
15 | }
16 |
17 | const Section: React.FC = ({
18 | imageSrc,
19 | imageAlt,
20 | heading,
21 | text,
22 | marginTop,
23 | buttonText,
24 | buttonLink,
25 | reverse = false,
26 | isCircular = false,
27 | }) => {
28 | return (
29 |
30 |
31 | {/* Image */}
32 |
43 |
44 |
45 |
{heading}
46 |
{text}
47 | {buttonText && buttonLink && (
48 |
49 | {buttonText}
50 |
51 | )}
52 |
53 |
54 |
55 | );
56 | };
57 |
58 | export default Section;
59 |
--------------------------------------------------------------------------------
/03-Meme-Maker/src/app/page.tsx:
--------------------------------------------------------------------------------
1 | import Image from "next/image";
2 | import Link from "next/link";
3 | import React from "react";
4 |
5 | interface Memes {
6 | name: string;
7 | url: string;
8 | id: number;
9 | box_count: number;
10 | }
11 |
12 | export default async function Home() {
13 | const data = await fetch("https://api.imgflip.com/get_memes");
14 | const response = await data.json();
15 |
16 | return (
17 |
18 |
19 | Meme Generator
20 |
21 |
22 | {response && response.data.memes.map((item: Memes) => (
23 |
24 |
25 |
32 |
33 |
34 |
{item.name}
35 |
44 |
45 | Generate Meme
46 |
47 |
48 |
49 |
50 | ))}
51 |
52 |
53 | );
54 | }
55 |
--------------------------------------------------------------------------------
/05-Governor-Site/tailwind.config.ts:
--------------------------------------------------------------------------------
1 | import type { Config } from "tailwindcss";
2 |
3 | const config: Config = {
4 | darkMode: ["class"],
5 | content: [
6 | "./src/pages/**/*.{js,ts,jsx,tsx,mdx}",
7 | "./src/components/**/*.{js,ts,jsx,tsx,mdx}",
8 | "./src/app/**/*.{js,ts,jsx,tsx,mdx}",
9 | ],
10 | theme: {
11 | screens: {
12 | 'sm': '640px',
13 | // => @media (min-width: 640px) { ... }
14 |
15 | 'md': '768px',
16 | // => @media (min-width: 768px) { ... }
17 |
18 | 'lg': '1024px',
19 | // => @media (min-width: 1024px) { ... }
20 |
21 | 'xl': '1280px',
22 | // => @media (min-width: 1280px) { ... }
23 |
24 | '2xl': '1536px',
25 | // => @media (min-width: 1536px) { ... }
26 | },
27 | extend: {
28 | colors: {
29 | background: 'hsl(var(--background))',
30 | foreground: 'hsl(var(--foreground))',
31 | card: {
32 | DEFAULT: 'hsl(var(--card))',
33 | foreground: 'hsl(var(--card-foreground))'
34 | },
35 | popover: {
36 | DEFAULT: 'hsl(var(--popover))',
37 | foreground: 'hsl(var(--popover-foreground))'
38 | },
39 | primary: {
40 | DEFAULT: 'hsl(var(--primary))',
41 | foreground: 'hsl(var(--primary-foreground))'
42 | },
43 | secondary: {
44 | DEFAULT: 'hsl(var(--secondary))',
45 | foreground: 'hsl(var(--secondary-foreground))'
46 | },
47 | muted: {
48 | DEFAULT: 'hsl(var(--muted))',
49 | foreground: 'hsl(var(--muted-foreground))'
50 | },
51 | accent: {
52 | DEFAULT: 'hsl(var(--accent))',
53 | foreground: 'hsl(var(--accent-foreground))'
54 | },
55 | destructive: {
56 | DEFAULT: 'hsl(var(--destructive))',
57 | foreground: 'hsl(var(--destructive-foreground))'
58 | },
59 | border: 'hsl(var(--border))',
60 | input: 'hsl(var(--input))',
61 | ring: 'hsl(var(--ring))',
62 | chart: {
63 | '1': 'hsl(var(--chart-1))',
64 | '2': 'hsl(var(--chart-2))',
65 | '3': 'hsl(var(--chart-3))',
66 | '4': 'hsl(var(--chart-4))',
67 | '5': 'hsl(var(--chart-5))'
68 | }
69 | },
70 | borderRadius: {
71 | lg: 'var(--radius)',
72 | md: 'calc(var(--radius) - 2px)',
73 | sm: 'calc(var(--radius) - 4px)'
74 | }
75 | }
76 | },
77 | plugins: [require("tailwindcss-animate")],
78 | };
79 | export default config;
80 |
--------------------------------------------------------------------------------
/00-My-Portfolio/src/app/project/page.tsx:
--------------------------------------------------------------------------------
1 | import ProjectCard from '@/components/Card';
2 | import React from 'react';
3 |
4 | const projects = [
5 | {
6 | imageSrc: 'https://cdn.prod.website-files.com/6009ec8cda7f305645c9d91b/634d61ab95ff7003477f6c1f_d28Qv2T_gk1iZiHd2jgwYTCtdKB0cEX-hQmhwLIbzglorQzErM9tLeq0Sw0jp4j37mXfa6YP9zQA2ZcaW1D5DdjqOBmvB8kH3yd-F9dcEpxvDwlSxao1Qlgn24KC_GDcRdsd7TJ0zJjTTVURHJX3A-hrjWKp0JpuAPL28G6nrXA55Sad6Ujn-A79sA.jpeg',
7 | imageAlt: 'Project 1 Image',
8 | title: 'Apple Website',
9 | description: 'I Developed Responsive Apple Website For Testing My Basic Skills.',
10 | buttonText: 'View Project',
11 | buttonLink: 'https://up-iclone-home.netlify.app/',
12 | },
13 | {
14 | imageSrc: 'https://assets.weforum.org/article/image/f1rGh3mhhk-oj1fj1qjwJ56U37_dJ-MGTGGFHzBp25Q.jpg',
15 | imageAlt: 'Project 2 Image',
16 | title: 'Responsive Crypto',
17 | description: 'Programmed Normal Crypto Website Used Media Queries',
18 | buttonText: 'View Project',
19 | buttonLink: 'https://umarprogrammer19-crypto.netlify.app/',
20 | },
21 | {
22 | imageSrc: 'https://media.licdn.com/dms/image/D4D12AQFq9CAlVcXr3g/article-cover_image-shrink_720_1280/0/1673980988900?e=2147483647&v=beta&t=g_VjCi_pbE-J4RQRh6xAUZsWh3HQ6jVpIJaw4tEsFaE',
23 | imageAlt: 'Project 3 Image',
24 | title: 'Currency Converter',
25 | description: 'Currency Convertor With Life Time Rates Developed Using Javascript.',
26 | buttonText: 'View Project',
27 | buttonLink: 'https://up-currency-convertor.netlify.app/',
28 | },
29 | ];
30 |
31 |
32 | const page = () => {
33 | return (
34 |
35 |
36 |
Projects
37 |
38 | {projects.map((project, index) => (
39 |
48 | ))}
49 |
50 |
51 |
52 | )
53 | }
54 |
55 | export default page
--------------------------------------------------------------------------------
/02-E-Commerce/src/app/products/page.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 |
3 | import { useEffect, useState } from 'react';
4 | import { useRouter } from 'next/navigation';
5 | import Image from 'next/image';
6 |
7 | interface Product {
8 | id: number;
9 | title: string;
10 | price: number;
11 | description: string;
12 | image: string;
13 | }
14 |
15 | const ProductsPage = () => {
16 | const [data, setData] = useState(null);
17 | const router = useRouter();
18 |
19 | useEffect(() => {
20 | // Fetching API For Products Data
21 | fetch('https://fakestoreapi.com/products')
22 | .then((res) => res.json())
23 | .then((res) => {
24 | setData(res);
25 | })
26 | .catch((err) => {
27 | console.error(err);
28 | });
29 | }, []);
30 |
31 | const viewSingleProduct = (productId: number) => {
32 | router.push(`/products/${productId}`); // Navigate to the single product page
33 | };
34 |
35 | return (
36 |
37 |
38 |
Our Products
39 | {!data ? (
40 |
41 |
Loading products....
42 |
43 | ) : (
44 |
45 | {data.map((product) => (
46 |
47 |
54 |
{product.title}
55 |
${product.price.toFixed(2)}
56 |
viewSingleProduct(product.id)}
58 | className="bg-yellow-600 text-white py-2 px-4 rounded-md hover:bg-yellow-700"
59 | >
60 | View Product
61 |
62 |
63 | ))}
64 |
65 | )}
66 |
67 |
68 | );
69 | };
70 |
71 | export default ProductsPage;
72 |
--------------------------------------------------------------------------------
/00-My-Portfolio/src/components/Footer.tsx:
--------------------------------------------------------------------------------
1 | import Link from 'next/link';
2 | import React from 'react';
3 | import { FaFacebookF, FaTwitter, FaInstagram, FaLinkedinIn } from 'react-icons/fa';
4 |
5 | const Footer: React.FC = () => {
6 | return (
7 |
8 |
9 |
10 |
11 | {/* Contact Information */}
12 |
19 |
20 | {/* Quick Links */}
21 |
22 |
Quick Links
23 |
24 | Home
25 | About Us
26 | Projects
27 | Contact
28 |
29 |
30 |
31 | {/* Social Media */}
32 |
49 |
50 |
51 |
52 |
© {new Date().getFullYear()} Umar Farooq. All rights reserved.
53 |
54 |
55 |
56 | );
57 | };
58 |
59 | export default Footer;
60 |
--------------------------------------------------------------------------------
/05-Governor-Site/src/components/Footer.tsx:
--------------------------------------------------------------------------------
1 | import Image from 'next/image'
2 | import Link from 'next/link'
3 | import React from 'react'
4 |
5 | const Footer = () => {
6 | return (
7 |
8 |
9 |
10 |
11 |
12 | Core Courses
13 | Programming Fundamentals
14 | Web2 Using NextJs
15 | Earn as You Learn
16 |
17 |
18 |
19 |
20 | Advanced Courses
21 | Artificial Intelligence
22 | Web3 and Metaverse
23 | Cloud-Native Computing
24 | Ambient Computing and IoT
25 | Genomics and Bioinformatics
26 | Network Programmability and Automation
27 |
28 |
29 |
30 |
31 |
Social Links
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
education@governorsindh.com
41 |
42 |
43 | {/*
44 |
45 | */}
46 |
47 |
48 |
49 |
50 |
51 | )
52 | }
53 |
54 | export default Footer
--------------------------------------------------------------------------------
/04-Weather-Widget/src/app/globals.css:
--------------------------------------------------------------------------------
1 | @tailwind base;
2 | @tailwind components;
3 | @tailwind utilities;
4 |
5 | @layer base {
6 | :root {
7 | --background: 0 0% 100%;
8 | --foreground: 222.2 84% 4.9%;
9 |
10 | --card: 0 0% 100%;
11 | --card-foreground: 222.2 84% 4.9%;
12 |
13 | --popover: 0 0% 100%;
14 | --popover-foreground: 222.2 84% 4.9%;
15 |
16 | --primary: 222.2 47.4% 11.2%;
17 | --primary-foreground: 210 40% 98%;
18 |
19 | --secondary: 210 40% 96.1%;
20 | --secondary-foreground: 222.2 47.4% 11.2%;
21 |
22 | --muted: 210 40% 96.1%;
23 | --muted-foreground: 215.4 16.3% 46.9%;
24 |
25 | --accent: 210 40% 96.1%;
26 | --accent-foreground: 222.2 47.4% 11.2%;
27 |
28 | --destructive: 0 84.2% 60.2%;
29 | --destructive-foreground: 210 40% 98%;
30 |
31 | --border: 214.3 31.8% 91.4%;
32 | --input: 214.3 31.8% 91.4%;
33 | --ring: 222.2 84% 4.9%;
34 |
35 | --radius: 0.5rem;
36 | }
37 |
38 | .dark {
39 | --background: 222.2 84% 4.9%;
40 | --foreground: 210 40% 98%;
41 |
42 | --card: 222.2 84% 4.9%;
43 | --card-foreground: 210 40% 98%;
44 |
45 | --popover: 222.2 84% 4.9%;
46 | --popover-foreground: 210 40% 98%;
47 |
48 | --primary: 210 40% 98%;
49 | --primary-foreground: 222.2 47.4% 11.2%;
50 |
51 | --secondary: 217.2 32.6% 17.5%;
52 | --secondary-foreground: 210 40% 98%;
53 |
54 | --muted: 217.2 32.6% 17.5%;
55 | --muted-foreground: 215 20.2% 65.1%;
56 |
57 | --accent: 217.2 32.6% 17.5%;
58 | --accent-foreground: 210 40% 98%;
59 |
60 | --destructive: 0 62.8% 30.6%;
61 | --destructive-foreground: 210 40% 98%;
62 |
63 | --border: 217.2 32.6% 17.5%;
64 | --input: 217.2 32.6% 17.5%;
65 | --ring: 212.7 26.8% 83.9%;
66 | }
67 | }
68 |
69 | body {
70 | font-family: var(--font-inter), sans-serif;
71 | }
72 |
73 | h1,
74 | h2,
75 | h3,
76 | h4,
77 | h5,
78 | h6 {
79 | font-family: var(--font-inter), sans-serif;
80 | }
81 |
82 | @layer base {
83 | * {
84 | @apply border-border;
85 | }
86 |
87 | body {
88 | @apply bg-background text-foreground;
89 | }
90 | }
91 |
92 | /* Loading Spinner Code */
93 | .spinner-container {
94 | display: flex;
95 | justify-content: center;
96 | align-items: center;
97 | height: 100%;
98 | }
99 |
100 | .loading-spinner {
101 | border: 4px solid rgba(0, 0, 0, 0.08);
102 | border-left-color: rgb(204, 255, 0);
103 | border-radius: 50%;
104 | width: 30px;
105 | height: 30px;
106 | animation: spin 2s linear infinite;
107 | }
108 |
109 | @keyframes spin {
110 | 0% {
111 | transform: rotate(0deg);
112 | }
113 |
114 | 100% {
115 | transform: rotate(360deg);
116 | }
117 | }
--------------------------------------------------------------------------------
/05-Governor-Site/src/components/Courses.tsx:
--------------------------------------------------------------------------------
1 | import Image from "next/image"
2 |
3 | const CourseData = [
4 | {
5 | title: "Programming Fundamentals",
6 | img: "/course1.jpg"
7 | },
8 | {
9 | title: "Web2 Using NextJs",
10 | img: "/course2.jpg"
11 | },
12 | {
13 | title: "Earn as You Learn",
14 | img: "/course3.jpg"
15 | },
16 | ]
17 | const newCourseData = [
18 | {
19 | title: "Artificial Intelligence",
20 | img: "/course4.jpg"
21 | },
22 | {
23 | title: "Web3 and Metaverse",
24 | img: "/course5.jpg"
25 | },
26 | {
27 | title: "Cloud-Native Computing",
28 | img: "/course6.jpg"
29 | },
30 | {
31 | title: "Ambient Computing and IoT",
32 | img: "/course7.jpg"
33 | },
34 | {
35 | title: "Genomics and Bioinformatics",
36 | img: "/course8.jpg"
37 | },
38 | {
39 | title: "Network Programmability",
40 | img: "/course9.jpeg"
41 | },
42 | ]
43 | const Courses = () => {
44 | return (
45 |
46 |
47 |
Core Courses Sequence
48 |
49 | {
50 | CourseData.map((ele, id) => {
51 | return (
52 |
53 |
54 |
{ele.title}
55 |
56 | )
57 | })
58 | }
59 |
60 |
Advanced Courses
61 |
62 | {
63 | newCourseData.map((ele, id) => {
64 | return (
65 |
66 |
67 |
{ele.title}
68 |
69 | )
70 | })
71 | }
72 |
73 |
74 |
75 | )
76 | }
77 |
78 | export default Courses
--------------------------------------------------------------------------------
/05-Governor-Site/src/components/Header.tsx:
--------------------------------------------------------------------------------
1 | 'use client'
2 | import Image from 'next/image'
3 | import Link from 'next/link'
4 | import React, { useState } from 'react'
5 | import MenuIcon from '@mui/icons-material/Menu';
6 | import CloseIcon from '@mui/icons-material/Close';
7 | const Header = () => {
8 | const [isOpen, setIsOpen] = useState(false)
9 | return (
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
Tuition Free Education Program on Latest Technologies
18 |
19 |
20 |
21 |
22 | Home
23 | Apply
24 | Job
25 | Result
26 | Courses
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
Tuition Free Program
37 |
38 |
39 | {
40 | isOpen ? setIsOpen(!isOpen)} className='cursor-pointer text-3xl' /> : setIsOpen(!isOpen)} className='cursor-pointer' />
41 |
42 | }
43 |
44 | {
45 | isOpen ?
46 |
47 |
48 | Home
49 | Apply
50 | Job
51 | Result
52 | Courses
53 |
54 |
55 |
: null
56 | }
57 |
58 |
59 |
60 | )
61 | }
62 |
63 | export default Header
--------------------------------------------------------------------------------
/06-dynamic-blog/src/app/[id]/page.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 | import React, { useRef, useState } from 'react';
3 | import { Blogs, blogs } from "@/blogs/blogs";
4 |
5 | export default function Blog(props: { params: { id: string } }) {
6 | const getBlogs = blogs.find((item: Blogs) => item.id === parseInt(props.params.id));
7 | if (!getBlogs) {
8 | return Blog Not Found ;
9 | }
10 |
11 | const [comments, setComments] = useState([]);
12 | const getText = useRef(null);
13 |
14 | const addComment = (event: React.FormEvent) => {
15 | event.preventDefault();
16 | if (getText.current?.value) {
17 | setComments([...comments, getText.current.value]);
18 | getText.current.value = "";
19 | } else {
20 | alert("Please Write Comment Before Add...")
21 | }
22 | }
23 |
24 | const deleteComment = (index: number) => {
25 | setComments(comments.filter((_: string, i: number) => i !== index));
26 | }
27 |
28 | return (
29 |
30 |
31 |
{getBlogs.title}
32 |
By {getBlogs.author} on {getBlogs.date}
33 |
34 |
{getBlogs.content}
35 |
36 |
37 |
38 | {/* Comment Form */}
39 |
40 |
Add a Comment
41 |
52 |
53 |
54 | {/* Display Comments */}
55 |
56 |
Comments
57 | {comments.length > 0 ? (
58 | comments.map((item: string, index: number) => (
59 |
60 |
{item}
61 |
deleteComment(index)}
63 | className="text-red-500 hover:text-red-600 transition duration-200"
64 | >
65 | Remove
66 |
67 |
68 | ))
69 | ) : (
70 |
No comments yet. Be the first to comment!
71 | )}
72 |
73 |
74 | );
75 | }
76 |
--------------------------------------------------------------------------------
/02-E-Commerce/src/components/Modal.tsx:
--------------------------------------------------------------------------------
1 | import Image from 'next/image';
2 | import React from 'react';
3 |
4 | interface Product {
5 | id: number;
6 | title: string;
7 | price: number;
8 | image: string;
9 | quantity: number;
10 | }
11 |
12 | interface ModalProps {
13 | isOpen: boolean;
14 | onClose: () => void;
15 | onSubmit: (e: React.FormEvent) => void;
16 | cart: Product[];
17 | form: {
18 | name: string;
19 | email: string;
20 | address: string;
21 | };
22 | handleInputChange: (e: React.ChangeEvent) => void;
23 | }
24 |
25 | const Modal: React.FC = ({ isOpen, onClose, onSubmit, cart, form, handleInputChange }) => {
26 | if (!isOpen) return null;
27 |
28 | const calculateTotal = () => {
29 | return cart.reduce((acc, item) => acc + item.price * item.quantity, 0).toFixed(2);
30 | };
31 |
32 | return (
33 |
34 |
35 |
39 | ×
40 |
41 |
Checkout
42 |
43 |
Order Summary
44 | {cart.length === 0 ? (
45 |
Your cart is empty
46 | ) : (
47 |
48 | {cart.map((product) => (
49 |
50 |
57 |
58 |
{product.title}
59 |
Price: ${product.price.toFixed(2)}
60 |
Quantity: {product.quantity}
61 |
Subtotal: ${(product.price * product.quantity).toFixed(2)}
62 |
63 |
64 | ))}
65 |
66 | Total: ${calculateTotal()}
67 |
68 |
69 | )}
70 |
71 |
72 |
81 |
90 |
99 |
103 | Place Order
104 |
105 |
106 |
107 |
108 |
109 | );
110 | };
111 |
112 | export default Modal;
113 |
--------------------------------------------------------------------------------
/00-My-Portfolio/src/app/page.tsx:
--------------------------------------------------------------------------------
1 | import ProjectCard from '@/components/Card';
2 | import Section from '@/components/Section';
3 | import Link from 'next/link';
4 |
5 | const projects = [
6 | {
7 | imageSrc: 'https://cdn.prod.website-files.com/6009ec8cda7f305645c9d91b/634d61ab95ff7003477f6c1f_d28Qv2T_gk1iZiHd2jgwYTCtdKB0cEX-hQmhwLIbzglorQzErM9tLeq0Sw0jp4j37mXfa6YP9zQA2ZcaW1D5DdjqOBmvB8kH3yd-F9dcEpxvDwlSxao1Qlgn24KC_GDcRdsd7TJ0zJjTTVURHJX3A-hrjWKp0JpuAPL28G6nrXA55Sad6Ujn-A79sA.jpeg',
8 | imageAlt: 'Project 1 Image',
9 | title: 'Apple Website',
10 | description: 'I Developed Responsive Apple Website For Testing My Basic Skills.',
11 | buttonText: 'View Project',
12 | buttonLink: 'https://up-iclone-home.netlify.app/',
13 | },
14 | {
15 | imageSrc: 'https://assets.weforum.org/article/image/f1rGh3mhhk-oj1fj1qjwJ56U37_dJ-MGTGGFHzBp25Q.jpg',
16 | imageAlt: 'Project 2 Image',
17 | title: 'Responsive Crypto',
18 | description: 'Programmed Normal Crypto Website Used Media Queries',
19 | buttonText: 'View Project',
20 | buttonLink: 'https://umarprogrammer19-crypto.netlify.app/',
21 | },
22 | {
23 | imageSrc: 'https://media.licdn.com/dms/image/D4D12AQFq9CAlVcXr3g/article-cover_image-shrink_720_1280/0/1673980988900?e=2147483647&v=beta&t=g_VjCi_pbE-J4RQRh6xAUZsWh3HQ6jVpIJaw4tEsFaE',
24 | imageAlt: 'Project 3 Image',
25 | title: 'Currency Converter',
26 | description: 'Currency Convertor With Life Time Rates Developed Using Javascript.',
27 | buttonText: 'View Project',
28 | buttonLink: 'https://up-currency-convertor.netlify.app/',
29 | },
30 | ];
31 |
32 | export default function Home() {
33 | return (
34 |
35 |
36 | {/* Hero Section */}
37 |
48 |
49 | {/* About Section with Circular Image */}
50 |
57 |
58 | {/* Projects Section */}
59 |
60 |
61 |
Projects
62 |
63 |
64 | {projects.map((project, index) => (
65 |
74 | ))}
75 |
76 |
77 |
78 |
79 |
80 |
81 | {/* Contact Section */}
82 |
83 |
84 |
Get in Touch
85 |
Interested in working with us? Contact us today!
86 |
87 | Contact Us
88 |
89 |
90 |
91 |
92 | );
93 | }
94 |
--------------------------------------------------------------------------------
/02-E-Commerce/src/components/Navbar.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 | import Link from 'next/link';
3 | import { useState } from 'react';
4 |
5 | const Navbar = () => {
6 | const [mobileMenuOpen, setMobileMenuOpen] = useState(false);
7 |
8 | return (
9 |
10 |
11 |
12 |
13 |
setMobileMenuOpen(!mobileMenuOpen)}
17 | >
18 | Open main menu
19 | {mobileMenuOpen ? (
20 |
21 |
22 |
23 | ) : (
24 |
25 |
26 |
27 | )}
28 |
29 |
30 |
31 |
32 |
33 | UF-Store
34 |
35 |
36 |
37 |
38 |
39 | Home
40 |
41 |
42 | About
43 |
44 |
45 | Contact
46 |
47 |
48 | Products
49 |
50 |
51 | Cart
52 |
53 |
54 |
55 |
56 | {/* Mobile Menu */}
57 |
58 |
59 |
60 | Home
61 |
62 |
63 | About
64 |
65 |
66 | Contact
67 |
68 |
69 | Products
70 |
71 |
72 | Cart
73 |
74 |
75 |
76 |
77 | );
78 | };
79 |
80 | export default Navbar;
81 |
--------------------------------------------------------------------------------
/02-E-Commerce/src/app/products/[id]/page.tsx:
--------------------------------------------------------------------------------
1 | 'use client';
2 | import { useEffect, useState } from 'react';
3 | import { useParams } from 'next/navigation';
4 | import SuccessModal from '@/components/SuccessModal';
5 | import Image from 'next/image';
6 |
7 | interface Product {
8 | id: number;
9 | title: string;
10 | price: number;
11 | description: string;
12 | image: string;
13 | category: string;
14 | quantity: number;
15 | rating: {
16 | rate: number;
17 | count: number;
18 | };
19 | }
20 |
21 | const SingleProduct = () => {
22 | const [data, setData] = useState(null);
23 | const [isModalOpen, setIsModalOpen] = useState(false);
24 | const [successMessage, setSuccessMessage] = useState('');
25 | const { id } = useParams();
26 |
27 | useEffect(() => {
28 | if (id) {
29 | fetch(`https://fakestoreapi.com/products/${id}`)
30 | .then((res) => res.json())
31 | .then((res) => {
32 | setData(res);
33 | })
34 | .catch((err) => {
35 | console.log(err);
36 | });
37 | }
38 | }, [id]);
39 |
40 | const handleAddToCart = () => {
41 | if (!data) return;
42 |
43 | const existingCart = JSON.parse(localStorage.getItem('cart') || '[]');
44 | const productExists = existingCart.find((item: Product) => item.id === data.id);
45 | let updatedCart;
46 | if (productExists) {
47 | updatedCart = existingCart.map((item: Product) =>
48 | item.id === data.id ? { ...item, quantity: item.quantity + 1 } : item
49 | );
50 | } else {
51 | updatedCart = [...existingCart, { ...data, quantity: 1 }];
52 | }
53 |
54 | localStorage.setItem('cart', JSON.stringify(updatedCart));
55 | setSuccessMessage('Product added to cart successfully!');
56 | setIsModalOpen(true);
57 | };
58 |
59 | return (
60 |
61 |
62 | {!data ? (
63 |
64 |
Loading product...
65 |
66 | ) : (
67 |
68 | {/* Product Image */}
69 |
70 |
77 |
78 |
79 | {/* Product Details */}
80 |
81 |
{data.title}
82 |
{data.description}
83 |
${data.price}
84 |
85 | Category: {data.category}
86 |
87 |
88 | Rating: {data.rating.rate} ({data.rating.count} reviews)
89 |
90 |
91 | {/* Add to Cart Button */}
92 |
96 | Add to Cart
97 |
98 |
99 |
100 | )}
101 |
102 |
103 |
setIsModalOpen(false)}
106 | vCart={true}
107 | message={successMessage}
108 | />
109 |
110 | );
111 | };
112 |
113 | export default SingleProduct;
114 |
--------------------------------------------------------------------------------
/00-My-Portfolio/src/app/contact/page.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { FaPhone, FaEnvelope, FaMapMarkerAlt } from 'react-icons/fa';
3 |
4 | const Contact: React.FC = () => {
5 | return (
6 |
7 |
8 |
Contact Us
9 |
10 |
11 | {/* Contact Details */}
12 |
13 |
Get in Touch
14 |
15 |
16 |
17 |
Phone:
18 |
+92 317 2472531
19 |
20 |
21 |
22 |
23 |
24 |
Email:
25 |
umarofficial0121@gmail.com
26 |
27 |
28 |
29 |
30 |
31 |
Address:
32 |
Pakistan, Karachi
33 |
34 |
35 |
36 |
37 | {/* Contact Form */}
38 |
39 |
Send Us a Message
40 |
41 |
42 |
43 | Name
44 |
45 |
52 |
53 |
54 |
55 | Email
56 |
57 |
64 |
65 |
66 |
67 | Message
68 |
69 |
76 |
77 |
81 | Send Message
82 |
83 |
84 |
85 |
86 |
87 |
88 | );
89 | };
90 |
91 | export default Contact;
92 |
--------------------------------------------------------------------------------
/03-Meme-Maker/src/app/creatememe/page.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 | import Image from 'next/image';
3 | import React, { use, useState } from 'react';
4 | import { saveAs } from 'file-saver';
5 |
6 | interface Meme {
7 | name: string;
8 | id: string;
9 | url: string;
10 | box_count: number;
11 | }
12 |
13 | const CreateMeme = ({ searchParams }: { searchParams: Meme }) => {
14 | const [generatedMemeImage, setGeneratedMemeImage] = useState(null);
15 | const [inputTexts, setInputTexts] = useState<{ [key: string]: string }>({});
16 | const [loading, setLoading] = useState(false);
17 | const userName: string = "umarprogrammer19";
18 | const password: string = "Ugsofficial190807"
19 |
20 | const handleInputChange = (index: number, value: string) => {
21 | setInputTexts(prev => ({ ...prev, [`text_${index}`]: value }));
22 | };
23 |
24 | const generateMeme = async (event: React.FormEvent) => {
25 | event.preventDefault();
26 | setLoading(true);
27 |
28 | const filledInputs = Object.values(inputTexts).filter(text => text.trim() !== '');
29 | const boxesParams = filledInputs.map((text, index) => `boxes[${index}][text]=${encodeURIComponent(text)}`).join('&');
30 | const apiUrl = `https://api.imgflip.com/caption_image?template_id=${searchParams.id}&username=${userName}&password=${password}&${boxesParams}`;
31 |
32 | try {
33 | const response = await fetch(apiUrl);
34 | const data = await response.json();
35 |
36 | if (data.success) {
37 | setGeneratedMemeImage(data.data.url);
38 | setInputTexts({});
39 | } else {
40 | alert('Error generating meme: ' + data.error_message);
41 | }
42 | } catch (error) {
43 | alert('Error generating meme: ' + (error as Error).message);
44 | } finally {
45 | setLoading(false);
46 | }
47 | };
48 |
49 | const gettingNumberOfInput = (): JSX.Element[] => {
50 | const inputs: JSX.Element[] = [];
51 | for (let i = 0; i < searchParams.box_count; i++) {
52 | inputs.push(
53 | handleInputChange(i, e.target.value)}
59 | className="w-full p-3 my-2 rounded-md border border-gray-600 bg-gray-700 text-white placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-cyan-400 transition duration-300"
60 | />
61 | );
62 | }
63 | return inputs;
64 | };
65 |
66 | const handleDownload = () => {
67 | if (generatedMemeImage) {
68 | saveAs(generatedMemeImage, 'meme.png');
69 | }
70 | };
71 |
72 | return (
73 |
74 |
75 | Create Your Meme
76 |
77 |
78 | {/* Meme Template Card */}
79 |
80 |
81 |
82 | {gettingNumberOfInput()}
83 |
88 | {loading ? 'Generating...' : 'Generate Meme'}
89 |
90 |
91 |
92 |
93 | {/* Generated Meme Card */}
94 | {generatedMemeImage && (
95 |
96 |
97 |
101 | Download Meme
102 |
103 |
104 | )}
105 |
106 |
107 | );
108 | };
109 |
110 | export default CreateMeme;
111 |
--------------------------------------------------------------------------------
/02-E-Commerce/src/components/ContactUs.tsx:
--------------------------------------------------------------------------------
1 | const ContactUs = () => {
2 | return (
3 |
4 |
5 |
Contact Us
6 |
7 | Feel free to reach out to us by using the form below or contact us directly.
8 |
9 |
10 |
11 | {/* Contact Details */}
12 |
13 |
Contact Information
14 |
15 | Feel free to contact us using the following details:
16 |
17 |
37 |
38 |
39 | {/* Contact Form */}
40 |
41 |
Send Us a Message
42 |
43 |
44 |
45 | Your Name
46 |
47 |
54 |
55 |
56 |
57 |
58 | Your Email
59 |
60 |
67 |
68 |
69 |
70 |
71 | Your Message
72 |
73 |
80 |
81 |
82 |
83 |
87 | Send Message
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 | );
96 | };
97 |
98 | export default ContactUs;
99 |
--------------------------------------------------------------------------------
/02-E-Commerce/src/components/Footer.tsx:
--------------------------------------------------------------------------------
1 | import Link from 'next/link';
2 |
3 | const Footer = () => {
4 | return (
5 |
78 | );
79 | };
80 |
81 | export default Footer;
82 |
--------------------------------------------------------------------------------
/06-dynamic-blog/src/blogs/blogs.ts:
--------------------------------------------------------------------------------
1 | export interface Blogs {
2 | id: number;
3 | title: string;
4 | author: string;
5 | date: string;
6 | content: string;
7 | }
8 |
9 | export const blogs: Blogs[] = [
10 | {
11 | id: 1,
12 | title: "Mastering React Hooks",
13 | author: "Alice Walker",
14 | date: "2024-10-10",
15 | content: "React Hooks have revolutionized the way we write functional components...",
16 | },
17 | {
18 | id: 2,
19 | title: "Exploring CSS Grid Layout",
20 | author: "John Doe",
21 | date: "2024-09-15",
22 | content: "CSS Grid is a two-dimensional layout system that makes building layouts easy...",
23 | },
24 | {
25 | id: 3,
26 | title: "Building RESTful APIs with Node.js",
27 | author: "Emily Davis",
28 | date: "2024-08-22",
29 | content: "Node.js allows developers to build fast and scalable server-side applications...",
30 | },
31 | {
32 | id: 4,
33 | title: "Understanding JavaScript Closures",
34 | author: "Michael Brown",
35 | date: "2024-07-30",
36 | content: "Closures are a fundamental concept in JavaScript that allows functions to access outer scopes...",
37 | },
38 | {
39 | id: 5,
40 | title: "Introduction to TypeScript",
41 | author: "Sara Lee",
42 | date: "2024-06-18",
43 | content: "TypeScript is a superset of JavaScript that adds static types, making code more reliable...",
44 | },
45 | {
46 | id: 6,
47 | title: "Getting Started with Firebase Authentication",
48 | author: "David Wilson",
49 | date: "2024-05-25",
50 | content: "Firebase Authentication simplifies the process of managing user accounts in web apps...",
51 | },
52 | {
53 | id: 7,
54 | title: "A Guide to Responsive Web Design",
55 | author: "Linda Thompson",
56 | date: "2024-04-10",
57 | content: "Responsive web design ensures that websites look great on all devices...",
58 | },
59 | {
60 | id: 8,
61 | title: "Understanding Asynchronous JavaScript",
62 | author: "Chris Evans",
63 | date: "2024-03-12",
64 | content: "Asynchronous programming in JavaScript allows tasks to run without blocking the main thread...",
65 | },
66 | {
67 | id: 9,
68 | title: "The Basics of GraphQL",
69 | author: "Amy Turner",
70 | date: "2024-02-08",
71 | content: "GraphQL is a query language that provides a more efficient way to fetch data from APIs...",
72 | },
73 | {
74 | id: 10,
75 | title: "How to Use Git and GitHub",
76 | author: "James Scott",
77 | date: "2024-01-25",
78 | content: "Git and GitHub are essential tools for version control and collaboration in software development...",
79 | },
80 | {
81 | id: 11,
82 | title: "Building Progressive Web Apps",
83 | author: "Evelyn White",
84 | date: "2023-12-15",
85 | content: "Progressive Web Apps (PWAs) combine the best of web and mobile apps...",
86 | },
87 | {
88 | id: 12,
89 | title: "Introduction to Machine Learning with Python",
90 | author: "Robert Hall",
91 | date: "2023-11-30",
92 | content: "Machine Learning is a subset of AI that allows systems to learn and improve from data...",
93 | },
94 | {
95 | id: 13,
96 | title: "The Power of Flexbox in CSS",
97 | author: "Sophia Martin",
98 | date: "2023-10-20",
99 | content: "Flexbox is a CSS module that provides a more efficient way to layout, align, and distribute space...",
100 | },
101 | {
102 | id: 14,
103 | title: "Creating Dynamic Forms with React",
104 | author: "Oliver Clark",
105 | date: "2023-09-10",
106 | content: "Dynamic forms in React allow developers to build flexible and user-friendly interfaces...",
107 | },
108 | {
109 | id: 15,
110 | title: "Next.js: Server-Side Rendering Made Simple",
111 | author: "Emma Lewis",
112 | date: "2023-08-05",
113 | content: "Next.js simplifies server-side rendering, making React applications faster and SEO-friendly...",
114 | },
115 | {
116 | id: 16,
117 | title: "Debugging JavaScript Code Like a Pro",
118 | author: "Daniel King",
119 | date: "2023-07-22",
120 | content: "Effective debugging skills are crucial for solving issues and improving code quality...",
121 | },
122 | {
123 | id: 17,
124 | title: "Introduction to Docker and Containerization",
125 | author: "Megan Wright",
126 | date: "2023-06-19",
127 | content: "Docker simplifies the process of creating, deploying, and managing containerized applications...",
128 | },
129 | {
130 | id: 18,
131 | title: "Exploring WebSockets for Real-Time Communication",
132 | author: "Ethan Green",
133 | date: "2023-05-14",
134 | content: "WebSockets provide a full-duplex communication channel over a single, long-lived connection...",
135 | },
136 | {
137 | id: 19,
138 | title: "Best Practices for Writing Clean Code",
139 | author: "Liam Young",
140 | date: "2023-04-02",
141 | content: "Writing clean code is essential for maintaining and scaling software projects...",
142 | },
143 | {
144 | id: 20,
145 | title: "CSS Animations: Adding Life to Web Interfaces",
146 | author: "Grace Perez",
147 | date: "2023-03-25",
148 | content: "CSS animations can greatly enhance the user experience by adding smooth transitions...",
149 | }
150 | ];
--------------------------------------------------------------------------------
/00-My-Portfolio/src/components/Navbar.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 |
3 | import { useState } from 'react';
4 | import Link from 'next/link';
5 |
6 | const Navbar = () => {
7 | const [isOpen, setIsOpen] = useState(false);
8 |
9 | const toggleMenu = () => {
10 | setIsOpen(!isOpen);
11 | };
12 |
13 | const closeMenu = () => {
14 | setIsOpen(false);
15 | };
16 |
17 | return (
18 |
19 |
20 |
21 |
22 | {/* Logo */}
23 |
24 |
25 | UF-Coder
26 |
27 |
28 |
29 | {/* Desktop Menu */}
30 |
31 |
32 | Home
33 |
34 |
35 | About
36 |
37 |
38 | Project
39 |
40 |
41 | Contact
42 |
43 |
44 |
45 | {/* Mobile Menu Button */}
46 |
47 |
54 | Open main menu
55 | {isOpen ? (
56 |
64 |
70 |
71 | ) : (
72 |
80 |
86 |
87 | )}
88 |
89 |
90 |
91 |
92 |
93 | {/* Mobile Menu */}
94 |
110 |
111 | );
112 | };
113 |
114 | export default Navbar;
115 |
--------------------------------------------------------------------------------
/04-Weather-Widget/src/components/weather-widget.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 | import {
3 | Card,
4 | CardHeader,
5 | CardTitle,
6 | CardDescription,
7 | CardContent,
8 | } from "@/components/ui/card";
9 | import { Input } from "@/components/ui/input";
10 | import { Button } from "@/components/ui/button";
11 | import { CloudIcon, MapPinIcon, ThermometerIcon } from "lucide-react";
12 | import React, { ChangeEvent, FormEvent, useState } from "react";
13 | import LoadingSpinner from "./loadingSpinner";
14 |
15 | interface WeatherData {
16 | temperature: number;
17 | description: string;
18 | location: string;
19 | unit: string;
20 | }
21 |
22 | export default function WeatherWidget() {
23 | const [location, setLocation] = useState("");
24 | const [weather, setWeather] = useState(null);
25 | const [error, setError] = useState(null);
26 | const [isLoading, setIsLoading] = useState(false);
27 |
28 | const handleSearch = async (event: FormEvent) => {
29 | event.preventDefault();
30 | const trimmedLocation = location.trim();
31 | if (trimmedLocation === "") {
32 | setError("Please Enter a Valid Location");
33 | setWeather(null);
34 | return;
35 | }
36 | setIsLoading(true);
37 | setError(null);
38 | try {
39 | const response = await fetch(
40 | `https://api.weatherapi.com/v1/current.json?key=${process.env.NEXT_PUBLIC_WEATHER_API_KEY}&q=${trimmedLocation}`
41 | );
42 | if (!response.ok) {
43 | throw new Error("City Not Found");
44 | }
45 | const data = await response.json();
46 | const weatherData: WeatherData = {
47 | temperature: data.current.temp_c,
48 | description: data.current.condition.text,
49 | location: data.location.name,
50 | unit: "C",
51 | };
52 | setWeather(weatherData);
53 | } catch (error) {
54 | if (error instanceof TypeError) {
55 | setError("Network error. Please try again later.");
56 | } else {
57 | setError("City not found. Please try again.");
58 | }
59 | setWeather(null);
60 | } finally {
61 | setIsLoading(false);
62 | }
63 | };
64 |
65 | const getTemperatureMessage = (temperature: number, unit: string): string => {
66 | if (unit === "C") {
67 | if (temperature < 0) {
68 | return `It's freezing at ${temperature}°C! Bundle up!`;
69 | } else if (temperature < 10) {
70 | return `It's quite cold at ${temperature}°C. Wear warm clothes.`;
71 | } else if (temperature < 20) {
72 | return `The temperature is ${temperature}°C. Comfortable for a light jacket.`;
73 | } else if (temperature < 30) {
74 | return `It's a pleasant ${temperature}°C. Enjoy the nice weather!`;
75 | } else {
76 | return `It's hot at ${temperature}°C. Stay hydrated!`;
77 | }
78 | } else {
79 | return `${temperature}°${unit}`;
80 | }
81 | };
82 |
83 | function getWeatherMessage(description: string): string {
84 | switch (description.toLowerCase()) {
85 | case "sunny":
86 | return "It's a beautiful sunny day!";
87 | case "partly cloudy":
88 | return "Expect some clouds and sunshine.";
89 | case "cloudy":
90 | return "It's cloudy today.";
91 | case "overcast":
92 | return "The sky is overcast.";
93 | case "rain":
94 | return "Don't forget your umbrella! It's raining.";
95 | case "thunderstorm":
96 | return "Thunderstorms are expected today.";
97 | case "snow":
98 | return "Bundle up! It's snowing.";
99 | case "mist":
100 | return "It's misty outside.";
101 | case "fog":
102 | return "Be careful, there's fog outside.";
103 | default:
104 | return description; // Default to returning the description as-is
105 | }
106 | }
107 |
108 | function getLocationMessage(location: string): string {
109 | const currentHour = new Date().getHours();
110 | const isNight = currentHour >= 18 || currentHour < 6;
111 | return ` ${location} ${isNight ? "at Night" : "During the Day"}`;
112 | }
113 |
114 | return (
115 |
116 | {/* Center the card within the screen */}
117 |
118 | {/* Card header with title and description */}
119 |
120 | Weather Widget
121 |
122 | Search for the current weather conditions in your city.
123 |
124 |
125 | {/* Card content including the search form and weather display */}
126 |
127 | {/* Form to input and submit the location */}
128 |
129 | ) =>
136 | setLocation(e.target.value.trim())
137 | }
138 | />
139 |
144 | {isLoading ? : "Search"}
145 |
146 |
147 | {/* Display error message if any */}
148 | {error && {error}
}
149 | {/* Display weather data if available */}
150 | {weather && (
151 |
152 | {/* Display temperature message with icon */}
153 |
154 |
155 | {getTemperatureMessage(weather.temperature, weather.unit)}
156 |
157 | {/* Display weather description message with icon */}
158 |
159 |
160 |
{getWeatherMessage(weather.description)}
161 |
162 | {/* Display location message with icon */}
163 |
164 |
165 |
{getLocationMessage(weather.location)}
166 |
167 |
168 | )}
169 |
170 |
171 |
172 | );
173 | }
174 |
--------------------------------------------------------------------------------
/05-Governor-Site/src/components/ui/carousel.tsx:
--------------------------------------------------------------------------------
1 | "use client"
2 |
3 | import * as React from "react"
4 | import { ArrowLeftIcon, ArrowRightIcon } from "@radix-ui/react-icons"
5 | import useEmblaCarousel, {
6 | type UseEmblaCarouselType,
7 | } from "embla-carousel-react"
8 |
9 | import { cn } from "@/lib/utils"
10 | import { Button } from "@/components/ui/button"
11 |
12 | type CarouselApi = UseEmblaCarouselType[1]
13 | type UseCarouselParameters = Parameters
14 | type CarouselOptions = UseCarouselParameters[0]
15 | type CarouselPlugin = UseCarouselParameters[1]
16 |
17 | type CarouselProps = {
18 | opts?: CarouselOptions
19 | plugins?: CarouselPlugin
20 | orientation?: "horizontal" | "vertical"
21 | setApi?: (api: CarouselApi) => void
22 | }
23 |
24 | type CarouselContextProps = {
25 | carouselRef: ReturnType[0]
26 | api: ReturnType[1]
27 | scrollPrev: () => void
28 | scrollNext: () => void
29 | canScrollPrev: boolean
30 | canScrollNext: boolean
31 | } & CarouselProps
32 |
33 | const CarouselContext = React.createContext(null)
34 |
35 | function useCarousel() {
36 | const context = React.useContext(CarouselContext)
37 |
38 | if (!context) {
39 | throw new Error("useCarousel must be used within a ")
40 | }
41 |
42 | return context
43 | }
44 |
45 | const Carousel = React.forwardRef<
46 | HTMLDivElement,
47 | React.HTMLAttributes & CarouselProps
48 | >(
49 | (
50 | {
51 | orientation = "horizontal",
52 | opts,
53 | setApi,
54 | plugins,
55 | className,
56 | children,
57 | ...props
58 | },
59 | ref
60 | ) => {
61 | const [carouselRef, api] = useEmblaCarousel(
62 | {
63 | ...opts,
64 | axis: orientation === "horizontal" ? "x" : "y",
65 | },
66 | plugins
67 | )
68 | const [canScrollPrev, setCanScrollPrev] = React.useState(false)
69 | const [canScrollNext, setCanScrollNext] = React.useState(false)
70 |
71 | const onSelect = React.useCallback((api: CarouselApi) => {
72 | if (!api) {
73 | return
74 | }
75 |
76 | setCanScrollPrev(api.canScrollPrev())
77 | setCanScrollNext(api.canScrollNext())
78 | }, [])
79 |
80 | const scrollPrev = React.useCallback(() => {
81 | api?.scrollPrev()
82 | }, [api])
83 |
84 | const scrollNext = React.useCallback(() => {
85 | api?.scrollNext()
86 | }, [api])
87 |
88 | const handleKeyDown = React.useCallback(
89 | (event: React.KeyboardEvent) => {
90 | if (event.key === "ArrowLeft") {
91 | event.preventDefault()
92 | scrollPrev()
93 | } else if (event.key === "ArrowRight") {
94 | event.preventDefault()
95 | scrollNext()
96 | }
97 | },
98 | [scrollPrev, scrollNext]
99 | )
100 |
101 | React.useEffect(() => {
102 | if (!api || !setApi) {
103 | return
104 | }
105 |
106 | setApi(api)
107 | }, [api, setApi])
108 |
109 | React.useEffect(() => {
110 | if (!api) {
111 | return
112 | }
113 |
114 | onSelect(api)
115 | api.on("reInit", onSelect)
116 | api.on("select", onSelect)
117 |
118 | return () => {
119 | api?.off("select", onSelect)
120 | }
121 | }, [api, onSelect])
122 |
123 | return (
124 |
137 |
145 | {children}
146 |
147 |
148 | )
149 | }
150 | )
151 | Carousel.displayName = "Carousel"
152 |
153 | const CarouselContent = React.forwardRef<
154 | HTMLDivElement,
155 | React.HTMLAttributes
156 | >(({ className, ...props }, ref) => {
157 | const { carouselRef, orientation } = useCarousel()
158 |
159 | return (
160 |
171 | )
172 | })
173 | CarouselContent.displayName = "CarouselContent"
174 |
175 | const CarouselItem = React.forwardRef<
176 | HTMLDivElement,
177 | React.HTMLAttributes
178 | >(({ className, ...props }, ref) => {
179 | const { orientation } = useCarousel()
180 |
181 | return (
182 |
193 | )
194 | })
195 | CarouselItem.displayName = "CarouselItem"
196 |
197 | const CarouselPrevious = React.forwardRef<
198 | HTMLButtonElement,
199 | React.ComponentProps
200 | >(({ className, variant = "outline", size = "icon", ...props }, ref) => {
201 | const { orientation, scrollPrev, canScrollPrev } = useCarousel()
202 |
203 | return (
204 |
219 |
220 | Previous slide
221 |
222 | )
223 | })
224 | CarouselPrevious.displayName = "CarouselPrevious"
225 |
226 | const CarouselNext = React.forwardRef<
227 | HTMLButtonElement,
228 | React.ComponentProps
229 | >(({ className, variant = "outline", size = "icon", ...props }, ref) => {
230 | const { orientation, scrollNext, canScrollNext } = useCarousel()
231 |
232 | return (
233 |
248 |
249 | Next slide
250 |
251 | )
252 | })
253 | CarouselNext.displayName = "CarouselNext"
254 |
255 | export {
256 | type CarouselApi,
257 | Carousel,
258 | CarouselContent,
259 | CarouselItem,
260 | CarouselPrevious,
261 | CarouselNext,
262 | }
263 |
--------------------------------------------------------------------------------
/02-E-Commerce/src/app/cart/page.tsx:
--------------------------------------------------------------------------------
1 | "use client"
2 | import { useEffect, useState } from 'react';
3 | import Modal from '@/components/Modal';
4 | import { useRouter } from 'next/navigation';
5 | import SuccessModal from '@/components/SuccessModal';
6 | import Image from 'next/image';
7 | import Link from 'next/link';
8 |
9 | interface Product {
10 | id: number;
11 | title: string;
12 | price: number;
13 | image: string;
14 | quantity: number;
15 | }
16 |
17 | const Cart = () => {
18 | const [cart, setCart] = useState([]);
19 | const [isModalOpen, setIsModalOpen] = useState(false);
20 | const [isModalOpen2, setIsModalOpen2] = useState(false);
21 | const [successMessage, setSuccessMessage] = useState("");
22 | const [form, setForm] = useState({
23 | name: '',
24 | email: '',
25 | address: '',
26 | });
27 | const router = useRouter();
28 |
29 | useEffect(() => {
30 | const storedCart = JSON.parse(localStorage.getItem('cart') || '[]');
31 | setCart(storedCart);
32 | }, []);
33 |
34 | const handleRemoveFromCart = (id: number) => {
35 | const updatedCart = cart.filter((item) => item.id !== id);
36 | setCart(updatedCart);
37 | localStorage.setItem('cart', JSON.stringify(updatedCart)); // Update localStorage
38 | };
39 |
40 | const handleQuantityChange = (id: number, delta: number) => {
41 | const updatedCart = cart.map((item) => {
42 | if (item.id === id) {
43 | const newQuantity = item.quantity + delta;
44 | if (newQuantity > 0) {
45 | return { ...item, quantity: newQuantity };
46 | }
47 | }
48 | return item;
49 | });
50 |
51 | setCart(updatedCart);
52 | localStorage.setItem('cart', JSON.stringify(updatedCart)); // Update localStorage
53 | };
54 |
55 | const handleInputChange = (e: React.ChangeEvent) => {
56 | const { name, value } = e.target;
57 | setForm({ ...form, [name]: value });
58 | };
59 |
60 | const handleSubmit = (e: React.FormEvent) => {
61 | e.preventDefault();
62 | setIsModalOpen(false);
63 | setIsModalOpen2(true);
64 | setSuccessMessage("Your Order Have Been Placed Successfully");
65 | localStorage.removeItem('cart');
66 | };
67 |
68 | return (
69 |
70 |
71 |
Your Shopping Cart
72 | {cart.length === 0 ? (<>
73 |
Your cart is empty add something.
74 |
75 |
79 | View Products
80 |
81 |
82 | >
83 | ) : (
84 |
85 | {cart.map((product) => (
86 |
87 |
94 |
95 |
{product.title}
96 |
Price: ${product.price.toFixed(2)}
97 |
98 | handleQuantityChange(product.id, -1)}
100 | className="bg-red-500 text-white w-8 h-8 flex items-center justify-center rounded-lg hover:bg-red-600"
101 | >
102 | -
103 |
104 | {product.quantity}
105 | handleQuantityChange(product.id, 1)}
107 | className="bg-green-500 text-white w-8 h-8 flex items-center justify-center rounded-lg hover:bg-green-600"
108 | >
109 | +
110 |
111 |
112 |
113 |
114 |
115 | ${(product.price * product.quantity).toFixed(2)}
116 |
117 |
handleRemoveFromCart(product.id)}
119 | className="text-red-500 mt-2 hover:text-red-600 hover:underline"
120 | >
121 | Remove
122 |
123 |
124 |
125 | ))}
126 |
127 | setIsModalOpen(true)}
129 | className="bg-yellow-500 text-white py-3 px-8 rounded-lg text-lg font-medium hover:bg-yellow-600"
130 | >
131 | Checkout
132 |
133 |
134 |
135 | )}
136 |
137 |
138 |
setIsModalOpen(false)}
141 | onSubmit={handleSubmit}
142 | cart={cart}
143 | form={form}
144 | handleInputChange={handleInputChange}
145 | />
146 |
147 | router.push('/')}
150 | vCart={false}
151 | message={successMessage}
152 | />
153 |
154 | );
155 | };
156 |
157 | export default Cart;
158 |
--------------------------------------------------------------------------------
/01-Countdown-Timer/components/Countdown.tsx:
--------------------------------------------------------------------------------
1 | "use client"; // Enables client-side rendering for this component
2 |
3 | import { useState, useRef, useEffect, ChangeEvent } from 'react'; // Importing necessary hooks from React
4 | import { Button } from '@/components/ui/button'; // Importing custom Button component
5 | import { Input } from '@/components/ui/input'; // Importing custom Input component
6 |
7 | function Countdown() {
8 | // State to store the duration input by the user (in seconds)
9 | const [duration, setDuration] = useState("");
10 |
11 | // State to keep track of the time left in the countdown
12 | const [timeLeft, setTimeLeft] = useState(0);
13 |
14 | // State to check if the countdown timer is running
15 | const [isActive, setIsActive] = useState(false);
16 |
17 | // State to check if the countdown timer is paused
18 | const [isPaused, setIsPaused] = useState(false);
19 |
20 | // Reference to store the interval ID so we can clear it later
21 | const timerRef = useRef(null);
22 |
23 | // Function to set the countdown duration based on user input
24 | const handleSetDuration = (): void => {
25 | // Only proceed if duration is a valid number and greater than 0
26 | if (typeof duration === "number" && duration > 0) {
27 | setTimeLeft(duration); // Set the countdown time
28 | setIsActive(false); // Make sure the timer is not running
29 | setIsPaused(false); // Make sure the timer is not paused
30 | setDuration(""); // Clear the input field for better UX
31 |
32 | // Clear any existing timer to avoid multiple intervals running at once
33 | if (timerRef.current) {
34 | clearInterval(timerRef.current);
35 | timerRef.current = null;
36 | }
37 | }
38 | };
39 |
40 | // Function to start the countdown timer
41 | const handleStart = (): void => {
42 | // Start the countdown only if there's time left
43 | if (timeLeft > 0) {
44 | setIsActive(true); // Activate the timer
45 | setIsPaused(false); // Ensure the timer is not paused
46 | }
47 | };
48 |
49 | // Function to pause the countdown timer
50 | const handlePause = (): void => {
51 | // Only pause if the timer is currently active
52 | if (isActive) {
53 | setIsPaused(true); // Set the timer to paused
54 | setIsActive(false); // Deactivate the timer
55 |
56 | // Clear the interval to stop the countdown
57 | if (timerRef.current) {
58 | clearInterval(timerRef.current);
59 | timerRef.current = null;
60 | }
61 | }
62 | };
63 |
64 | // Function to reset the countdown timer
65 | const handleReset = (): void => {
66 | setIsActive(false); // Deactivate the timer
67 | setIsPaused(false); // Make sure the timer is not paused
68 | setTimeLeft(typeof duration === "number" ? duration : 0); // Reset the time to the original duration
69 |
70 | // Clear any running interval
71 | if (timerRef.current) {
72 | clearInterval(timerRef.current);
73 | timerRef.current = null;
74 | }
75 | };
76 |
77 | // Effect to handle the countdown logic when the timer is active
78 | useEffect(() => {
79 | // If the timer is active and not paused, start the countdown
80 | if (isActive && !isPaused) {
81 | timerRef.current = setInterval(() => {
82 | setTimeLeft((prevTime) => {
83 | if (prevTime <= 1) {
84 | clearInterval(timerRef.current!); // Stop the countdown at 0
85 | timerRef.current = null;
86 | }
87 | return prevTime - 1; // Decrease time by 1 second
88 | });
89 | }, 1000); // Update every second
90 | }
91 |
92 | // Cleanup function to clear the interval when the component unmounts or the timer stops
93 | return () => {
94 | if (timerRef.current) {
95 | clearInterval(timerRef.current);
96 | timerRef.current = null;
97 | }
98 | };
99 | }, [isActive, isPaused]); // Dependencies array ensures the effect runs when these states change
100 |
101 | // Helper function to format the remaining time into a mm:ss format
102 | const formatTime = (time: number): string => {
103 | const minutes = Math.floor(time / 60); // Calculate minutes
104 | const seconds = time % 60; // Calculate remaining seconds
105 | return `${String(minutes).padStart(2, "0")}:${String(seconds).padStart(2, "0")}`; // Format with leading zeros
106 | };
107 |
108 | // Handler for changes in the duration input field
109 | const handleDurationChange = (event: ChangeEvent) => {
110 | const value = Number(event.target.value); // Convert input to number
111 | if (!isNaN(value)) {
112 | setDuration(value); // Set the duration if valid
113 | } else {
114 | setDuration(""); // Clear the input if invalid
115 | }
116 | };
117 |
118 | return (
119 |
120 | {/* Container for the countdown timer UI */}
121 |
122 | {/* Timer Title */}
123 |
124 | Countdown Timer
125 |
126 |
127 | {/* Input field for duration and Set button */}
128 |
129 |
137 | e.currentTarget.style.transform = 'scale(1.05)'}
143 | onMouseLeave={(e) => e.currentTarget.style.transform = 'scale(1)'}
144 | >
145 | Set
146 |
147 |
148 |
149 | {/* Display the remaining time */}
150 |
151 | {formatTime(timeLeft)}
152 |
153 |
154 | {/* Buttons to control the countdown */}
155 |
156 | e.currentTarget.style.transform = 'scale(1.05)'}
162 | onMouseLeave={(e) => e.currentTarget.style.transform = 'scale(1)'}
163 | >
164 | {isPaused ? "Resume" : "Start"}
165 |
166 | e.currentTarget.style.transform = 'scale(1.05)'}
172 | onMouseLeave={(e) => e.currentTarget.style.transform = 'scale(1)'}
173 | >
174 | Pause
175 |
176 | e.currentTarget.style.transform = 'scale(1.05)'}
182 | onMouseLeave={(e) => e.currentTarget.style.transform = 'scale(1)'}
183 | >
184 | Reset
185 |
186 |
187 |
188 |
189 | );
190 | }
191 |
192 | export default Countdown;
193 |
--------------------------------------------------------------------------------