├── .DS_Store ├── .gitignore ├── 3d-website ├── index.html └── style.css ├── color-wheel └── color-wheel.html ├── custom-cursor └── index.html ├── demo-i18n ├── .eslintrc.cjs ├── .gitignore ├── README.md ├── index.html ├── package-lock.json ├── package.json ├── public │ └── vite.svg ├── src │ ├── App.css │ ├── App.jsx │ ├── assets │ │ └── react.svg │ ├── i18n.js │ ├── index.css │ ├── locales │ │ ├── en.json │ │ └── fr.json │ └── main.jsx └── vite.config.js ├── dev-portfolio ├── .eslintrc.json ├── .gitignore ├── LICENSE ├── README.md ├── components.json ├── content │ └── hello-world.mdx ├── next.config.mjs ├── package-lock.json ├── package.json ├── pnpm-lock.yaml ├── postcss.config.mjs ├── public │ ├── arrow.png │ ├── atomic.png │ ├── bg-gradient.svg │ ├── buildspace.jpg │ ├── ib.png │ ├── laurier.png │ ├── lime.svg │ ├── me.png │ ├── mitremedia.png │ ├── nvidia.png │ ├── shopify.svg │ ├── splunk.svg │ ├── waterloo.png │ ├── work1.svg │ ├── work2.svg │ ├── work3.svg │ ├── work4.svg │ └── you.png ├── src │ ├── app │ │ ├── blog │ │ │ ├── [slug] │ │ │ │ └── page.tsx │ │ │ └── page.tsx │ │ ├── favicon.ico │ │ ├── globals.css │ │ ├── layout.tsx │ │ └── page.tsx │ ├── components │ │ ├── hackathon-card.tsx │ │ ├── icons.tsx │ │ ├── layout │ │ │ └── PageWrapper.tsx │ │ ├── magicui │ │ │ ├── blur-fade-text.tsx │ │ │ ├── blur-fade.tsx │ │ │ └── dock.tsx │ │ ├── mdx.tsx │ │ ├── mode-toggle.tsx │ │ ├── navbar.tsx │ │ ├── project-card.tsx │ │ ├── resume-card.tsx │ │ ├── sections │ │ │ ├── AboutSection.tsx │ │ │ ├── ContactSection.tsx │ │ │ ├── EducationSection.tsx │ │ │ ├── HeroSection.tsx │ │ │ ├── ProjectsSection.tsx │ │ │ ├── SkillsSection.tsx │ │ │ └── WorkExperienceSection.tsx │ │ ├── theme-provider.tsx │ │ └── ui │ │ │ ├── animated-beam.tsx │ │ │ ├── avatar.tsx │ │ │ ├── badge.tsx │ │ │ ├── border-beam.tsx │ │ │ ├── button.tsx │ │ │ ├── card.tsx │ │ │ ├── dot-pattern.tsx │ │ │ ├── flickering-grid.tsx │ │ │ ├── interactive-hover-button.tsx │ │ │ ├── magic-card.tsx │ │ │ ├── marquee.tsx │ │ │ ├── morphing-text.tsx │ │ │ ├── ripple-button.tsx │ │ │ ├── ripple.tsx │ │ │ ├── separator.tsx │ │ │ ├── shine-border.tsx │ │ │ └── tooltip.tsx │ ├── data │ │ ├── blog.ts │ │ └── resume.tsx │ └── lib │ │ └── utils.ts ├── tailwind.config.ts └── tsconfig.json ├── ecom-react-appwrite ├── .eslintrc.cjs ├── .gitignore ├── README.md ├── index.html ├── package-lock.json ├── package.json ├── postcss.config.js ├── public │ └── vite.svg ├── src │ ├── App.css │ ├── App.jsx │ ├── appwrite │ │ └── appwriteConfig.js │ ├── assets │ │ ├── home │ │ │ ├── checkout.png │ │ │ ├── confirmation.png │ │ │ ├── delivered.png │ │ │ ├── delivery.png │ │ │ ├── footer.svg │ │ │ ├── hero-video.mp4 │ │ │ ├── hero.png │ │ │ ├── kisspng-react-business-javascript-computer-software-npm-react-5b2dd02b688437.5188897215297290674281.png │ │ │ ├── logo.svg │ │ │ ├── nav-cart.png │ │ │ ├── nocart.png │ │ │ ├── small.png │ │ │ ├── underline.png │ │ │ └── up-arrow.png │ │ ├── order │ │ │ ├── close.png │ │ │ └── more.png │ │ └── react.svg │ ├── components │ │ ├── filter │ │ │ ├── Filter.jsx │ │ │ └── Filter.scss │ │ ├── footer │ │ │ ├── Footer.jsx │ │ │ └── Footer.scss │ │ ├── heroSection │ │ │ ├── AboutSection.jsx │ │ │ └── HeroSection.jsx │ │ ├── layout │ │ │ └── Layout.jsx │ │ ├── loader │ │ │ └── Loader.jsx │ │ ├── modal │ │ │ └── Modal.jsx │ │ ├── navbar │ │ │ ├── Navbar.jsx │ │ │ └── Navbar.scss │ │ ├── productCard │ │ │ ├── ProductCard.jsx │ │ │ └── ProductCard.scss │ │ └── track │ │ │ ├── Track.jsx │ │ │ └── Track.scss │ ├── context │ │ └── data │ │ │ ├── myContext.jsx │ │ │ └── myState.jsx │ ├── index.css │ ├── main.jsx │ ├── pages │ │ ├── admin │ │ │ ├── Admin.scss │ │ │ ├── dashboard │ │ │ │ ├── Dashboard.jsx │ │ │ │ └── DashboardTab.jsx │ │ │ └── page │ │ │ │ ├── AddProduct.jsx │ │ │ │ ├── UpdateOrderStatus.jsx │ │ │ │ └── UpdateProduct.jsx │ │ ├── allproducts │ │ │ └── Allproducts.jsx │ │ ├── cart │ │ │ ├── Cart.jsx │ │ │ └── Cart.scss │ │ ├── home │ │ │ └── Home.jsx │ │ ├── nopage │ │ │ └── NoPage.jsx │ │ ├── order │ │ │ └── Order.jsx │ │ ├── other │ │ │ ├── AboutUs.jsx │ │ │ ├── ContactUs.jsx │ │ │ ├── Other.scss │ │ │ ├── PrivacyPolicy.jsx │ │ │ ├── ReturnPolicy.jsx │ │ │ └── TermsCondition.jsx │ │ ├── productInfo │ │ │ ├── ProductInfo.jsx │ │ │ └── ProductInfo.scss │ │ └── registration │ │ │ ├── Login.jsx │ │ │ ├── Register.scss │ │ │ └── Signup.jsx │ └── redux │ │ ├── cartSlice.jsx │ │ └── store.jsx ├── tailwind.config.js ├── vercel.json └── vite.config.js ├── flaslight-effect ├── hero.png ├── index.html ├── main.js └── style.css ├── jokes-extension ├── app.js ├── jokes.json ├── logo.png ├── manifest.json ├── popup.html └── style.css ├── make-pc-speak ├── Readme.md ├── app.js ├── assets │ ├── pause-button.png │ ├── play-button.png │ └── stop-button.png └── index.html ├── netflix-clone ├── .eslintrc.cjs ├── .gitignore ├── README.md ├── index.html ├── netflix.png ├── package-lock.json ├── package.json ├── public │ └── vite.svg ├── src │ ├── App.css │ ├── App.jsx │ ├── Navbar.css │ ├── Navbar.jsx │ ├── Poster.css │ ├── Poster.jsx │ ├── Row.css │ ├── Row.jsx │ ├── assets │ │ └── react.svg │ ├── index.css │ ├── main.jsx │ └── utils │ │ ├── axios.js │ │ └── requests.js └── vite.config.js ├── package-lock.json ├── pomodoro-webapp ├── assets │ ├── Alarm06.wav │ ├── icon-arrow-down.svg │ ├── icon-arrow-up.svg │ ├── icon-close.svg │ ├── icon-settings.svg │ └── logo.svg ├── index.html ├── main.js └── styles │ └── style.css ├── responsive-sidebar ├── index.html └── style.css ├── snap-notes ├── .eslintrc.cjs ├── .gitignore ├── README.md ├── components.json ├── index.html ├── package-lock.json ├── package.json ├── postcss.config.js ├── public │ └── vite.svg ├── src │ ├── App.css │ ├── App.jsx │ ├── appwrite │ │ └── appwriteConfig.js │ ├── assets │ │ ├── logo.svg │ │ └── react.svg │ ├── components │ │ ├── addNote │ │ │ ├── AddNote.jsx │ │ │ └── AddNote.scss │ │ ├── footer │ │ │ ├── Footer.jsx │ │ │ ├── Footer.scss │ │ │ ├── H5Share.jsx │ │ │ └── HoverSocial.jsx │ │ ├── layout │ │ │ └── Layout.jsx │ │ ├── loader │ │ │ └── Loader.jsx │ │ ├── navbar │ │ │ ├── Navbar.jsx │ │ │ └── Navbar.scss │ │ ├── notes │ │ │ ├── EditNote.jsx │ │ │ ├── NoteCard.jsx │ │ │ └── ProductCard.scss │ │ └── ui │ │ │ ├── alert-dialog.jsx │ │ │ ├── avatar.jsx │ │ │ ├── button.jsx │ │ │ ├── card.jsx │ │ │ ├── dialog.jsx │ │ │ ├── dropdown-menu.jsx │ │ │ ├── input.jsx │ │ │ ├── label.jsx │ │ │ ├── popover.jsx │ │ │ ├── skeleton.jsx │ │ │ ├── sonner.jsx │ │ │ ├── textarea.jsx │ │ │ ├── tooltip.jsx │ │ │ └── typewriter-effect.tsx │ ├── context │ │ └── data │ │ │ ├── myContext.jsx │ │ │ └── myState.jsx │ ├── index.css │ ├── lib │ │ └── utils.js │ ├── logo.svg │ ├── main.jsx │ ├── pages │ │ ├── home │ │ │ ├── Home.jsx │ │ │ └── Home.scss │ │ ├── nopage │ │ │ └── NoPage.jsx │ │ ├── registration │ │ │ ├── Login.jsx │ │ │ ├── Register.scss │ │ │ └── Signup.jsx │ │ └── trash │ │ │ └── Trash.jsx │ ├── redux │ │ ├── cartSlice.jsx │ │ └── store.jsx │ └── utils │ │ └── cn.ts ├── tailwind.config.js ├── tsconfig.json ├── vercel.json └── vite.config.js ├── text-bg-image ├── bg.gif ├── bg.jpg └── index.html ├── todo-extension ├── background.js ├── manifest.json ├── popup.css ├── popup.html └── popup.js ├── todoapp ├── README.md ├── app.js ├── index.html └── style.css ├── valentines-day ├── app.js ├── index.html ├── p3.png └── style.css ├── vue-landing-page ├── .gitignore ├── README.md ├── index.html ├── package-lock.json ├── package.json ├── public │ └── vite.svg ├── src │ ├── App.vue │ ├── assets │ │ ├── baseFooter │ │ │ ├── Link-1.png │ │ │ ├── Link-2.png │ │ │ ├── Link-3.png │ │ │ ├── Link-4.png │ │ │ ├── Link.png │ │ │ ├── nfootup.png │ │ │ └── top.png │ │ ├── fav.png │ │ ├── home │ │ │ ├── about.png │ │ │ ├── brand1.png │ │ │ ├── brand2.png │ │ │ ├── brand3.png │ │ │ ├── brand4.png │ │ │ ├── brand5.png │ │ │ ├── brand6.png │ │ │ ├── c1.png │ │ │ ├── c2.png │ │ │ ├── c3.png │ │ │ ├── car1.png │ │ │ ├── car2.png │ │ │ ├── car3.png │ │ │ ├── car4.png │ │ │ ├── car5.png │ │ │ ├── contact.png │ │ │ ├── core1.png │ │ │ ├── core2.png │ │ │ ├── core3.png │ │ │ ├── core4.png │ │ │ ├── hero-h5.png │ │ │ ├── hero.png │ │ │ ├── join.svg │ │ │ ├── play.png │ │ │ ├── point.png │ │ │ ├── top.png │ │ │ ├── topbot.png │ │ │ ├── topcard1.png │ │ │ ├── topcard2.png │ │ │ ├── topcta.png │ │ │ ├── topcta2.png │ │ │ ├── topcta3.png │ │ │ ├── toptop.png │ │ │ └── trustbg.png │ │ └── navbar │ │ │ ├── React-icon.svg.png │ │ │ ├── headlogo.png │ │ │ ├── lang-en.png │ │ │ └── lang-ru.png │ ├── components │ │ ├── BaseFooter.vue │ │ ├── NavBar.vue │ │ └── home │ │ │ ├── AboutUs.vue │ │ │ ├── CardSection.vue │ │ │ ├── CorePro.vue │ │ │ ├── DivePro.vue │ │ │ ├── HeroSection.vue │ │ │ ├── JoinUs.vue │ │ │ ├── TopTech.vue │ │ │ └── TrustCar.vue │ ├── eventBus.ts │ ├── language │ │ ├── en_US.ts │ │ ├── index.ts │ │ └── ru_RU.ts │ ├── main.ts │ ├── router.ts │ ├── store │ │ ├── commonStore.ts │ │ └── index.ts │ ├── style.css │ ├── views │ │ ├── AboutView.vue │ │ ├── AiView.vue │ │ ├── HomeView.vue │ │ └── TeamView.vue │ └── vite-env.d.ts ├── tsconfig.json ├── tsconfig.node.json └── vite.config.ts ├── xmas ├── app.js ├── index.html └── styles.css └── yt-clone ├── .gitignore ├── README.md ├── package-lock.json ├── package.json ├── public ├── index.html ├── manifest.json ├── robots.txt └── yt.png ├── src ├── App.css ├── App.js ├── App.test.js ├── assets │ ├── search.png │ ├── youtube-logo-icon.webp │ └── youtube-verified.png ├── components │ ├── Body.js │ ├── Button.js │ ├── ChatMessage.js │ ├── CommentsContainer.js │ ├── Error.js │ ├── Head.js │ ├── LiveChat.js │ ├── MainContainer.js │ ├── Sidebar.js │ ├── VideoCard.js │ ├── VideoContainer.js │ └── WatchPage.js ├── index.css ├── index.js ├── logo.svg ├── reportWebVitals.js ├── setupTests.js └── utils │ ├── appSlice.js │ ├── chatSlice.js │ ├── constants.js │ ├── helper.js │ ├── searchSlice.js │ ├── store.js │ └── useOnlineStatus.js └── tailwind.config.js /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codewithharshad/instagram/0e04d19feb08dc7cbb4302eae6e28014fc3c38e7/.DS_Store -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | -------------------------------------------------------------------------------- /3d-website/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 3D Video Hero Section 7 | 8 | 9 | 10 | 11 | 12 |
13 |
14 | 17 | 25 |
26 |
27 | 28 |
29 |
30 |

Explore the Future of 3D Experiences

31 |

Immerse yourself in cutting-edge technology and interactive 3D videos that redefine your visual experience.

32 |
33 |
34 | 35 |
36 |
37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /color-wheel/color-wheel.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 33 | 34 | 35 |
36 | 37 | -------------------------------------------------------------------------------- /custom-cursor/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Custom Cursor 7 | 40 | 41 | 42 |

Hello World

43 | 44 |
45 | 46 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /demo-i18n/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { browser: true, es2020: true }, 4 | extends: [ 5 | 'eslint:recommended', 6 | 'plugin:react/recommended', 7 | 'plugin:react/jsx-runtime', 8 | 'plugin:react-hooks/recommended', 9 | ], 10 | ignorePatterns: ['dist', '.eslintrc.cjs'], 11 | parserOptions: { ecmaVersion: 'latest', sourceType: 'module' }, 12 | settings: { react: { version: '18.2' } }, 13 | plugins: ['react-refresh'], 14 | rules: { 15 | 'react/jsx-no-target-blank': 'off', 16 | 'react-refresh/only-export-components': [ 17 | 'warn', 18 | { allowConstantExport: true }, 19 | ], 20 | }, 21 | } 22 | -------------------------------------------------------------------------------- /demo-i18n/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /demo-i18n/README.md: -------------------------------------------------------------------------------- 1 | # React + Vite 2 | 3 | This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. 4 | 5 | Currently, two official plugins are available: 6 | 7 | - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh 8 | - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh 9 | -------------------------------------------------------------------------------- /demo-i18n/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite + React 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /demo-i18n/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "demo-i18n", 3 | "private": true, 4 | "version": "0.0.0", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vite", 8 | "build": "vite build", 9 | "lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0", 10 | "preview": "vite preview" 11 | }, 12 | "dependencies": { 13 | "react": "^18.2.0", 14 | "react-dom": "^18.2.0" 15 | }, 16 | "devDependencies": { 17 | "@types/react": "^18.2.66", 18 | "@types/react-dom": "^18.2.22", 19 | "@vitejs/plugin-react": "^4.2.1", 20 | "eslint": "^8.57.0", 21 | "eslint-plugin-react": "^7.34.1", 22 | "eslint-plugin-react-hooks": "^4.6.0", 23 | "eslint-plugin-react-refresh": "^0.4.6", 24 | "vite": "^5.2.0" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /demo-i18n/public/vite.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /demo-i18n/src/App.css: -------------------------------------------------------------------------------- 1 | #root { 2 | max-width: 1280px; 3 | margin: 0 auto; 4 | padding: 2rem; 5 | text-align: center; 6 | } 7 | 8 | .logo { 9 | height: 6em; 10 | padding: 1.5em; 11 | will-change: filter; 12 | transition: filter 300ms; 13 | } 14 | .logo:hover { 15 | filter: drop-shadow(0 0 2em #646cffaa); 16 | } 17 | .logo.react:hover { 18 | filter: drop-shadow(0 0 2em #61dafbaa); 19 | } 20 | 21 | @keyframes logo-spin { 22 | from { 23 | transform: rotate(0deg); 24 | } 25 | to { 26 | transform: rotate(360deg); 27 | } 28 | } 29 | 30 | @media (prefers-reduced-motion: no-preference) { 31 | a:nth-of-type(2) .logo { 32 | animation: logo-spin infinite 20s linear; 33 | } 34 | } 35 | 36 | .card { 37 | padding: 2em; 38 | } 39 | 40 | .read-the-docs { 41 | color: #888; 42 | } 43 | -------------------------------------------------------------------------------- /demo-i18n/src/App.jsx: -------------------------------------------------------------------------------- 1 | import { useState } from 'react' 2 | import { useTranslation } from 'react-i18next'; 3 | 4 | import './App.css' 5 | 6 | function App() { 7 | const [count, setCount] = useState(0) 8 | const { t, i18n } = useTranslation(); 9 | 10 | const changeLanguage = (lng) => { 11 | i18n.changeLanguage(lng); 12 | }; 13 | 14 | return ( 15 |
16 | 17 | 18 |

{t('greeting')}{t('greeting')}

19 |

{t('intro')}

20 |
21 | ); 22 | } 23 | 24 | export default App 25 | -------------------------------------------------------------------------------- /demo-i18n/src/i18n.js: -------------------------------------------------------------------------------- 1 | // import i18n from 'i18next'; 2 | // import { initReactI18next } from 'react-i18next'; 3 | 4 | // const resources = { 5 | // en: { 6 | // translation: { 7 | // greeting: "Hello!", 8 | // intro: "Welcome to our website!" 9 | // } 10 | // }, 11 | // fr: { 12 | // translation: { 13 | // greeting: "Bonjour!", 14 | // intro: "Bienvenue sur notre site web!" 15 | // } 16 | // } 17 | // }; 18 | 19 | // i18n 20 | // .use(initReactI18next) // Passes i18n instance to react-i18next 21 | // .init({ 22 | // resources, 23 | // lng: 'en', // Set default language (can be changed later) 24 | // fallbackLng: 'en', // Fallback to English if translation is missing 25 | // // Other options (interpolation, backend, etc.) 26 | // }); 27 | 28 | // export default i18n; 29 | 30 | import i18n from 'i18next'; 31 | import { initReactI18next } from 'react-i18next'; 32 | import enTranslation from './locales/en.json'; 33 | import frTranslation from './locales/fr.json'; 34 | 35 | const resources = { 36 | en: { 37 | translation: enTranslation 38 | }, 39 | fr: { 40 | translation: frTranslation 41 | } 42 | }; 43 | 44 | i18n 45 | .use(initReactI18next) 46 | .init({ 47 | resources, 48 | lng: 'en', 49 | fallbackLng: 'en', 50 | interpolation: { 51 | escapeValue: false, // not needed for React 52 | }, 53 | }); 54 | 55 | export default i18n; 56 | -------------------------------------------------------------------------------- /demo-i18n/src/index.css: -------------------------------------------------------------------------------- 1 | :root { 2 | font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; 3 | line-height: 1.5; 4 | font-weight: 400; 5 | 6 | color-scheme: light dark; 7 | color: rgba(255, 255, 255, 0.87); 8 | background-color: #242424; 9 | 10 | font-synthesis: none; 11 | text-rendering: optimizeLegibility; 12 | -webkit-font-smoothing: antialiased; 13 | -moz-osx-font-smoothing: grayscale; 14 | } 15 | 16 | a { 17 | font-weight: 500; 18 | color: #646cff; 19 | text-decoration: inherit; 20 | } 21 | a:hover { 22 | color: #535bf2; 23 | } 24 | 25 | body { 26 | margin: 0; 27 | display: flex; 28 | place-items: center; 29 | min-width: 320px; 30 | min-height: 100vh; 31 | } 32 | 33 | h1 { 34 | font-size: 3.2em; 35 | line-height: 1.1; 36 | } 37 | 38 | button { 39 | border-radius: 8px; 40 | border: 1px solid transparent; 41 | padding: 0.6em 1.2em; 42 | font-size: 1em; 43 | font-weight: 500; 44 | font-family: inherit; 45 | background-color: #1a1a1a; 46 | cursor: pointer; 47 | transition: border-color 0.25s; 48 | } 49 | button:hover { 50 | border-color: #646cff; 51 | } 52 | button:focus, 53 | button:focus-visible { 54 | outline: 4px auto -webkit-focus-ring-color; 55 | } 56 | 57 | @media (prefers-color-scheme: light) { 58 | :root { 59 | color: #213547; 60 | background-color: #ffffff; 61 | } 62 | a:hover { 63 | color: #747bff; 64 | } 65 | button { 66 | background-color: #f9f9f9; 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /demo-i18n/src/locales/en.json: -------------------------------------------------------------------------------- 1 | { 2 | "greeting": "Hello!", 3 | "intro": "Welcome to our website!" 4 | } -------------------------------------------------------------------------------- /demo-i18n/src/locales/fr.json: -------------------------------------------------------------------------------- 1 | { 2 | "greeting": "Bonjour!", 3 | "intro": "Bienvenue sur notre site web!" 4 | } -------------------------------------------------------------------------------- /demo-i18n/src/main.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import ReactDOM from 'react-dom/client' 3 | import App from './App.jsx' 4 | import './index.css' 5 | import './i18n'; 6 | ReactDOM.createRoot(document.getElementById('root')).render( 7 | 8 | 9 | , 10 | ) 11 | -------------------------------------------------------------------------------- /demo-i18n/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | }) 8 | -------------------------------------------------------------------------------- /dev-portfolio/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /dev-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 | -------------------------------------------------------------------------------- /dev-portfolio/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 CODEWITHHARSHAD 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /dev-portfolio/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dev-portfolio/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": "neutral", 10 | "cssVariables": true, 11 | "prefix": "" 12 | }, 13 | "aliases": { 14 | "components": "@/components", 15 | "utils": "@/lib/utils" 16 | } 17 | } -------------------------------------------------------------------------------- /dev-portfolio/content/hello-world.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Hello World" 3 | publishedAt: "2024-06-18" 4 | summary: "My first post on my new blog." 5 | --- 6 | 7 | Hi there! 8 | 9 | ```jsx 10 | console.log("Hello World"); 11 | ``` 12 | -------------------------------------------------------------------------------- /dev-portfolio/next.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = { 3 | reactStrictMode: true, 4 | }; 5 | 6 | export default nextConfig; 7 | -------------------------------------------------------------------------------- /dev-portfolio/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "porfolio", 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-avatar": "^1.0.4", 13 | "@radix-ui/react-icons": "^1.3.2", 14 | "@radix-ui/react-separator": "^1.1.0", 15 | "@radix-ui/react-slot": "^1.0.2", 16 | "@radix-ui/react-tooltip": "^1.0.7", 17 | "@types/mdx": "^2.0.13", 18 | "class-variance-authority": "^0.7.0", 19 | "clsx": "^2.1.1", 20 | "framer-motion": "^11.2.10", 21 | "gray-matter": "^4.0.3", 22 | "lucide-react": "^0.395.0", 23 | "next": "^15.1.1-canary.16", 24 | "next-themes": "^0.3.0", 25 | "react": "^18", 26 | "react-dom": "^18", 27 | "react-markdown": "^9.0.1", 28 | "rehype-pretty-code": "^0.13.2", 29 | "rehype-stringify": "^10.0.0", 30 | "remark-parse": "^11.0.0", 31 | "remark-rehype": "^11.1.0", 32 | "shiki": "^1.7.0", 33 | "tailwind-merge": "^2.3.0", 34 | "tailwindcss-animate": "^1.0.7", 35 | "unified": "^11.0.4" 36 | }, 37 | "devDependencies": { 38 | "@tailwindcss/typography": "^0.5.13", 39 | "@types/node": "^20", 40 | "@types/react": "^18", 41 | "@types/react-dom": "^18", 42 | "eslint": "^8", 43 | "eslint-config-next": "14.2.4", 44 | "postcss": "^8", 45 | "tailwindcss": "^3.4.1", 46 | "typescript": "^5" 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /dev-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 | -------------------------------------------------------------------------------- /dev-portfolio/public/arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codewithharshad/instagram/0e04d19feb08dc7cbb4302eae6e28014fc3c38e7/dev-portfolio/public/arrow.png -------------------------------------------------------------------------------- /dev-portfolio/public/atomic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codewithharshad/instagram/0e04d19feb08dc7cbb4302eae6e28014fc3c38e7/dev-portfolio/public/atomic.png -------------------------------------------------------------------------------- /dev-portfolio/public/bg-gradient.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /dev-portfolio/public/buildspace.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codewithharshad/instagram/0e04d19feb08dc7cbb4302eae6e28014fc3c38e7/dev-portfolio/public/buildspace.jpg -------------------------------------------------------------------------------- /dev-portfolio/public/ib.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codewithharshad/instagram/0e04d19feb08dc7cbb4302eae6e28014fc3c38e7/dev-portfolio/public/ib.png -------------------------------------------------------------------------------- /dev-portfolio/public/laurier.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codewithharshad/instagram/0e04d19feb08dc7cbb4302eae6e28014fc3c38e7/dev-portfolio/public/laurier.png -------------------------------------------------------------------------------- /dev-portfolio/public/lime.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dev-portfolio/public/me.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codewithharshad/instagram/0e04d19feb08dc7cbb4302eae6e28014fc3c38e7/dev-portfolio/public/me.png -------------------------------------------------------------------------------- /dev-portfolio/public/mitremedia.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codewithharshad/instagram/0e04d19feb08dc7cbb4302eae6e28014fc3c38e7/dev-portfolio/public/mitremedia.png -------------------------------------------------------------------------------- /dev-portfolio/public/nvidia.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codewithharshad/instagram/0e04d19feb08dc7cbb4302eae6e28014fc3c38e7/dev-portfolio/public/nvidia.png -------------------------------------------------------------------------------- /dev-portfolio/public/shopify.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /dev-portfolio/public/waterloo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codewithharshad/instagram/0e04d19feb08dc7cbb4302eae6e28014fc3c38e7/dev-portfolio/public/waterloo.png -------------------------------------------------------------------------------- /dev-portfolio/public/you.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codewithharshad/instagram/0e04d19feb08dc7cbb4302eae6e28014fc3c38e7/dev-portfolio/public/you.png -------------------------------------------------------------------------------- /dev-portfolio/src/app/blog/page.tsx: -------------------------------------------------------------------------------- 1 | import BlurFade from "@/components/magicui/blur-fade"; 2 | import { getBlogPosts } from "@/data/blog"; 3 | import Link from "next/link"; 4 | 5 | export const metadata = { 6 | title: "Blog", 7 | description: "My thoughts on software development, life, and more.", 8 | }; 9 | 10 | const BLUR_FADE_DELAY = 0.04; 11 | 12 | export default async function BlogPage() { 13 | const posts = await getBlogPosts(); 14 | 15 | return ( 16 |
17 | 18 |

blog

19 |
20 | {posts 21 | .sort((a, b) => { 22 | if ( 23 | new Date(a.metadata.publishedAt) > new Date(b.metadata.publishedAt) 24 | ) { 25 | return -1; 26 | } 27 | return 1; 28 | }) 29 | .map((post, id) => ( 30 | 31 | 35 |
36 |

{post.metadata.title}

37 |

38 | {post.metadata.publishedAt} 39 |

40 |
41 | 42 |
43 | ))} 44 |
45 | ); 46 | } 47 | -------------------------------------------------------------------------------- /dev-portfolio/src/app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codewithharshad/instagram/0e04d19feb08dc7cbb4302eae6e28014fc3c38e7/dev-portfolio/src/app/favicon.ico -------------------------------------------------------------------------------- /dev-portfolio/src/app/globals.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | 5 | @layer base { 6 | :root { 7 | --background: #11071F; 8 | --foreground: #ffffff; 9 | --secondary-bg: #1A0B2E; 10 | 11 | 12 | --card: #FFFFFF; 13 | --card-foreground: #000000; 14 | 15 | --popover: #FFFFFF; 16 | --popover-foreground: #000000; 17 | 18 | --primary: #16213E; 19 | --primary-foreground: #FFFFFF; 20 | 21 | --secondary: #E94560; 22 | --secondary-foreground: #FFFFFF; 23 | 24 | --muted: #F5F5F5; 25 | --muted-foreground: #6B7280; 26 | 27 | --accent: #391A65; 28 | --accent-foreground: #FFFFFF; 29 | 30 | --destructive: #FF0000; 31 | --destructive-foreground: #FFFFFF; 32 | 33 | --border: #E5E7EB; 34 | --input: #D1D5DB; 35 | --ring: #000000; 36 | 37 | --radius: 0.5rem; 38 | } 39 | 40 | * { 41 | @apply border-border; 42 | } 43 | body { 44 | @apply bg-background text-foreground; 45 | } 46 | } 47 | 48 | /* Rest of your existing CSS remains the same */ 49 | h3 code { 50 | @apply !text-lg md:!text-xl; 51 | } 52 | 53 | pre { 54 | @apply !px-0 rounded-lg overflow-x-auto py-4 55 | } 56 | 57 | pre [data-line] { 58 | @apply px-4 59 | } 60 | 61 | code { 62 | @apply text-sm md:text-base !leading-loose; 63 | } 64 | 65 | -------------------------------------------------------------------------------- /dev-portfolio/src/app/layout.tsx: -------------------------------------------------------------------------------- 1 | import Navbar from "@/components/navbar"; 2 | import { ThemeProvider } from "@/components/theme-provider"; 3 | import { TooltipProvider } from "@/components/ui/tooltip"; 4 | import { DATA } from "@/data/resume"; 5 | import { cn } from "@/lib/utils"; 6 | import type { Metadata } from "next"; 7 | import { Inter as FontSans } from "next/font/google"; 8 | import "./globals.css"; 9 | 10 | const fontSans = FontSans({ 11 | subsets: ["latin"], 12 | variable: "--font-sans", 13 | }); 14 | 15 | export const metadata: Metadata = { 16 | metadataBase: new URL(DATA.url), 17 | title: { 18 | default: DATA.name, 19 | template: `%s | ${DATA.name}`, 20 | }, 21 | description: DATA.description, 22 | openGraph: { 23 | title: `${DATA.name}`, 24 | description: DATA.description, 25 | url: DATA.url, 26 | siteName: `${DATA.name}`, 27 | locale: "en_US", 28 | type: "website", 29 | }, 30 | robots: { 31 | index: true, 32 | follow: true, 33 | googleBot: { 34 | index: true, 35 | follow: true, 36 | "max-video-preview": -1, 37 | "max-image-preview": "large", 38 | "max-snippet": -1, 39 | }, 40 | }, 41 | twitter: { 42 | title: `${DATA.name}`, 43 | card: "summary_large_image", 44 | }, 45 | verification: { 46 | google: "", 47 | yandex: "", 48 | }, 49 | }; 50 | 51 | export default function RootLayout({ 52 | children, 53 | }: Readonly<{ 54 | children: React.ReactNode; 55 | }>) { 56 | return ( 57 | 58 | 64 | 65 | 66 | {children} 67 | 68 | 69 | 70 | 71 | 72 | ); 73 | } 74 | -------------------------------------------------------------------------------- /dev-portfolio/src/app/page.tsx: -------------------------------------------------------------------------------- 1 | import { HeroSection } from "@/components/sections/HeroSection"; 2 | import { AboutSection } from "@/components/sections/AboutSection"; 3 | import { WorkExperienceSection } from "@/components/sections/WorkExperienceSection"; 4 | import { EducationSection } from "@/components/sections/EducationSection"; 5 | import { SkillsSection } from "@/components/sections/SkillsSection"; 6 | import { ProjectsSection } from "@/components/sections/ProjectsSection"; 7 | import { ContactSection } from "@/components/sections/ContactSection"; 8 | import { PageWrapper } from "@/components/layout/PageWrapper"; 9 | 10 | export default function Page() { 11 | return ( 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | ); 22 | } -------------------------------------------------------------------------------- /dev-portfolio/src/components/hackathon-card.tsx: -------------------------------------------------------------------------------- 1 | import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"; 2 | import { Badge } from "@/components/ui/badge"; 3 | import Link from "next/link"; 4 | 5 | interface Props { 6 | title: string; 7 | description: string; 8 | dates: string; 9 | location: string; 10 | image?: string; 11 | links?: readonly { 12 | icon: React.ReactNode; 13 | title: string; 14 | href: string; 15 | }[]; 16 | } 17 | 18 | export function HackathonCard({ 19 | title, 20 | description, 21 | dates, 22 | location, 23 | image, 24 | links, 25 | }: Props) { 26 | return ( 27 |
  • 28 |
    29 | 30 | 31 | {title[0]} 32 | 33 |
    34 |
    35 | {dates && ( 36 | 37 | )} 38 |

    {title}

    39 | {location && ( 40 |

    {location}

    41 | )} 42 | {description && ( 43 | 44 | {description} 45 | 46 | )} 47 |
    48 | {links && links.length > 0 && ( 49 |
    50 | {links?.map((link, idx) => ( 51 | 52 | 53 | {link.icon} 54 | {link.title} 55 | 56 | 57 | ))} 58 |
    59 | )} 60 |
  • 61 | ); 62 | } 63 | -------------------------------------------------------------------------------- /dev-portfolio/src/components/layout/PageWrapper.tsx: -------------------------------------------------------------------------------- 1 | import React, { ReactNode } from "react"; 2 | 3 | interface PageWrapperProps { 4 | children: ReactNode; 5 | } 6 | 7 | export function PageWrapper({ children }: PageWrapperProps) { 8 | return ( 9 |
    10 | {children} 11 |
    12 | ); 13 | } -------------------------------------------------------------------------------- /dev-portfolio/src/components/magicui/blur-fade.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import { AnimatePresence, motion, useInView, Variants } from "framer-motion"; 4 | import { useRef } from "react"; 5 | 6 | interface BlurFadeProps { 7 | children: React.ReactNode; 8 | className?: string; 9 | variant?: { 10 | hidden: { y: number }; 11 | visible: { y: number }; 12 | }; 13 | duration?: number; 14 | delay?: number; 15 | yOffset?: number; 16 | inView?: boolean; 17 | inViewMargin?: string; 18 | blur?: string; 19 | } 20 | const BlurFade = ({ 21 | children, 22 | className, 23 | variant, 24 | duration = 0.4, 25 | delay = 0, 26 | yOffset = 6, 27 | inView = false, 28 | inViewMargin = "-50px", 29 | blur = "6px", 30 | }: BlurFadeProps) => { 31 | const ref = useRef(null); 32 | const inViewResult = useInView(ref, { once: true, margin: inViewMargin }); 33 | const isInView = !inView || inViewResult; 34 | const defaultVariants: Variants = { 35 | hidden: { y: yOffset, opacity: 0, filter: `blur(${blur})` }, 36 | visible: { y: -yOffset, opacity: 1, filter: `blur(0px)` }, 37 | }; 38 | const combinedVariants = variant || defaultVariants; 39 | return ( 40 | 41 | 54 | {children} 55 | 56 | 57 | ); 58 | }; 59 | 60 | export default BlurFade; 61 | -------------------------------------------------------------------------------- /dev-portfolio/src/components/mode-toggle.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import { Button } from "@/components/ui/button"; 4 | import { MoonIcon, SunIcon } from "@radix-ui/react-icons"; 5 | import { useTheme } from "next-themes"; 6 | 7 | export function ModeToggle() { 8 | const { theme, setTheme } = useTheme(); 9 | 10 | return ( 11 | 21 | ); 22 | } 23 | -------------------------------------------------------------------------------- /dev-portfolio/src/components/sections/AboutSection.tsx: -------------------------------------------------------------------------------- 1 | import BlurFade from "@/components/magicui/blur-fade"; 2 | import Markdown from "react-markdown"; 3 | import { DATA } from "@/data/resume"; 4 | 5 | const BLUR_FADE_DELAY = 0.04; 6 | 7 | export function AboutSection() { 8 | return ( 9 |
    10 | 11 |

    About

    12 |
    13 | 14 | 15 | {DATA.summary} 16 | 17 | 18 |
    19 | ); 20 | } -------------------------------------------------------------------------------- /dev-portfolio/src/components/sections/ContactSection.tsx: -------------------------------------------------------------------------------- 1 | import BlurFade from "@/components/magicui/blur-fade"; 2 | import Link from "next/link"; 3 | import { DATA } from "@/data/resume"; 4 | 5 | const BLUR_FADE_DELAY = 0.04; 6 | 7 | export function ContactSection() { 8 | return ( 9 |
    10 |
    11 | 12 |
    13 |
    14 | Contact 15 |
    16 |

    17 | Get in Touch 18 |

    19 |

    20 | Want to chat? Just shoot me a dm{" "} 21 | 25 | with a direct question on LinkedIn 26 | {" "} 27 | and I'll respond whenever I can. I will ignore all 28 | soliciting. 29 |

    30 |
    31 |
    32 |
    33 |
    34 | ); 35 | } -------------------------------------------------------------------------------- /dev-portfolio/src/components/sections/WorkExperienceSection.tsx: -------------------------------------------------------------------------------- 1 | import BlurFade from "@/components/magicui/blur-fade"; 2 | import { ResumeCard } from "@/components/resume-card"; 3 | import { DATA } from "@/data/resume"; 4 | import '../../app/globals.css' 5 | import bg from '../../../public/bg-gradient.svg' 6 | import Image from 'next/image'; 7 | 8 | const BLUR_FADE_DELAY = 0.04; 9 | 10 | export function WorkExperienceSection() { 11 | return ( 12 |
    13 |
    14 | 15 | Background 20 | 21 |
    22 |
    23 | 24 |

    Work Experience

    25 |
    26 | 27 |
    28 | {DATA.work.map((work, id) => ( 29 | 33 | 44 | 45 | 46 | ))} 47 |
    48 | 49 |
    50 |
    51 | ); 52 | } -------------------------------------------------------------------------------- /dev-portfolio/src/components/theme-provider.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import { ThemeProvider as NextThemesProvider } from "next-themes"; 4 | import { ThemeProviderProps } from "next-themes/dist/types"; 5 | 6 | export function ThemeProvider({ children, ...props }: ThemeProviderProps) { 7 | return {children}; 8 | } 9 | -------------------------------------------------------------------------------- /dev-portfolio/src/components/ui/avatar.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | 3 | import * as React from "react" 4 | import * as AvatarPrimitive from "@radix-ui/react-avatar" 5 | 6 | import { cn } from "@/lib/utils" 7 | 8 | const Avatar = React.forwardRef< 9 | React.ElementRef, 10 | React.ComponentPropsWithoutRef 11 | >(({ className, ...props }, ref) => ( 12 | 20 | )) 21 | Avatar.displayName = AvatarPrimitive.Root.displayName 22 | 23 | const AvatarImage = React.forwardRef< 24 | React.ElementRef, 25 | React.ComponentPropsWithoutRef 26 | >(({ className, ...props }, ref) => ( 27 | 32 | )) 33 | AvatarImage.displayName = AvatarPrimitive.Image.displayName 34 | 35 | const AvatarFallback = React.forwardRef< 36 | React.ElementRef, 37 | React.ComponentPropsWithoutRef 38 | >(({ className, ...props }, ref) => ( 39 | 47 | )) 48 | AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName 49 | 50 | export { Avatar, AvatarImage, AvatarFallback } 51 | -------------------------------------------------------------------------------- /dev-portfolio/src/components/ui/badge.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | import { cva, type VariantProps } from "class-variance-authority" 3 | 4 | import { cn } from "@/lib/utils" 5 | 6 | const badgeVariants = cva( 7 | "inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2", 8 | { 9 | variants: { 10 | variant: { 11 | default: 12 | "border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80", 13 | secondary: 14 | "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80", 15 | destructive: 16 | "border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80", 17 | outline: "text-foreground", 18 | }, 19 | }, 20 | defaultVariants: { 21 | variant: "default", 22 | }, 23 | } 24 | ) 25 | 26 | export interface BadgeProps 27 | extends React.HTMLAttributes, 28 | VariantProps {} 29 | 30 | function Badge({ className, variant, ...props }: BadgeProps) { 31 | return ( 32 |
    33 | ) 34 | } 35 | 36 | export { Badge, badgeVariants } 37 | -------------------------------------------------------------------------------- /dev-portfolio/src/components/ui/border-beam.tsx: -------------------------------------------------------------------------------- 1 | import { cn } from "@/lib/utils"; 2 | 3 | interface BorderBeamProps { 4 | className?: string; 5 | size?: number; 6 | duration?: number; 7 | borderWidth?: number; 8 | anchor?: number; 9 | colorFrom?: string; 10 | colorTo?: string; 11 | delay?: number; 12 | } 13 | 14 | export const BorderBeam = ({ 15 | className, 16 | size = 200, 17 | duration = 15, 18 | anchor = 90, 19 | borderWidth = 1.5, 20 | colorFrom = "#ffaa40", 21 | colorTo = "#9c40ff", 22 | delay = 0, 23 | }: BorderBeamProps) => { 24 | return ( 25 |
    48 | ); 49 | }; 50 | -------------------------------------------------------------------------------- /dev-portfolio/src/components/ui/dot-pattern.tsx: -------------------------------------------------------------------------------- 1 | import { useId } from "react"; 2 | 3 | import { cn } from "@/lib/utils"; 4 | 5 | interface DotPatternProps { 6 | width?: any; 7 | height?: any; 8 | x?: any; 9 | y?: any; 10 | cx?: any; 11 | cy?: any; 12 | cr?: any; 13 | className?: string; 14 | [key: string]: any; 15 | } 16 | export function DotPattern({ 17 | width = 16, 18 | height = 16, 19 | x = 0, 20 | y = 0, 21 | cx = 1, 22 | cy = 1, 23 | cr = 1, 24 | className, 25 | ...props 26 | }: DotPatternProps) { 27 | const id = useId(); 28 | 29 | return ( 30 | 53 | ); 54 | } 55 | 56 | export default DotPattern; 57 | -------------------------------------------------------------------------------- /dev-portfolio/src/components/ui/interactive-hover-button.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import React from "react"; 4 | import { ArrowRight } from "lucide-react"; 5 | import { cn } from "@/lib/utils"; 6 | 7 | interface InteractiveHoverButtonProps 8 | extends React.ButtonHTMLAttributes { 9 | text?: string; 10 | } 11 | 12 | const InteractiveHoverButton = React.forwardRef< 13 | HTMLButtonElement, 14 | InteractiveHoverButtonProps 15 | >(({ text = "Button", className, ...props }, ref) => { 16 | return ( 17 | 34 | ); 35 | }); 36 | 37 | InteractiveHoverButton.displayName = "InteractiveHoverButton"; 38 | 39 | export default InteractiveHoverButton; 40 | -------------------------------------------------------------------------------- /dev-portfolio/src/components/ui/marquee.tsx: -------------------------------------------------------------------------------- 1 | import { cn } from "@/lib/utils"; 2 | import { ComponentPropsWithoutRef } from "react"; 3 | 4 | interface MarqueeProps extends ComponentPropsWithoutRef<"div"> { 5 | /** 6 | * Optional CSS class name to apply custom styles 7 | */ 8 | className?: string; 9 | /** 10 | * Whether to reverse the animation direction 11 | * @default false 12 | */ 13 | reverse?: boolean; 14 | /** 15 | * Whether to pause the animation on hover 16 | * @default false 17 | */ 18 | pauseOnHover?: boolean; 19 | /** 20 | * Content to be displayed in the marquee 21 | */ 22 | children: React.ReactNode; 23 | /** 24 | * Whether to animate vertically instead of horizontally 25 | * @default false 26 | */ 27 | vertical?: boolean; 28 | /** 29 | * Number of times to repeat the content 30 | * @default 4 31 | */ 32 | repeat?: number; 33 | } 34 | 35 | export default function Marquee({ 36 | className, 37 | reverse = false, 38 | pauseOnHover = false, 39 | children, 40 | vertical = false, 41 | repeat = 4, 42 | ...props 43 | }: MarqueeProps) { 44 | return ( 45 |
    56 | {Array(repeat) 57 | .fill(0) 58 | .map((_, i) => ( 59 |
    68 | {children} 69 |
    70 | ))} 71 |
    72 | ); 73 | } 74 | -------------------------------------------------------------------------------- /dev-portfolio/src/components/ui/ripple.tsx: -------------------------------------------------------------------------------- 1 | import React, { CSSProperties } from "react"; 2 | 3 | import { cn } from "@/lib/utils"; 4 | 5 | interface RippleProps { 6 | mainCircleSize?: number; 7 | mainCircleOpacity?: number; 8 | numCircles?: number; 9 | className?: string; 10 | } 11 | 12 | const Ripple = React.memo(function Ripple({ 13 | mainCircleSize = 210, 14 | mainCircleOpacity = 0.24, 15 | numCircles = 8, 16 | className, 17 | }: RippleProps) { 18 | return ( 19 |
    25 | {Array.from({ length: numCircles }, (_, i) => { 26 | const size = mainCircleSize + i * 70; 27 | const opacity = mainCircleOpacity - i * 0.03; 28 | const animationDelay = `${i * 0.06}s`; 29 | const borderStyle = i === numCircles - 1 ? "dashed" : "solid"; 30 | const borderOpacity = 5 + i * 5; 31 | 32 | return ( 33 |
    51 | ); 52 | })} 53 |
    54 | ); 55 | }); 56 | 57 | Ripple.displayName = "Ripple"; 58 | 59 | export default Ripple; 60 | -------------------------------------------------------------------------------- /dev-portfolio/src/components/ui/separator.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | 3 | import * as React from "react" 4 | import * as SeparatorPrimitive from "@radix-ui/react-separator" 5 | 6 | import { cn } from "@/lib/utils" 7 | 8 | const Separator = React.forwardRef< 9 | React.ElementRef, 10 | React.ComponentPropsWithoutRef 11 | >( 12 | ( 13 | { className, orientation = "horizontal", decorative = true, ...props }, 14 | ref 15 | ) => ( 16 | 27 | ) 28 | ) 29 | Separator.displayName = SeparatorPrimitive.Root.displayName 30 | 31 | export { Separator } 32 | -------------------------------------------------------------------------------- /dev-portfolio/src/components/ui/tooltip.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import * as TooltipPrimitive from "@radix-ui/react-tooltip"; 4 | import * as React from "react"; 5 | 6 | import { cn } from "@/lib/utils"; 7 | 8 | const TooltipProvider = TooltipPrimitive.Provider; 9 | 10 | const Tooltip = TooltipPrimitive.Root; 11 | 12 | const TooltipTrigger = TooltipPrimitive.Trigger; 13 | 14 | const TooltipContent = React.forwardRef< 15 | React.ElementRef, 16 | React.ComponentPropsWithoutRef 17 | >(({ className, sideOffset = 4, ...props }, ref) => ( 18 | 27 | )); 28 | TooltipContent.displayName = TooltipPrimitive.Content.displayName; 29 | 30 | export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger }; 31 | -------------------------------------------------------------------------------- /dev-portfolio/src/data/blog.ts: -------------------------------------------------------------------------------- 1 | import fs from "fs"; 2 | import matter from "gray-matter"; 3 | import path from "path"; 4 | import rehypePrettyCode from "rehype-pretty-code"; 5 | import rehypeStringify from "rehype-stringify"; 6 | import remarkParse from "remark-parse"; 7 | import remarkRehype from "remark-rehype"; 8 | import { unified } from "unified"; 9 | 10 | type Metadata = { 11 | title: string; 12 | publishedAt: string; 13 | summary: string; 14 | image?: string; 15 | }; 16 | 17 | function getMDXFiles(dir: string) { 18 | return fs.readdirSync(dir).filter((file) => path.extname(file) === ".mdx"); 19 | } 20 | 21 | export async function markdownToHTML(markdown: string) { 22 | const p = await unified() 23 | .use(remarkParse) 24 | .use(remarkRehype) 25 | .use(rehypePrettyCode, { 26 | // https://rehype-pretty.pages.dev/#usage 27 | theme: { 28 | light: "min-light", 29 | dark: "min-light", 30 | }, 31 | keepBackground: false, 32 | }) 33 | .use(rehypeStringify) 34 | .process(markdown); 35 | 36 | return p.toString(); 37 | } 38 | 39 | export async function getPost(slug: string) { 40 | const filePath = path.join("content", `${slug}.mdx`); 41 | let source = fs.readFileSync(filePath, "utf-8"); 42 | const { content: rawContent, data: metadata } = matter(source); 43 | const content = await markdownToHTML(rawContent); 44 | return { 45 | source: content, 46 | metadata, 47 | slug, 48 | }; 49 | } 50 | 51 | async function getAllPosts(dir: string) { 52 | let mdxFiles = getMDXFiles(dir); 53 | return Promise.all( 54 | mdxFiles.map(async (file) => { 55 | let slug = path.basename(file, path.extname(file)); 56 | let { metadata, source } = await getPost(slug); 57 | return { 58 | metadata, 59 | slug, 60 | source, 61 | }; 62 | }) 63 | ); 64 | } 65 | 66 | export async function getBlogPosts() { 67 | return getAllPosts(path.join(process.cwd(), "content")); 68 | } 69 | -------------------------------------------------------------------------------- /dev-portfolio/src/lib/utils.ts: -------------------------------------------------------------------------------- 1 | import { type ClassValue, clsx } from "clsx"; 2 | import { twMerge } from "tailwind-merge"; 3 | 4 | export function cn(...inputs: ClassValue[]) { 5 | return twMerge(clsx(inputs)); 6 | } 7 | 8 | export function formatDate(date: string) { 9 | let currentDate = new Date().getTime(); 10 | if (!date.includes("T")) { 11 | date = `${date}T00:00:00`; 12 | } 13 | let targetDate = new Date(date).getTime(); 14 | let timeDifference = Math.abs(currentDate - targetDate); 15 | let daysAgo = Math.floor(timeDifference / (1000 * 60 * 60 * 24)); 16 | 17 | let fullDate = new Date(date).toLocaleString("en-us", { 18 | month: "long", 19 | day: "numeric", 20 | year: "numeric", 21 | }); 22 | 23 | if (daysAgo < 1) { 24 | return "Today"; 25 | } else if (daysAgo < 7) { 26 | return `${fullDate} (${daysAgo}d ago)`; 27 | } else if (daysAgo < 30) { 28 | const weeksAgo = Math.floor(daysAgo / 7); 29 | return `${fullDate} (${weeksAgo}w ago)`; 30 | } else if (daysAgo < 365) { 31 | const monthsAgo = Math.floor(daysAgo / 30); 32 | return `${fullDate} (${monthsAgo}mo ago)`; 33 | } else { 34 | const yearsAgo = Math.floor(daysAgo / 365); 35 | return `${fullDate} (${yearsAgo}y ago)`; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /dev-portfolio/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "lib": [ 4 | "dom", 5 | "dom.iterable", 6 | "esnext" 7 | ], 8 | "allowJs": true, 9 | "skipLibCheck": true, 10 | "strict": true, 11 | "noEmit": true, 12 | "esModuleInterop": true, 13 | "module": "esnext", 14 | "moduleResolution": "bundler", 15 | "resolveJsonModule": true, 16 | "isolatedModules": true, 17 | "jsx": "preserve", 18 | "incremental": true, 19 | "plugins": [ 20 | { 21 | "name": "next" 22 | } 23 | ], 24 | "paths": { 25 | "@/*": [ 26 | "./src/*" 27 | ] 28 | }, 29 | "target": "ES2017" 30 | }, 31 | "include": [ 32 | "next-env.d.ts", 33 | "**/*.ts", 34 | "**/*.tsx", 35 | ".next/types/**/*.ts" 36 | ], 37 | "exclude": [ 38 | "node_modules" 39 | ] 40 | } 41 | -------------------------------------------------------------------------------- /ecom-react-appwrite/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { browser: true, es2020: true }, 4 | extends: [ 5 | 'eslint:recommended', 6 | 'plugin:react/recommended', 7 | 'plugin:react/jsx-runtime', 8 | 'plugin:react-hooks/recommended', 9 | ], 10 | ignorePatterns: ['dist', '.eslintrc.cjs'], 11 | parserOptions: { ecmaVersion: 'latest', sourceType: 'module' }, 12 | settings: { react: { version: '18.2' } }, 13 | plugins: ['react-refresh'], 14 | rules: { 15 | 'react-refresh/only-export-components': [ 16 | 'warn', 17 | { allowConstantExport: true }, 18 | ], 19 | }, 20 | } 21 | -------------------------------------------------------------------------------- /ecom-react-appwrite/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | .env 26 | src/.env 27 | -------------------------------------------------------------------------------- /ecom-react-appwrite/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Smaira Luxe | Handmade Bags 8 | 9 | 10 |
    11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /ecom-react-appwrite/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vite-project", 3 | "private": true, 4 | "version": "0.0.0", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vite", 8 | "build": "vite build", 9 | "lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0", 10 | "preview": "vite preview" 11 | }, 12 | "dependencies": { 13 | "@headlessui/react": "^1.7.16", 14 | "@reduxjs/toolkit": "^1.9.5", 15 | "animate.css": "^4.1.1", 16 | "animate.css-react": "^1.1.0", 17 | "appwrite": "^13.0.1", 18 | "react": "^18.2.0", 19 | "react-dom": "^18.2.0", 20 | "react-icons": "^4.10.1", 21 | "react-redux": "^8.1.2", 22 | "react-router-dom": "^6.22.0", 23 | "react-tabs": "^6.0.2", 24 | "sonner": "^1.4.0", 25 | "uuid": "^9.0.1" 26 | }, 27 | "devDependencies": { 28 | "@types/react": "^18.2.15", 29 | "@types/react-dom": "^18.2.7", 30 | "@vitejs/plugin-react": "^4.0.3", 31 | "autoprefixer": "^10.4.14", 32 | "eslint": "^8.45.0", 33 | "eslint-plugin-react": "^7.32.2", 34 | "eslint-plugin-react-hooks": "^4.6.0", 35 | "eslint-plugin-react-refresh": "^0.4.3", 36 | "postcss": "^8.4.27", 37 | "sass": "^1.70.0", 38 | "tailwindcss": "^3.3.3", 39 | "vite": "^4.4.5" 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /ecom-react-appwrite/postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /ecom-react-appwrite/public/vite.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ecom-react-appwrite/src/App.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codewithharshad/instagram/0e04d19feb08dc7cbb4302eae6e28014fc3c38e7/ecom-react-appwrite/src/App.css -------------------------------------------------------------------------------- /ecom-react-appwrite/src/appwrite/appwriteConfig.js: -------------------------------------------------------------------------------- 1 | import { Client, Account, Databases, Storage } from "appwrite"; 2 | 3 | //set endpoint 4 | const client = new Client(); 5 | 6 | client 7 | // .setEndpoint(import.meta.env.VITE_ENDPOINT) 8 | .setEndpoint('https://cloud.appwrite.io/v1') 9 | .setProject(''); // enter your appwrite project ID. 10 | 11 | export const account = new Account(client); 12 | 13 | //Database 14 | export const databases = new Databases(client); 15 | 16 | //storage 17 | export const storage = new Storage(client); 18 | -------------------------------------------------------------------------------- /ecom-react-appwrite/src/assets/home/checkout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codewithharshad/instagram/0e04d19feb08dc7cbb4302eae6e28014fc3c38e7/ecom-react-appwrite/src/assets/home/checkout.png -------------------------------------------------------------------------------- /ecom-react-appwrite/src/assets/home/confirmation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codewithharshad/instagram/0e04d19feb08dc7cbb4302eae6e28014fc3c38e7/ecom-react-appwrite/src/assets/home/confirmation.png -------------------------------------------------------------------------------- /ecom-react-appwrite/src/assets/home/delivered.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codewithharshad/instagram/0e04d19feb08dc7cbb4302eae6e28014fc3c38e7/ecom-react-appwrite/src/assets/home/delivered.png -------------------------------------------------------------------------------- /ecom-react-appwrite/src/assets/home/delivery.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codewithharshad/instagram/0e04d19feb08dc7cbb4302eae6e28014fc3c38e7/ecom-react-appwrite/src/assets/home/delivery.png -------------------------------------------------------------------------------- /ecom-react-appwrite/src/assets/home/hero-video.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codewithharshad/instagram/0e04d19feb08dc7cbb4302eae6e28014fc3c38e7/ecom-react-appwrite/src/assets/home/hero-video.mp4 -------------------------------------------------------------------------------- /ecom-react-appwrite/src/assets/home/hero.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codewithharshad/instagram/0e04d19feb08dc7cbb4302eae6e28014fc3c38e7/ecom-react-appwrite/src/assets/home/hero.png -------------------------------------------------------------------------------- /ecom-react-appwrite/src/assets/home/kisspng-react-business-javascript-computer-software-npm-react-5b2dd02b688437.5188897215297290674281.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codewithharshad/instagram/0e04d19feb08dc7cbb4302eae6e28014fc3c38e7/ecom-react-appwrite/src/assets/home/kisspng-react-business-javascript-computer-software-npm-react-5b2dd02b688437.5188897215297290674281.png -------------------------------------------------------------------------------- /ecom-react-appwrite/src/assets/home/nav-cart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codewithharshad/instagram/0e04d19feb08dc7cbb4302eae6e28014fc3c38e7/ecom-react-appwrite/src/assets/home/nav-cart.png -------------------------------------------------------------------------------- /ecom-react-appwrite/src/assets/home/nocart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codewithharshad/instagram/0e04d19feb08dc7cbb4302eae6e28014fc3c38e7/ecom-react-appwrite/src/assets/home/nocart.png -------------------------------------------------------------------------------- /ecom-react-appwrite/src/assets/home/small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codewithharshad/instagram/0e04d19feb08dc7cbb4302eae6e28014fc3c38e7/ecom-react-appwrite/src/assets/home/small.png -------------------------------------------------------------------------------- /ecom-react-appwrite/src/assets/home/underline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codewithharshad/instagram/0e04d19feb08dc7cbb4302eae6e28014fc3c38e7/ecom-react-appwrite/src/assets/home/underline.png -------------------------------------------------------------------------------- /ecom-react-appwrite/src/assets/home/up-arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codewithharshad/instagram/0e04d19feb08dc7cbb4302eae6e28014fc3c38e7/ecom-react-appwrite/src/assets/home/up-arrow.png -------------------------------------------------------------------------------- /ecom-react-appwrite/src/assets/order/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codewithharshad/instagram/0e04d19feb08dc7cbb4302eae6e28014fc3c38e7/ecom-react-appwrite/src/assets/order/close.png -------------------------------------------------------------------------------- /ecom-react-appwrite/src/assets/order/more.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codewithharshad/instagram/0e04d19feb08dc7cbb4302eae6e28014fc3c38e7/ecom-react-appwrite/src/assets/order/more.png -------------------------------------------------------------------------------- /ecom-react-appwrite/src/components/filter/Filter.scss: -------------------------------------------------------------------------------- 1 | .filter{ 2 | font-family: 'Raleway'; 3 | &-bg{ 4 | background-color:#f4f4f4; 5 | } 6 | &-reset{ 7 | // background-color:#ffff; 8 | padding: 10px 12px; 9 | } 10 | &-select{ 11 | appearance: none; 12 | -webkit-appearance: none; 13 | -moz-appearance: none; 14 | padding-right: 30px; 15 | 16 | } 17 | } -------------------------------------------------------------------------------- /ecom-react-appwrite/src/components/footer/Footer.scss: -------------------------------------------------------------------------------- 1 | .footer-custom{ 2 | h5{ 3 | font-weight: 500; 4 | color: #111; 5 | font-size: 20px; 6 | } 7 | img{ 8 | margin-top: 10px; 9 | width: 100px; 10 | } 11 | a{ 12 | font-family: 'Raleway'; 13 | } 14 | h2{ 15 | font-family: 'Raleway'; 16 | } 17 | } 18 | 19 | @media screen and (max-width: 600px){ 20 | .cust-footer{ 21 | position: relative; 22 | // border: 1px solid red; 23 | bottom: 0; 24 | margin-top: 50px; 25 | .cust-footer-container{ 26 | padding: 40px !important; 27 | } 28 | img{ 29 | width: 100px; 30 | text-align: center; 31 | display: block; 32 | margin: auto; 33 | margin-bottom: 30px; 34 | margin-top: 30px; 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /ecom-react-appwrite/src/components/heroSection/HeroSection.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import hero from '../../assets/home/hero.png' 3 | import heroH5 from '../../assets/home/small.png' 4 | import { useNavigate } from 'react-router-dom'; 5 | 6 | function HeroSection({head, para}) { 7 | const navigate = useNavigate(); 8 | return ( 9 |
    10 | 11 | 12 |
    13 |

    {head}

    14 | {/*

    CELEBRATING 25 YEARS IN UAE

    */} 15 |

    {para}

    16 | 17 |
    18 |
    19 | ) 20 | } 21 | 22 | export default HeroSection -------------------------------------------------------------------------------- /ecom-react-appwrite/src/components/layout/Layout.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Navbar from '../navbar/Navbar' 3 | import Footer from '../footer/Footer' 4 | 5 | function Layout({children}) { 6 | return ( 7 |
    8 | 9 |
    10 | {children} 11 |
    12 |
    13 |
    14 | ) 15 | } 16 | 17 | export default Layout -------------------------------------------------------------------------------- /ecom-react-appwrite/src/components/loader/Loader.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | function Loader() { 4 | return ( 5 |
    6 |
    7 | 11 | Loading... 12 |
    13 |
    14 | ) 15 | } 16 | 17 | export default Loader -------------------------------------------------------------------------------- /ecom-react-appwrite/src/components/productCard/ProductCard.scss: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,100..900;1,100..900&display=swap'); 2 | @import url('https://fonts.googleapis.com/css2?family=Mr+De+Haviland&display=swap'); 3 | 4 | .gold-primary{ 5 | background: linear-gradient(90deg, #E6C361 0%, #C38D48 100%); 6 | } 7 | .gold-primary-2{ 8 | background: linear-gradient(90deg, #E6C361 0%, #C38D48 100%) !important; 9 | transition: all 0.3s ease-in-out 0.1s; 10 | outline: none !important; 11 | &:hover { 12 | outline: none !important; 13 | background: linear-gradient(90deg, #C38D48 0%, #E6C361 100%) !important; 14 | transform: scale(0.95); 15 | } 16 | } 17 | 18 | .coverobject{ 19 | object-fit: cover !important; /* Keep the aspect ratio and cover the container */ 20 | } 21 | // font 22 | .mr-font{ 23 | font-family: "Mr De Haviland", cursive; 24 | } 25 | .rale-font{ 26 | font-family: "Raleway", sans-serif; 27 | } 28 | 29 | .featured-product{ 30 | background-color: #f4f4f4; 31 | margin-top: 100px; 32 | } 33 | 34 | @media screen and (max-width: 600px) { 35 | .cust-card{ 36 | // border: 1px solid red !important; 37 | width: 100%; 38 | } 39 | } -------------------------------------------------------------------------------- /ecom-react-appwrite/src/context/data/myContext.jsx: -------------------------------------------------------------------------------- 1 | import { createContext } from "react"; 2 | 3 | const myContext = createContext(); 4 | 5 | export default myContext; -------------------------------------------------------------------------------- /ecom-react-appwrite/src/index.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; -------------------------------------------------------------------------------- /ecom-react-appwrite/src/main.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import ReactDOM from 'react-dom/client' 3 | import App from './App.jsx' 4 | import { Provider } from 'react-redux' 5 | import { store } from './redux/store.jsx' 6 | import './index.css' 7 | import 'animate.css'; 8 | 9 | ReactDOM.createRoot(document.getElementById('root')).render( 10 | 11 | 12 | 13 | 14 | , 15 | ) 16 | -------------------------------------------------------------------------------- /ecom-react-appwrite/src/pages/admin/Admin.scss: -------------------------------------------------------------------------------- 1 | *{ 2 | font-family: 'Raleway'; 3 | } 4 | .text-primary-gold{ 5 | color: #C38D48; 6 | } 7 | .add-product{ 8 | 9 | background: linear-gradient(90deg, #E6C361 0%, #C38D48 100%) !important; 10 | &:hover{ 11 | background: linear-gradient(10deg, #C38D48 0%, #E6C361 100%); 12 | } 13 | color: #fff; 14 | } -------------------------------------------------------------------------------- /ecom-react-appwrite/src/pages/home/Home.jsx: -------------------------------------------------------------------------------- 1 | import React, { useContext } from 'react' 2 | import Layout from '../../components/layout/Layout' 3 | import myContext from '../../context/data/myContext' 4 | import HeroSection from '../../components/heroSection/HeroSection' 5 | import ProductCard from '../../components/productCard/ProductCard' 6 | import Track from '../../components/track/Track' 7 | import AboutSection from '../../components/heroSection/AboutSection' 8 | 9 | 10 | function Home() { 11 | return ( 12 | 13 | 14 | 15 | 16 | 17 | 18 | ) 19 | } 20 | 21 | export default Home -------------------------------------------------------------------------------- /ecom-react-appwrite/src/pages/nopage/NoPage.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | function NoPage() { 4 | return ( 5 |
    404! Not found
    6 | ) 7 | } 8 | 9 | export default NoPage -------------------------------------------------------------------------------- /ecom-react-appwrite/src/pages/other/Other.scss: -------------------------------------------------------------------------------- 1 | .return{ 2 | font-family: 'Raleway'; 3 | .heading-content{ 4 | 5 | width: 100%; 6 | margin: auto; 7 | text-align: center; 8 | margin-top: 100px; 9 | h3{ 10 | font-size: 40px; 11 | } 12 | h4{ 13 | font-size: 40px; 14 | text-transform: uppercase; 15 | } 16 | img{ 17 | display: block;; 18 | text-align: center; 19 | margin: auto; 20 | } 21 | } 22 | } 23 | .contact{ 24 | .gold-primary{ 25 | background-color: #E6C361; 26 | background: linear-gradient(90deg, #E6C361 0%, #C38D48 100%); 27 | } 28 | .text-primary{ 29 | font-family: #E6C361; 30 | font-size: 40px; 31 | } 32 | h2{ 33 | font-family: 'Raleway' !important; 34 | font-size: 40px; 35 | margin-top: 20px; 36 | } 37 | img{ 38 | display: block; 39 | margin: auto; 40 | } 41 | input,textarea{ 42 | outline: none; 43 | } 44 | textarea{} 45 | } 46 | .about{ 47 | font-family: 'Raleway'; 48 | } 49 | .gold-primary{ 50 | background-color: #E6C361; 51 | background: linear-gradient(90deg, #E6C361 0%, #C38D48 100%); 52 | } -------------------------------------------------------------------------------- /ecom-react-appwrite/src/pages/productInfo/ProductInfo.scss: -------------------------------------------------------------------------------- 1 | .product{ 2 | font-family: 'Raleway'; 3 | &-btn{ 4 | background: linear-gradient(90deg, #E6C361 0%, #C38D48 100%); 5 | &:hover{ 6 | background: linear-gradient(10deg, #C38D48 0%, #E6C361 100%); 7 | } 8 | } 9 | } -------------------------------------------------------------------------------- /ecom-react-appwrite/src/pages/registration/Register.scss: -------------------------------------------------------------------------------- 1 | .login{ 2 | 3 | &-bg{ 4 | background-color: #111; 5 | font-family: 'Raleway'; 6 | } 7 | &-btn{ 8 | background: linear-gradient(90deg, #E6C361 0%, #C38D48 100%); 9 | &:hover{ 10 | background: linear-gradient(90deg, #C38D48 0%, #E6C361 100%); 11 | } 12 | } 13 | } 14 | 15 | .singup{ 16 | 17 | &-bg{ 18 | background-color: #111; 19 | font-family: 'Raleway'; 20 | } 21 | &-btn{ 22 | background: linear-gradient(90deg, #E6C361 0%, #C38D48 100%); 23 | &:hover{ 24 | background: linear-gradient(90deg, #C38D48 0%, #E6C361 100%); 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /ecom-react-appwrite/src/redux/cartSlice.jsx: -------------------------------------------------------------------------------- 1 | import { createSlice } from "@reduxjs/toolkit"; 2 | 3 | const initialState = JSON.parse(localStorage.getItem('cart')) ?? []; 4 | 5 | const cartSlice = createSlice({ 6 | name: 'cart', 7 | initialState, 8 | reducers : { 9 | addToCart(state, action){ 10 | state.push(action.payload) 11 | }, 12 | deleteFromCart(state,action){ 13 | 14 | return state.filter(item => item.$id != action.payload.$id); 15 | }, 16 | clearCart(state) { 17 | // Clear the cart 18 | return []; 19 | }, 20 | } 21 | }) 22 | 23 | export const {addToCart, deleteFromCart, clearCart} = cartSlice.actions; 24 | 25 | export default cartSlice.reducer; -------------------------------------------------------------------------------- /ecom-react-appwrite/src/redux/store.jsx: -------------------------------------------------------------------------------- 1 | import { configureStore } from "@reduxjs/toolkit"; 2 | import cartSlice from "./cartSlice"; 3 | 4 | export const store = configureStore({ 5 | reducer :{ 6 | cart : cartSlice 7 | }, 8 | devTools : true 9 | }) -------------------------------------------------------------------------------- /ecom-react-appwrite/tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | export default { 3 | content: [ 4 | "./index.html", 5 | "./src/**/*.{js,ts,jsx,tsx}", 6 | ], 7 | theme: { 8 | extend: {}, 9 | }, 10 | plugins: [], 11 | } -------------------------------------------------------------------------------- /ecom-react-appwrite/vercel.json: -------------------------------------------------------------------------------- 1 | { 2 | "rewrites": [ 3 | { 4 | "source": "/(.*)", 5 | "destination": "/index.html" 6 | } 7 | ] 8 | } -------------------------------------------------------------------------------- /ecom-react-appwrite/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | }) 8 | -------------------------------------------------------------------------------- /flaslight-effect/hero.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codewithharshad/instagram/0e04d19feb08dc7cbb4302eae6e28014fc3c38e7/flaslight-effect/hero.png -------------------------------------------------------------------------------- /flaslight-effect/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Dynamic Spotlight Effect 7 | 8 | 9 | 10 |
    11 | 12 |
    13 |
    14 | 21 |
    22 | 23 |
    24 |

    Ancient Philosophy

    25 |

    26 | Discover the timeless wisdom of classical thought and its enduring 27 | relevance in our modern world. Journey through centuries of 28 | philosophical discourse that has shaped human understanding and 29 | continues to influence our perspective on life's greatest questions. 30 |

    31 |
    32 |
    33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /flaslight-effect/main.js: -------------------------------------------------------------------------------- 1 | 2 | class SpotlightEffect { 3 | constructor() { 4 | this.spotlight = document.querySelector('.spotlight-overlay'); 5 | this.mousePosition = { x: 0, y: 0 }; 6 | this.bindEvents(); 7 | } 8 | 9 | bindEvents() { 10 | const updateSpotlight = this.handleMouseMove.bind(this); 11 | 12 | 13 | if (this.isTouchDevice()) { 14 | document.addEventListener('touchmove', (e) => { 15 | e.preventDefault(); 16 | this.mousePosition = { 17 | x: e.touches[0].pageX, 18 | y: e.touches[0].pageY 19 | }; 20 | updateSpotlight(); 21 | }, { passive: false }); 22 | } else { 23 | document.addEventListener('mousemove', (e) => { 24 | this.mousePosition = { 25 | x: e.pageX, 26 | y: e.pageY 27 | }; 28 | updateSpotlight(); 29 | }); 30 | } 31 | } 32 | 33 | handleMouseMove() { 34 | if (this.spotlight) { 35 | this.spotlight.style.setProperty('--mouseX', `${this.mousePosition.x}px`); 36 | this.spotlight.style.setProperty('--mouseY', `${this.mousePosition.y}px`); 37 | } 38 | } 39 | 40 | isTouchDevice() { 41 | return 'ontouchstart' in window || navigator.maxTouchPoints > 0; 42 | } 43 | } 44 | 45 | document.addEventListener('DOMContentLoaded', () => { 46 | new SpotlightEffect(); 47 | }); -------------------------------------------------------------------------------- /jokes-extension/app.js: -------------------------------------------------------------------------------- 1 | document.addEventListener("DOMContentLoaded", function () { 2 | const jokeElement = document.getElementById("joke"); 3 | const generateJokeButton = document.getElementById("generateJoke"); 4 | 5 | generateJokeButton.addEventListener("click", function () { 6 | fetchJoke(); 7 | }); 8 | 9 | function fetchJoke() { 10 | fetch(chrome.runtime.getURL("jokes.json")) 11 | .then((response) => response.json()) 12 | .then((data) => { 13 | const randomIndex = Math.floor(Math.random() * data.length); 14 | const joke = data[randomIndex]; 15 | jokeElement.textContent = joke; 16 | }) 17 | .catch((error) => { 18 | console.error("Error fetching joke:", error); 19 | jokeElement.textContent = 20 | "Failed to fetch joke. Please try again later."; 21 | }); 22 | } 23 | }); 24 | -------------------------------------------------------------------------------- /jokes-extension/jokes.json: -------------------------------------------------------------------------------- 1 | [ 2 | "Why don't scientists trust atoms? Because they make up everything!", 3 | "Parallel lines have so much in common. It’s a shame they’ll never meet.", 4 | "Why did the scarecrow win an award? Because he was outstanding in his field!", 5 | "Why don’t skeletons fight each other? They don’t have the guts.", 6 | "I'm reading a book on anti-gravity. It's impossible to put down!", 7 | "Why don't we ever tell secrets on a farm? Because the potatoes have eyes and the corn has ears!", 8 | "I used to play piano by ear, but now I use my hands.", 9 | "I told my wife she should embrace her mistakes. She gave me a hug.", 10 | "Why did the bicycle fall over? Because it was two-tired!" 11 | ] 12 | -------------------------------------------------------------------------------- /jokes-extension/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codewithharshad/instagram/0e04d19feb08dc7cbb4302eae6e28014fc3c38e7/jokes-extension/logo.png -------------------------------------------------------------------------------- /jokes-extension/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "manifest_version": 3, 3 | "name": "Joke Generator", 4 | "version": "1.0", 5 | "description": "Generates jokes for you to enjoy.", 6 | "permissions": [ 7 | "activeTab" 8 | ], 9 | "action": { 10 | "default_popup": "popup.html", 11 | "default_icon": { 12 | "16": "logo.png", 13 | "48": "logo.png", 14 | "128": "logo.png" 15 | } 16 | }, 17 | "icons": { 18 | "16": "logo.png", 19 | "48": "logo.png", 20 | "128": "logo.png" 21 | }, 22 | "web_accessible_resources": [ 23 | { 24 | "resources": [ 25 | "jokes.json" 26 | ], 27 | "matches": [ 28 | "" 29 | ] 30 | } 31 | ] 32 | } -------------------------------------------------------------------------------- /jokes-extension/popup.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Joke Generator 7 | 8 | 9 | 10 |
    11 |

    Joke Generator

    12 | 13 |

    14 |
    15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /jokes-extension/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-family: Arial, sans-serif; 3 | margin: 0; 4 | padding: 0; 5 | } 6 | 7 | .container { 8 | width: 300px; 9 | margin: 20px auto; 10 | text-align: center; 11 | } 12 | 13 | h1 { 14 | color: #333; 15 | } 16 | 17 | button { 18 | background-color: #4ca3af; 19 | color: white; 20 | padding: 10px 20px; 21 | margin: 10px 0; 22 | border: none; 23 | cursor: pointer; 24 | } 25 | 26 | button:hover { 27 | background-color: rgb(69, 122, 160); 28 | } 29 | 30 | p { 31 | margin-top: 20px; 32 | font-style: italic; 33 | } -------------------------------------------------------------------------------- /make-pc-speak/Readme.md: -------------------------------------------------------------------------------- 1 | # Text-to-Speech Web App 2 | 3 | This simple web app allows users to input text and have it spoken using the Speech Synthesis Web API. The app includes features such as controlling the speed and pitch of the speech, pausing and resuming, and displaying a caption of the spoken words. 4 | 5 | ## Features 6 | 7 | - Input text in a textarea. 8 | - Adjust the speed and pitch of the speech. 9 | - Play, pause, and stop buttons for controlling speech synthesis. 10 | - Real-time caption display of spoken words. 11 | - Ability to resume speech from where it was paused. -------------------------------------------------------------------------------- /make-pc-speak/assets/pause-button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codewithharshad/instagram/0e04d19feb08dc7cbb4302eae6e28014fc3c38e7/make-pc-speak/assets/pause-button.png -------------------------------------------------------------------------------- /make-pc-speak/assets/play-button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codewithharshad/instagram/0e04d19feb08dc7cbb4302eae6e28014fc3c38e7/make-pc-speak/assets/play-button.png -------------------------------------------------------------------------------- /make-pc-speak/assets/stop-button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codewithharshad/instagram/0e04d19feb08dc7cbb4302eae6e28014fc3c38e7/make-pc-speak/assets/stop-button.png -------------------------------------------------------------------------------- /netflix-clone/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { browser: true, es2020: true }, 4 | extends: [ 5 | 'eslint:recommended', 6 | 'plugin:react/recommended', 7 | 'plugin:react/jsx-runtime', 8 | 'plugin:react-hooks/recommended', 9 | ], 10 | ignorePatterns: ['dist', '.eslintrc.cjs'], 11 | parserOptions: { ecmaVersion: 'latest', sourceType: 'module' }, 12 | settings: { react: { version: '18.2' } }, 13 | plugins: ['react-refresh'], 14 | rules: { 15 | 'react/jsx-no-target-blank': 'off', 16 | 'react-refresh/only-export-components': [ 17 | 'warn', 18 | { allowConstantExport: true }, 19 | ], 20 | }, 21 | } 22 | -------------------------------------------------------------------------------- /netflix-clone/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /netflix-clone/README.md: -------------------------------------------------------------------------------- 1 | # Netflix Clone 1.0 2 | 3 | ## Description 4 | This project is a Netflix clone built using React.js. It provides a user interface similar to Netflix for browsing movies and TV shows, including features like fetching trending content, displaying Netflix originals, playing trailers & more. 5 | 6 | ## Installation 7 | To run this project locally, follow these steps: 8 | 9 | 1. Clone this repository to your local machine. 10 | 2. Install dependencies by running `npm install`. 11 | 3. Replace the API keys for TMDB and YouTube with your own keys in the appropriate files. 12 | 4. Start the development server by running `npm run dev`. 13 | 14 | ```javascript 15 | const API_KEY = 'YOUR_TMDB_API_KEY_HERE'; // Replace 'YOUR_TMDB_API_KEY_HERE' with your TMDB API key 16 | const YT_API_KEY = 'YOUR_YOUTUBE_API_KEY_HERE'; // Replace 'YOUR_YOUTUBE_API_KEY_HERE' with your YouTube Data API key 17 | -------------------------------------------------------------------------------- /netflix-clone/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Netflix clone 1.0 8 | 9 | 10 |
    11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /netflix-clone/netflix.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codewithharshad/instagram/0e04d19feb08dc7cbb4302eae6e28014fc3c38e7/netflix-clone/netflix.png -------------------------------------------------------------------------------- /netflix-clone/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "netflix-clone", 3 | "private": true, 4 | "version": "0.0.0", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vite", 8 | "build": "vite build", 9 | "lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0", 10 | "preview": "vite preview" 11 | }, 12 | "dependencies": { 13 | "axios": "^1.7.2", 14 | "movie-trailer": "^3.2.2", 15 | "react": "^18.2.0", 16 | "react-dom": "^18.2.0", 17 | "react-youtube": "^10.1.0" 18 | }, 19 | "devDependencies": { 20 | "@types/react": "^18.2.66", 21 | "@types/react-dom": "^18.2.22", 22 | "@vitejs/plugin-react": "^4.2.1", 23 | "eslint": "^8.57.0", 24 | "eslint-plugin-react": "^7.34.1", 25 | "eslint-plugin-react-hooks": "^4.6.0", 26 | "eslint-plugin-react-refresh": "^0.4.6", 27 | "vite": "^5.2.0" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /netflix-clone/public/vite.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /netflix-clone/src/App.css: -------------------------------------------------------------------------------- 1 | * { 2 | margin: 0; 3 | } 4 | 5 | .app { 6 | background-color: #111; 7 | } -------------------------------------------------------------------------------- /netflix-clone/src/App.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import './App.css'; 3 | import Row from './Row'; 4 | import { requests } from './utils/requests'; 5 | import Poster from './Poster'; 6 | import Navbar from './Navbar.jsx'; 7 | 8 | function App() { 9 | const rowConfigurations = [ 10 | { title: "Top 10 Movies in India Today", isLargeRow: true, fetchUrl: requests.fetchNetflixOriginals }, 11 | { title: "New on Netflix", fetchUrl: requests.fetchTrending }, 12 | { title: "Top Rated", fetchUrl: requests.fetchTopRated }, 13 | { title: "Action Movies", fetchUrl: requests.fetchActionMovies }, 14 | { title: "Comedy Movies", fetchUrl: requests.fetchComedyMovies }, 15 | { title: "Horror Movies", fetchUrl: requests.fetchHorrorMovies }, 16 | { title: "Romance Movies", fetchUrl: requests.fetchRomanceMovies }, 17 | { title: "Documentaries", fetchUrl: requests.fetchDocumentaries } 18 | ]; 19 | 20 | return ( 21 |
    22 | 23 | 24 | {rowConfigurations.map((config, index) => ( 25 | 26 | ))} 27 |
    28 | ); 29 | } 30 | 31 | export default App; 32 | -------------------------------------------------------------------------------- /netflix-clone/src/Navbar.css: -------------------------------------------------------------------------------- 1 | .nav { 2 | position: fixed; 3 | top: 0; 4 | width: 100%; 5 | padding: 20px; 6 | height: 30px; 7 | z-index: 1; 8 | 9 | /* Animation */ 10 | transition-timing-function: ease-in; 11 | transition: all 0.5s; 12 | 13 | } 14 | 15 | .nav_black { 16 | background-color: #111; 17 | } 18 | 19 | .nav_logo { 20 | position: fixed; 21 | left: 20px; 22 | width: 80px; 23 | object-fit: contain; 24 | } 25 | 26 | .nav_avatar { 27 | position: fixed; 28 | right: 20px; 29 | width: 30px; 30 | object-fit: contain; 31 | } -------------------------------------------------------------------------------- /netflix-clone/src/Navbar.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState, useEffect, useCallback } from 'react'; 2 | import './Navbar.css'; 3 | 4 | const NAVBAR_HEIGHT_THRESHOLD = 100; // Threshold for when to show black navbar 5 | 6 | const Navbar = () => { 7 | const [isNavbarBlack, setIsNavbarBlack] = useState(false); 8 | 9 | const handleScroll = useCallback(() => { 10 | const shouldShowBlackNavbar = window.scrollY > NAVBAR_HEIGHT_THRESHOLD; 11 | setIsNavbarBlack(shouldShowBlackNavbar); 12 | }, []); 13 | 14 | useEffect(() => { 15 | window.addEventListener('scroll', handleScroll); 16 | return () => { 17 | window.removeEventListener('scroll', handleScroll); 18 | }; 19 | }, [handleScroll]); 20 | 21 | return ( 22 |
    23 | Netflix Logo 28 | Netflix Avatar 33 |
    34 | ); 35 | }; 36 | 37 | export default Navbar; 38 | -------------------------------------------------------------------------------- /netflix-clone/src/Poster.css: -------------------------------------------------------------------------------- 1 | .banner { 2 | color: white; 3 | object-fit: contain; 4 | height: 448px; 5 | } 6 | 7 | .banner_contents { 8 | margin-left: 30px; 9 | padding-top: 140px; 10 | height: 190px; 11 | } 12 | 13 | .banner_title { 14 | font-size: 3rem; 15 | font-weight: 800; 16 | padding-bottom: 0.3rem; 17 | } 18 | 19 | .banner_description { 20 | width: 45rem; 21 | line-height: 1.3; 22 | font-size: 0.8rem; 23 | max-width: 360px; 24 | height: 80px; 25 | } 26 | 27 | .banner_button { 28 | cursor: pointer; 29 | color: white; 30 | outline: none; 31 | border: none; 32 | font-weight: 700; 33 | border-radius: 0.2vw; 34 | padding-left: 2rem; 35 | padding-right: 2rem; 36 | padding-top: 0.5rem; 37 | padding-bottom: 0.5rem; 38 | margin-right: 1rem; 39 | background-color: rgb(51, 51, 51, 0.5); 40 | 41 | } 42 | 43 | .banner_button:hover { 44 | color: #000; 45 | background-color: #e6e6e6; 46 | transition: all 0.2s; 47 | } 48 | 49 | .banner--fadeBottom { 50 | height: 7.4rem; 51 | background-image: linear-gradient(180deg, transparent, rgba(37, 37, 37, 0.61), #111); 52 | } -------------------------------------------------------------------------------- /netflix-clone/src/Poster.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState, useEffect, useCallback } from 'react'; 2 | import axios from './utils/axios'; 3 | import {requests} from './utils/requests'; 4 | import './Poster.css'; 5 | 6 | const truncate = (str, n) => (str?.length > n ? `${str.substr(0, n - 1)}...` : str); 7 | 8 | const Poster = () => { 9 | const [movie, setMovie] = useState(null); 10 | 11 | const fetchData = useCallback(async () => { 12 | try { 13 | const request = await axios.get(requests.fetchNetflixOriginals); 14 | const randomIndex = Math.floor(Math.random() * request.data.results.length); 15 | setMovie(request.data.results[randomIndex]); 16 | return request; 17 | } catch (error) { 18 | console.error('Error fetching data:', error); 19 | } 20 | }, []); 21 | 22 | useEffect(() => { 23 | fetchData(); 24 | }, [fetchData]); 25 | 26 | return ( 27 |
    35 |
    36 |

    37 | {movie?.title || movie?.name || movie?.original_name} 38 |

    39 | 40 |
    41 | 42 | 43 |
    44 |

    {truncate(movie?.overview, 150)}

    45 |
    46 | 47 |
    48 |
    49 | ); 50 | }; 51 | 52 | export default Poster; 53 | -------------------------------------------------------------------------------- /netflix-clone/src/Row.css: -------------------------------------------------------------------------------- 1 | .row { 2 | color: #fff; 3 | margin-left: 20px; 4 | } 5 | 6 | .row_posters { 7 | display: flex; 8 | overflow-y: hidden; 9 | overflow-x: scroll; 10 | padding: 20px; 11 | } 12 | 13 | .row_posters::-webkit-scrollbar { 14 | display: none; 15 | } 16 | 17 | .row_poster { 18 | object-fit: contain; 19 | width: 100%; 20 | max-height: 100px; 21 | margin-right: 10px; 22 | transition: transform 450ms; 23 | } 24 | 25 | .row_poster:hover { 26 | transform: scale(1.1); 27 | } 28 | 29 | .row_posterLarge { 30 | max-height: 250px; 31 | } 32 | 33 | .row_posterLarge:hover { 34 | transform: scale(1.11); 35 | } 36 | 37 | 38 | .overlay { 39 | position: fixed; 40 | top: 0; 41 | left: 0; 42 | width: 100%; 43 | height: 100%; 44 | background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent black */ 45 | z-index: 10; /* Ensure overlay is above other content */ 46 | } 47 | 48 | .popup { 49 | position: fixed; 50 | top: 50%; 51 | left: 50%; 52 | transform: translate(-50%, -50%); 53 | background-color: white; 54 | padding: 20px; 55 | z-index: 11; /* Ensure popup is above overlay */ 56 | } 57 | 58 | .popup_inner { 59 | position: relative; 60 | } 61 | 62 | .close_button { 63 | position: absolute; 64 | top: 10px; 65 | right: 10px; 66 | padding: 5px 10px; 67 | background-color: #333; 68 | color: white; 69 | border: none; 70 | cursor: pointer; 71 | } 72 | -------------------------------------------------------------------------------- /netflix-clone/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | } 9 | 10 | code { 11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 12 | monospace; 13 | } 14 | -------------------------------------------------------------------------------- /netflix-clone/src/main.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import ReactDOM from 'react-dom/client' 3 | import App from './App.jsx' 4 | import './index.css' 5 | 6 | ReactDOM.createRoot(document.getElementById('root')).render( 7 | 8 | 9 | , 10 | ) 11 | -------------------------------------------------------------------------------- /netflix-clone/src/utils/axios.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios'; 2 | 3 | const instance = axios.create({ 4 | baseURL: 'https://api.themoviedb.org/3' 5 | }); 6 | 7 | export default instance; 8 | -------------------------------------------------------------------------------- /netflix-clone/src/utils/requests.js: -------------------------------------------------------------------------------- 1 | const API_KEY = 'YOUR_TMDB_API_KEY_HERE'; // Replace 'YOUR_TMDB_API_KEY_HERE' with your TMDB API key 2 | const YT_API_KEY = 'YOUR_YOUTUBE_API_KEY_HERE'; // Replace 'YOUR_YOUTUBE_API_KEY_HERE' with your YouTube Data API key 3 | 4 | const requests = { 5 | fetchTrending: `/trending/all/week?api_key=${API_KEY}®ion=IN`, 6 | fetchNetflixOriginals: `/discover/tv?api_key=${API_KEY}&with_network=53`, 7 | fetchTopRated: `/movie/top_rated?api_key=${API_KEY}&language=en-US`, 8 | fetchActionMovies: `/discover/movie?api_key=${API_KEY}&with_genres=28`, 9 | fetchComedyMovies: `/discover/movie?api_key=${API_KEY}&with_genres=35`, 10 | fetchHorrorMovies: `/discover/movie?api_key=${API_KEY}&with_genres=27`, 11 | fetchRomanceMovies: `/discover/movie?api_key=${API_KEY}&with_genres=10749`, 12 | fetchDocumentaries: `/discover/movie?api_key=${API_KEY}&with_genres=99` 13 | // refer this docs for genre - https://www.themoviedb.org/talk/5daf6eb0ae36680011d7e6ee 14 | }; 15 | 16 | export { YT_API_KEY, requests }; 17 | -------------------------------------------------------------------------------- /netflix-clone/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | }) 8 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "instagram", 3 | "lockfileVersion": 3, 4 | "requires": true, 5 | "packages": {} 6 | } 7 | -------------------------------------------------------------------------------- /pomodoro-webapp/assets/Alarm06.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codewithharshad/instagram/0e04d19feb08dc7cbb4302eae6e28014fc3c38e7/pomodoro-webapp/assets/Alarm06.wav -------------------------------------------------------------------------------- /pomodoro-webapp/assets/icon-arrow-down.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pomodoro-webapp/assets/icon-arrow-up.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pomodoro-webapp/assets/icon-close.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pomodoro-webapp/assets/icon-settings.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /responsive-sidebar/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Document 8 | 9 | 10 | 11 |
    12 | 13 | 14 | 17 | 18 | 24 | 25 |
    26 |
    27 |
    28 |
    29 |
    30 |
    31 |
    32 |
    33 |
    34 |
    35 |
    36 |
    37 |
    38 |
    39 |
    40 |
    41 | 42 | -------------------------------------------------------------------------------- /snap-notes/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { browser: true, es2020: true }, 4 | extends: [ 5 | 'eslint:recommended', 6 | 'plugin:react/recommended', 7 | 'plugin:react/jsx-runtime', 8 | 'plugin:react-hooks/recommended', 9 | ], 10 | ignorePatterns: ['dist', '.eslintrc.cjs'], 11 | parserOptions: { ecmaVersion: 'latest', sourceType: 'module' }, 12 | settings: { react: { version: '18.2' } }, 13 | plugins: ['react-refresh'], 14 | rules: { 15 | 'react-refresh/only-export-components': [ 16 | 'warn', 17 | { allowConstantExport: true }, 18 | ], 19 | }, 20 | } 21 | -------------------------------------------------------------------------------- /snap-notes/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | .env 26 | src/.env 27 | -------------------------------------------------------------------------------- /snap-notes/components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://ui.shadcn.com/schema.json", 3 | "style": "default", 4 | "rsc": false, 5 | "tsx": false, 6 | "tailwind": { 7 | "config": "tailwind.config.js", 8 | "css": "src/index.css", 9 | "baseColor": "slate", 10 | "cssVariables": true, 11 | "prefix": "" 12 | }, 13 | "aliases": { 14 | "components": "@/components", 15 | "utils": "@/lib/utils" 16 | } 17 | } -------------------------------------------------------------------------------- /snap-notes/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Snap Notes | CodeWithHarshad 8 | 9 | 10 |
    11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /snap-notes/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vite-project", 3 | "private": true, 4 | "version": "0.0.0", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vite", 8 | "build": "vite build", 9 | "lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0", 10 | "preview": "vite preview" 11 | }, 12 | "dependencies": { 13 | "@headlessui/react": "^1.7.16", 14 | "@hookform/resolvers": "^3.3.4", 15 | "@radix-ui/react-alert-dialog": "^1.0.5", 16 | "@radix-ui/react-avatar": "^1.0.4", 17 | "@radix-ui/react-dialog": "^1.0.5", 18 | "@radix-ui/react-dropdown-menu": "^2.0.6", 19 | "@radix-ui/react-label": "^2.0.2", 20 | "@radix-ui/react-popover": "^1.0.7", 21 | "@radix-ui/react-slot": "^1.0.2", 22 | "@radix-ui/react-tooltip": "^1.0.7", 23 | "@reduxjs/toolkit": "^1.9.5", 24 | "animate.css": "^4.1.1", 25 | "animate.css-react": "^1.1.0", 26 | "appwrite": "^13.0.1", 27 | "class-variance-authority": "^0.7.0", 28 | "clsx": "^2.1.0", 29 | "framer-motion": "^11.0.6", 30 | "lucide-react": "^0.334.0", 31 | "next-themes": "^0.2.1", 32 | "react": "^18.2.0", 33 | "react-dom": "^18.2.0", 34 | "react-hook-form": "^7.50.1", 35 | "react-icons": "^4.12.0", 36 | "react-redux": "^8.1.2", 37 | "react-router-dom": "^6.22.0", 38 | "react-tabs": "^6.0.2", 39 | "react-toastify": "^9.1.3", 40 | "sonner": "^1.4.0", 41 | "tailwind-merge": "^2.2.1", 42 | "tailwindcss-animate": "^1.0.7", 43 | "uuid": "^9.0.1", 44 | "zod": "^3.22.4" 45 | }, 46 | "devDependencies": { 47 | "@types/node": "^20.11.19", 48 | "@types/react": "^18.2.15", 49 | "@types/react-dom": "^18.2.7", 50 | "@vitejs/plugin-react": "^4.0.3", 51 | "autoprefixer": "^10.4.17", 52 | "eslint": "^8.45.0", 53 | "eslint-plugin-react": "^7.32.2", 54 | "eslint-plugin-react-hooks": "^4.6.0", 55 | "eslint-plugin-react-refresh": "^0.4.3", 56 | "postcss": "^8.4.35", 57 | "sass": "^1.70.0", 58 | "tailwindcss": "^3.4.1", 59 | "vite": "^4.4.5" 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /snap-notes/postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /snap-notes/public/vite.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /snap-notes/src/App.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codewithharshad/instagram/0e04d19feb08dc7cbb4302eae6e28014fc3c38e7/snap-notes/src/App.css -------------------------------------------------------------------------------- /snap-notes/src/App.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { 3 | HashRouter as Router, 4 | Route, 5 | Routes, 6 | Navigate, 7 | } from "react-router-dom"; 8 | 9 | import Home from "./pages/home/Home"; 10 | import Trash from "./pages/trash/Trash"; 11 | import NoPage from "./pages/nopage/NoPage"; 12 | 13 | import MyState from "./context/data/myState"; 14 | import Login from "./pages/registration/Login"; 15 | import Signup from "./pages/registration/Signup"; 16 | import { ToastContainer } from "react-toastify"; 17 | import "react-toastify/dist/ReactToastify.css"; 18 | import { Toaster } from "@/components/ui/sonner"; 19 | 20 | function App() { 21 | return ( 22 | 23 | 24 | 25 | } /> 26 | 30 | 31 | 32 | } 33 | /> 34 | } /> 35 | } /> 36 | } /> 37 | 38 | 39 | 40 | 41 | 42 | ); 43 | } 44 | 45 | export default App; 46 | 47 | // user 48 | 49 | export const ProtectedRoute = ({ children }) => { 50 | const user = localStorage.getItem("user"); 51 | if (user) { 52 | return children; 53 | } else { 54 | return ; 55 | } 56 | }; 57 | 58 | // admin 59 | 60 | const ProtectedRouteForAdmin = ({ children }) => { 61 | const admin = JSON.parse(localStorage.getItem("user")); 62 | 63 | if (admin.providerUid === "harshadwhocodes@gmail.com") { 64 | return children; 65 | } else { 66 | return ; 67 | } 68 | }; 69 | -------------------------------------------------------------------------------- /snap-notes/src/appwrite/appwriteConfig.js: -------------------------------------------------------------------------------- 1 | import { Client, Account, Databases, Storage } from "appwrite"; 2 | 3 | //set endpoint 4 | const client = new Client(); 5 | 6 | client 7 | // .setEndpoint(import.meta.env.VITE_ENDPOINT) 8 | .setEndpoint("https://cloud.appwrite.io/v1") 9 | .setProject("snap-notes"); // add your appwrite project id here 10 | 11 | export const account = new Account(client); 12 | 13 | //Database 14 | export const databases = new Databases(client); 15 | 16 | //storage 17 | export const storage = new Storage(client); 18 | 19 | //notes-collection 20 | export const collectionID = "note-table"; 21 | export const dbID = "note-db"; 22 | -------------------------------------------------------------------------------- /snap-notes/src/components/addNote/AddNote.scss: -------------------------------------------------------------------------------- 1 | /* Typewriter Effect */ 2 | @keyframes typing { 3 | from { 4 | width: 0; 5 | } 6 | to { 7 | width: 100px; 8 | } 9 | } 10 | 11 | @keyframes blink-caret { 12 | from, 13 | to { 14 | border-color: transparent; 15 | } 16 | 50% { 17 | border-color: black; 18 | } 19 | } 20 | 21 | .typewriter { 22 | overflow: hidden; 23 | border-right: 0.15em solid black; 24 | white-space: nowrap; 25 | margin: 0 auto; 26 | letter-spacing: 0.15em; 27 | animation: typing 0.5s steps(10, end), blink-caret 0.75s step-end infinite; 28 | } 29 | -------------------------------------------------------------------------------- /snap-notes/src/components/footer/Footer.jsx: -------------------------------------------------------------------------------- 1 | import React, { useContext } from "react"; 2 | import myContext from "../../context/data/myContext"; 3 | import { Link } from "react-router-dom"; 4 | import { Input } from "@/components/ui/input"; 5 | import { Button } from "@/components/ui/button"; 6 | import { 7 | FaFacebookF, 8 | FaTwitter, 9 | FaInstagram, 10 | FaLinkedinIn, 11 | } from "react-icons/fa"; // Import icons from react-icons library 12 | import HoverSocial from "./HoverSocial"; 13 | import H5Share from "./H5Share"; 14 | function Footer() { 15 | const context = useContext(myContext); 16 | const { mode } = context; 17 | return ( 18 |
    19 |
    20 | 21 |
    22 |
    23 | 24 |
    25 |
    26 | ); 27 | } 28 | 29 | export default Footer; 30 | -------------------------------------------------------------------------------- /snap-notes/src/components/footer/H5Share.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | function H5Share() { 4 | return ( 5 |
    6 | 25 |
    26 | ); 27 | } 28 | 29 | export default H5Share; 30 | -------------------------------------------------------------------------------- /snap-notes/src/components/layout/Layout.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import Navbar from "../navbar/Navbar"; 3 | import Footer from "../footer/Footer"; 4 | 5 | function Layout({ children }) { 6 | return ( 7 |
    8 | 9 |
    {children}
    10 |
    11 |
    12 | ); 13 | } 14 | 15 | export default Layout; 16 | -------------------------------------------------------------------------------- /snap-notes/src/components/loader/Loader.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | function Loader() { 4 | return ( 5 |
    6 |
    11 | 27 | Loading... 28 |
    29 |
    30 | ); 31 | } 32 | 33 | export default Loader; 34 | -------------------------------------------------------------------------------- /snap-notes/src/components/notes/ProductCard.scss: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,100..900;1,100..900&display=swap'); 2 | @import url('https://fonts.googleapis.com/css2?family=Mr+De+Haviland&display=swap'); 3 | 4 | .gold-primary{ 5 | background: linear-gradient(90deg, #E6C361 0%, #C38D48 100%); 6 | } 7 | .gold-primary-2{ 8 | background: linear-gradient(90deg, #E6C361 0%, #C38D48 100%) !important; 9 | transition: all 0.3s ease-in-out 0.1s; 10 | outline: none !important; 11 | &:hover { 12 | outline: none !important; 13 | background: linear-gradient(90deg, #C38D48 0%, #E6C361 100%) !important; 14 | transform: scale(0.95); 15 | } 16 | } 17 | 18 | .coverobject{ 19 | object-fit: cover !important; /* Keep the aspect ratio and cover the container */ 20 | } 21 | // font 22 | .mr-font{ 23 | font-family: "Mr De Haviland", cursive; 24 | } 25 | .rale-font{ 26 | font-family: "Raleway", sans-serif; 27 | } 28 | 29 | .featured-product{ 30 | background-color: #f4f4f4; 31 | margin-top: 100px; 32 | } 33 | 34 | @media screen and (max-width: 600px) { 35 | .cust-card{ 36 | // border: 1px solid red !important; 37 | width: 100%; 38 | } 39 | } -------------------------------------------------------------------------------- /snap-notes/src/components/ui/avatar.jsx: -------------------------------------------------------------------------------- 1 | import * as React from "react"; 2 | import * as AvatarPrimitive from "@radix-ui/react-avatar"; 3 | 4 | import { cn } from "@/lib/utils"; 5 | 6 | const Avatar = React.forwardRef(({ className, ...props }, ref) => ( 7 | 15 | )); 16 | Avatar.displayName = AvatarPrimitive.Root.displayName; 17 | 18 | const AvatarImage = React.forwardRef(({ className, ...props }, ref) => ( 19 | 24 | )); 25 | AvatarImage.displayName = AvatarPrimitive.Image.displayName; 26 | 27 | const AvatarFallback = React.forwardRef(({ className, ...props }, ref) => ( 28 | 36 | )); 37 | AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName; 38 | 39 | export { Avatar, AvatarImage, AvatarFallback }; 40 | -------------------------------------------------------------------------------- /snap-notes/src/components/ui/button.jsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | import { Slot } from "@radix-ui/react-slot" 3 | import { cva } 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 | const Button = React.forwardRef(({ className, variant, size, asChild = false, ...props }, ref) => { 37 | const Comp = asChild ? Slot : "button" 38 | return ( 39 | () 43 | ); 44 | }) 45 | Button.displayName = "Button" 46 | 47 | export { Button, buttonVariants } 48 | -------------------------------------------------------------------------------- /snap-notes/src/components/ui/card.jsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | 3 | import { cn } from "@/lib/utils" 4 | 5 | const Card = React.forwardRef(({ className, ...props }, ref) => ( 6 |
    10 | )) 11 | Card.displayName = "Card" 12 | 13 | const CardHeader = React.forwardRef(({ className, ...props }, ref) => ( 14 |
    18 | )) 19 | CardHeader.displayName = "CardHeader" 20 | 21 | const CardTitle = React.forwardRef(({ className, ...props }, ref) => ( 22 |

    26 | )) 27 | CardTitle.displayName = "CardTitle" 28 | 29 | const CardDescription = React.forwardRef(({ className, ...props }, ref) => ( 30 |

    34 | )) 35 | CardDescription.displayName = "CardDescription" 36 | 37 | const CardContent = React.forwardRef(({ className, ...props }, ref) => ( 38 |

    39 | )) 40 | CardContent.displayName = "CardContent" 41 | 42 | const CardFooter = React.forwardRef(({ className, ...props }, ref) => ( 43 |
    47 | )) 48 | CardFooter.displayName = "CardFooter" 49 | 50 | export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent } 51 | -------------------------------------------------------------------------------- /snap-notes/src/components/ui/input.jsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | 3 | import { cn } from "@/lib/utils" 4 | 5 | const Input = React.forwardRef(({ className, type, ...props }, ref) => { 6 | return ( 7 | () 15 | ); 16 | }) 17 | Input.displayName = "Input" 18 | 19 | export { Input } 20 | -------------------------------------------------------------------------------- /snap-notes/src/components/ui/label.jsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | import * as LabelPrimitive from "@radix-ui/react-label" 3 | import { cva } from "class-variance-authority"; 4 | 5 | import { cn } from "@/lib/utils" 6 | 7 | const labelVariants = cva( 8 | "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" 9 | ) 10 | 11 | const Label = React.forwardRef(({ className, ...props }, ref) => ( 12 | 13 | )) 14 | Label.displayName = LabelPrimitive.Root.displayName 15 | 16 | export { Label } 17 | -------------------------------------------------------------------------------- /snap-notes/src/components/ui/popover.jsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | import * as PopoverPrimitive from "@radix-ui/react-popover" 3 | 4 | import { cn } from "@/lib/utils" 5 | 6 | const Popover = PopoverPrimitive.Root 7 | 8 | const PopoverTrigger = PopoverPrimitive.Trigger 9 | 10 | const PopoverContent = React.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => ( 11 | 12 | 21 | 22 | )) 23 | PopoverContent.displayName = PopoverPrimitive.Content.displayName 24 | 25 | export { Popover, PopoverTrigger, PopoverContent } 26 | -------------------------------------------------------------------------------- /snap-notes/src/components/ui/skeleton.jsx: -------------------------------------------------------------------------------- 1 | import { cn } from "@/lib/utils" 2 | 3 | function Skeleton({ 4 | className, 5 | ...props 6 | }) { 7 | return (
    ); 8 | } 9 | 10 | export { Skeleton } 11 | -------------------------------------------------------------------------------- /snap-notes/src/components/ui/sonner.jsx: -------------------------------------------------------------------------------- 1 | import { useTheme } from "next-themes" 2 | import { Toaster as Sonner } from "sonner" 3 | 4 | const Toaster = ({ 5 | ...props 6 | }) => { 7 | const { theme = "system" } = useTheme() 8 | 9 | return ( 10 | () 25 | ); 26 | } 27 | 28 | export { Toaster } 29 | -------------------------------------------------------------------------------- /snap-notes/src/components/ui/textarea.jsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | 3 | import { cn } from "@/lib/utils" 4 | 5 | const Textarea = React.forwardRef(({ className, ...props }, ref) => { 6 | return ( 7 | (