├── public ├── _redirects └── index.html ├── src ├── assets │ ├── images │ │ ├── cloud.png │ │ └── noise.gif │ └── fonts │ │ └── CosiAzure-Bold.ttf ├── components │ ├── CustomCursor.js │ ├── SectionTitle.js │ ├── Home.js │ ├── Bio.js │ ├── Footer.js │ ├── Socials.js │ ├── Hero.js │ ├── About.js │ ├── Navbar.js │ ├── Project.js │ ├── Skils.js │ ├── Projects.js │ └── Contact.js ├── index.js ├── Hooks │ ├── useHoverEffect.js │ ├── useSmoothScroll.js │ ├── useCustomCursor.js │ └── gsap.js ├── App.js └── index.css ├── tailwind.config.js ├── .gitignore ├── package.json └── README.md /public/_redirects: -------------------------------------------------------------------------------- 1 | /* /index.html 200 -------------------------------------------------------------------------------- /src/assets/images/cloud.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rafiul29/personal-portfolio/HEAD/src/assets/images/cloud.png -------------------------------------------------------------------------------- /src/assets/images/noise.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rafiul29/personal-portfolio/HEAD/src/assets/images/noise.gif -------------------------------------------------------------------------------- /src/assets/fonts/CosiAzure-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rafiul29/personal-portfolio/HEAD/src/assets/fonts/CosiAzure-Bold.ttf -------------------------------------------------------------------------------- /tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | module.exports = { 3 | content: [ 4 | "./src/**/*.{js,jsx,ts,tsx}", 5 | ], 6 | theme: { 7 | extend: {}, 8 | }, 9 | plugins: [], 10 | } -------------------------------------------------------------------------------- /src/components/CustomCursor.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | const CustomCursor = ({innerCursorRef,outerCursorRef}) => { 4 | return ( 5 | <> 6 |
7 |
8 | 9 | ) 10 | } 11 | 12 | export default CustomCursor -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Md Rafiul Islam | Font end Developer 8 | 9 | 10 |
11 | 12 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom/client'; 3 | import './index.css'; 4 | import App from './App'; 5 | import { BrowserRouter } from 'react-router-dom'; 6 | 7 | 8 | const root = ReactDOM.createRoot(document.getElementById('root')); 9 | root.render( 10 | 11 | 12 | 13 | 14 | 15 | ); 16 | 17 | -------------------------------------------------------------------------------- /.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 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | 13 | 14 | # misc 15 | .DS_Store 16 | .env 17 | .env.local 18 | .env.development.local 19 | .env.test.local 20 | .env.production.local 21 | 22 | npm-debug.log* 23 | yarn-debug.log* 24 | yarn-error.log* 25 | -------------------------------------------------------------------------------- /src/components/SectionTitle.js: -------------------------------------------------------------------------------- 1 | import React, { useRef } from 'react' 2 | import { useSectionTitleReveal } from '../Hooks/gsap' 3 | const SectionTitle = ({title}) => { 4 | const sectionTitleRef=useRef(null) 5 | useSectionTitleReveal(sectionTitleRef) 6 | return ( 7 |
8 |

{title}

9 |
10 | ) 11 | } 12 | 13 | export default SectionTitle -------------------------------------------------------------------------------- /src/Hooks/useHoverEffect.js: -------------------------------------------------------------------------------- 1 | import hoverEffect from "hover-effect" 2 | import { useEffect } from "react" 3 | import cloud from "../assets/images/cloud.png" 4 | export const useHoverEffect=(el,img1,img2)=>{ 5 | useEffect(()=>{ 6 | new hoverEffect({ 7 | parent:el.current, 8 | image1:img1, 9 | image2:img2, 10 | displacementImage: cloud, 11 | intensity:0.5, 12 | }) 13 | },[el,img1,img2]) 14 | } -------------------------------------------------------------------------------- /src/components/Home.js: -------------------------------------------------------------------------------- 1 | import Hero from "./Hero" 2 | import Bio from "./Bio" 3 | import Projects from "./Projects" 4 | import Skils from "./Skils" 5 | import About from "./About" 6 | import Contact from "./Contact" 7 | const Home = () => { 8 | return ( 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | ) 18 | } 19 | 20 | export default Home -------------------------------------------------------------------------------- /src/Hooks/useSmoothScroll.js: -------------------------------------------------------------------------------- 1 | import { useEffect } from "react" 2 | import Lenis from '@studio-freight/lenis' 3 | 4 | export const useSmoothScroll = () => { 5 | useEffect(()=>{ 6 | 7 | const lenis = new Lenis({ 8 | duration: 1.3, 9 | easing: (t) => Math.min(1, 1.001 - Math.pow(2, -10 * t)), 10 | direction: 'vertical', 11 | smooth: true, 12 | 13 | }) 14 | 15 | function raf(time) { 16 | lenis.raf(time) 17 | requestAnimationFrame(raf) 18 | } 19 | 20 | requestAnimationFrame(raf) 21 | },[]) 22 | 23 | 24 | 25 | 26 | } 27 | 28 | -------------------------------------------------------------------------------- /src/components/Bio.js: -------------------------------------------------------------------------------- 1 | import React, { useRef } from "react"; 2 | import { useBioReveal } from "../Hooks/gsap"; 3 | const Bio = () => { 4 | 5 | const boiRef=useRef(null) 6 | useBioReveal(boiRef,2) 7 | return ( 8 |
9 |

10 | Hi! I am a front-end developer specializing in building responsive and interactive web applications using React, Redux, Tailwind CSS, GSAP, and WebGL. My focus is on creating dynamic and engaging user experiences that drive user interaction and engagement. 11 |

12 |
13 | ); 14 | }; 15 | 16 | export default Bio; 17 | -------------------------------------------------------------------------------- /src/components/Footer.js: -------------------------------------------------------------------------------- 1 | import { useRef } from "react"; 2 | import { HashLink } from "react-router-hash-link"; 3 | import {useFooterReveal} from "../Hooks/gsap" 4 | const Footer = () => { 5 | const footerRef = useRef(null); 6 | 7 | useFooterReveal(footerRef) 8 | return ( 9 | 22 | ); 23 | }; 24 | 25 | export default Footer; 26 | -------------------------------------------------------------------------------- /src/Hooks/useCustomCursor.js: -------------------------------------------------------------------------------- 1 | import { useEffect } from "react" 2 | 3 | 4 | export const useCustomCursor = (innerCursorRef,outerCursorRef) => { 5 | 6 | useEffect(()=>{ 7 | document.addEventListener('mousemove',moveCursor) 8 | 9 | function moveCursor(e){ 10 | let x=e.clientX; 11 | let y=e.clientY; 12 | 13 | innerCursorRef.current.style.left=`${x}px` 14 | innerCursorRef.current.style.top=`${y}px` 15 | 16 | outerCursorRef.current.style.left=`${x}px` 17 | outerCursorRef.current.style.top=`${y}px` 18 | let links=Array.from(document.querySelectorAll('a')) 19 | links.forEach((link)=>{ 20 | link.addEventListener('mousemove',()=>{ 21 | innerCursorRef.current.classList.add("grow") 22 | }) 23 | link.addEventListener('mouseleave',()=>{ 24 | innerCursorRef.current.classList.remove("grow") 25 | }) 26 | }) 27 | } 28 | },[innerCursorRef,outerCursorRef]) 29 | } 30 | -------------------------------------------------------------------------------- /src/components/Socials.js: -------------------------------------------------------------------------------- 1 | import { useRef } from "react"; 2 | import { useSocialReveal } from "../Hooks/gsap"; 3 | const data = [ 4 | { 5 | id: 1, 6 | title: "Facebook", 7 | url: "https://www.facebook.com/rafiulislam.rafi.1234/", 8 | }, 9 | 10 | { 11 | id: 2, 12 | title: "Github", 13 | url: "https://github.com/Rafiul29", 14 | }, 15 | { 16 | id: 3, 17 | title: "LinkedIn", 18 | url: "https://www.linkedin.com/in/md-rafiul-islam-a70699184/", 19 | }, 20 | { 21 | id: 4, 22 | title: "Twitter", 23 | url: "", 24 | }, 25 | ]; 26 | 27 | const Socials = () => { 28 | 29 | const socialRef=useRef(null) 30 | useSocialReveal(socialRef,2) 31 | return ( 32 |
33 | {data.map((social) => ( 34 | 36 | {social.title} 37 | 38 | ))} 39 |
40 | ); 41 | }; 42 | 43 | export default Socials; 44 | -------------------------------------------------------------------------------- /src/App.js: -------------------------------------------------------------------------------- 1 | import { useRef } from "react"; 2 | import { Routes, Route } from "react-router-dom"; 3 | import CustomCursor from "./components/CustomCursor"; 4 | import Footer from "./components/Footer"; 5 | import Home from "./components/Home"; 6 | import Navbar from "./components/Navbar"; 7 | import Socials from "./components/Socials"; 8 | import { useCustomCursor } from "./Hooks/useCustomCursor"; 9 | import { useSmoothScroll } from "./Hooks/useSmoothScroll"; 10 | 11 | import { ToastContainer } from 'react-toastify' 12 | import 'react-toastify/dist/ReactToastify.min.css'; 13 | 14 | const App = () => { 15 | const innerCursorRef = useRef(null); 16 | const outerCursorRef = useRef(null); 17 | 18 | useSmoothScroll(); 19 | useCustomCursor(innerCursorRef, outerCursorRef); 20 | 21 | return ( 22 |
23 |
24 | 28 | 29 | 30 | 31 | 32 | } /> 33 | 34 | 35 |
37 | ); 38 | }; 39 | 40 | export default App; 41 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "portfolio", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "@emailjs/browser": "^3.10.0", 7 | "@studio-freight/lenis": "^0.2.21", 8 | "@testing-library/jest-dom": "^5.16.5", 9 | "@testing-library/react": "^13.4.0", 10 | "@testing-library/user-event": "^13.5.0", 11 | "gsap": "^3.11.4", 12 | "hover-effect": "^1.1.0", 13 | "react": "^18.2.0", 14 | "react-dom": "^18.2.0", 15 | "react-router-dom": "^6.8.0", 16 | "react-router-hash-link": "^2.4.3", 17 | "react-scripts": "5.0.1", 18 | "react-toastify": "^9.1.3", 19 | "three": "^0.149.0", 20 | "web-vitals": "^2.1.4" 21 | }, 22 | "scripts": { 23 | "start": "react-scripts start", 24 | "build": "react-scripts build", 25 | "test": "react-scripts test", 26 | "eject": "react-scripts eject" 27 | }, 28 | "eslintConfig": { 29 | "extends": [ 30 | "react-app", 31 | "react-app/jest" 32 | ] 33 | }, 34 | "browserslist": { 35 | "production": [ 36 | ">0.2%", 37 | "not dead", 38 | "not op_mini all" 39 | ], 40 | "development": [ 41 | "last 1 chrome version", 42 | "last 1 firefox version", 43 | "last 1 safari version" 44 | ] 45 | }, 46 | "devDependencies": { 47 | "tailwindcss": "^3.2.4" 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/components/Hero.js: -------------------------------------------------------------------------------- 1 | import React, { useRef } from "react"; 2 | import { useHoverEffect } from "../Hooks/useHoverEffect"; 3 | import {useImageReveal,useHeadLineReveal} from "../Hooks/gsap" 4 | const Hero = () => { 5 | const data = { 6 | img1: "https://res.cloudinary.com/dgjjgijyu/image/upload/v1675868936/portfolio-project/hero-1_tjrcuk.jpg", 7 | img2: "https://res.cloudinary.com/dgjjgijyu/image/upload/v1675868832/portfolio-project/hero-2_ewchqt.png", 8 | }; 9 | 10 | const heroImageRef = useRef(null); 11 | 12 | const heroHeadLine1Ref = useRef(null); 13 | const heroHeadLine2Ref = useRef(null); 14 | const headlines=[heroHeadLine1Ref,heroHeadLine2Ref] 15 | useHoverEffect(heroImageRef, data.img1, data.img2); 16 | useImageReveal(heroImageRef,0.5) 17 | useHeadLineReveal(headlines,1.5) 18 | return ( 19 |
20 |
21 |
22 |

Font-End

23 |
24 |
25 |

Developer

26 |
27 |
28 |
29 |
30 | ); 31 | }; 32 | 33 | export default Hero; 34 | -------------------------------------------------------------------------------- /src/components/About.js: -------------------------------------------------------------------------------- 1 | import React, { useRef } from 'react' 2 | import { useHoverEffect } from '../Hooks/useHoverEffect' 3 | import SectionTitle from './SectionTitle' 4 | 5 | import { useProjectLeftrightReveal } from '../Hooks/gsap' 6 | const data={ 7 | img1:"https://res.cloudinary.com/dgjjgijyu/image/upload/v1675865685/portfolio-project/about-1_jbpixu.jpg", 8 | img2:"https://res.cloudinary.com/dgjjgijyu/image/upload/v1675865996/portfolio-project/about-2_zbmidh.jpg" 9 | } 10 | const About = () => { 11 | const aboutLeftRef=useRef(null) 12 | const aboutRightRef=useRef(null) 13 | 14 | const aboutRefs=[aboutLeftRef,aboutRightRef] 15 | useHoverEffect(aboutLeftRef,data.img1,data.img2) 16 | 17 | useProjectLeftrightReveal(aboutRefs) 18 | 19 | return ( 20 |
21 | 22 |
23 |
24 |
25 |

I am a front-end developer focusing on React and Redux, with a strong emphasis on Tailwind CSS. This portfolio website showcases my skills and projects as a web developer, and provides a platform for potential clients and employers to learn more about me and my work.

26 |

Whether you are looking for a new web developer for your team or just interested in my work, this portfolio website provides a comprehensive look at my skills and experience. If you have any questions or would like to learn more about my work, please feel free to reach out via the contact form on the website.

27 | 33 | Resume 34 | 35 |
36 |
37 |
38 | ) 39 | } 40 | 41 | export default About -------------------------------------------------------------------------------- /src/components/Navbar.js: -------------------------------------------------------------------------------- 1 | import { useRef } from "react"; 2 | import { HashLink } from "react-router-hash-link"; 3 | import { useLinkReveal } from "../Hooks/gsap"; 4 | const Navbar = ({ footerNav }) => { 5 | const link1Ref = useRef(null); 6 | const link2Ref = useRef(null); 7 | const link3Ref = useRef(null); 8 | const link4Ref = useRef(null); 9 | const link5Ref = useRef(null); 10 | const link6Ref = useRef(null); 11 | const link7Ref = useRef(null); 12 | const links = [ 13 | link1Ref, 14 | link2Ref, 15 | link3Ref, 16 | link4Ref, 17 | link5Ref, 18 | link6Ref, 19 | link7Ref, 20 | ]; 21 | useLinkReveal(links, 2); 22 | 23 | return ( 24 | 75 | ); 76 | }; 77 | 78 | export default Navbar; 79 | -------------------------------------------------------------------------------- /src/components/Project.js: -------------------------------------------------------------------------------- 1 | import { useRef } from "react"; 2 | import { useHoverEffect } from "../Hooks/useHoverEffect"; 3 | import { useProjectLeftrightReveal } from "../Hooks/gsap"; 4 | const Project = ({ project }) => { 5 | 6 | const projectRightRef = useRef(null); 7 | const projectLeftRef = useRef(null); 8 | 9 | const projectRefs = [projectRightRef, projectLeftRef]; 10 | 11 | useHoverEffect(projectRightRef, project.img1, project.img2); 12 | 13 | useProjectLeftrightReveal(projectRefs); 14 | 15 | return ( 16 |
17 |
21 | 22 | {String(project.id).padStart(2, 0)} 23 | 24 |

25 | {project.title} 26 |

27 |

{project.describe}

28 | 29 | {project.tools.map((tool, i) => ( 30 | {tool} 31 | ))} 32 | 33 |
34 | 40 | Live Site 41 | 42 | 43 | 49 | Font-End code 50 | 51 | 52 | {project.backEndLink && ( 53 | 59 | Back-End Code 60 | 61 | )} 62 |
63 |
64 |
68 |
69 | ); 70 | }; 71 | 72 | export default Project; 73 | -------------------------------------------------------------------------------- /src/components/Skils.js: -------------------------------------------------------------------------------- 1 | import { useRef } from "react"; 2 | 3 | import SectionTitle from "./SectionTitle"; 4 | 5 | import {useSkillLineReveal,useSkillTextReveal} from "../Hooks/gsap" 6 | const data = [ 7 | { id: 1, skill: "HTML" }, 8 | { id: 2, skill: "CSS" }, 9 | { id: 3, skill: "Bootstrap" }, 10 | { id: 4, skill: "Tailwind CSS" }, 11 | { id: 5, skill: "JavaScript" }, 12 | { id: 6, skill: "React.Js" }, 13 | { id: 7, skill: "Redux.js" }, 14 | { id: 8, skill: "Redux Toolkit" }, 15 | { id: 9, skill: "Axios" }, 16 | { id: 10, skill: "Gsap" }, 17 | { id: 11, skill: "Firebase" }, 18 | { id: 12, skill: "Next.Js" }, 19 | { id: 13, skill: "Mongoose" }, 20 | { id: 14, skill: "Prisma" }, 21 | { id: 15, skill: "Express.Js"}, 22 | { id: 16, skill: "Node.Js" }, 23 | { id: 17, skill: "Git" }, 24 | { id: 18, skill: "GitHub" }, 25 | 26 | ]; 27 | 28 | const Skils = () => { 29 | const skillItemRef = useRef([]); 30 | const skillTextRef = useRef([]); 31 | 32 | const skillItem2Ref = useRef([]); 33 | const skillText2Ref = useRef([]); 34 | 35 | useSkillLineReveal(skillItemRef.current) 36 | useSkillLineReveal(skillItem2Ref.current) 37 | 38 | useSkillTextReveal(skillTextRef.current) 39 | useSkillTextReveal(skillText2Ref.current) 40 | return ( 41 |
42 | 43 |
44 |
    45 | {data 46 | .filter((_, i) => i < Math.floor(data.length / 2)) 47 | .map((skill, i) => ( 48 |
  • (skillItemRef.current[i] = el)} 52 | > 53 |
    (skillTextRef.current[i] = el)} 56 | > 57 | 58 | {String(skill.id).padStart(2, 0).padEnd(3, ".")} 59 | 60 | {skill.skill} 61 |
    62 |
  • 63 | ))} 64 |
65 |
    66 | {data 67 | .filter((_, i) => i >= Math.floor(data.length / 2)) 68 | .map((skill, i) => ( 69 |
  • (skillItem2Ref.current[i] = el)} 73 | > 74 |
    (skillText2Ref.current[i] = el)} 77 | > 78 | 79 | {String(skill.id).padStart(2, 0).padEnd(3, ".")} 80 | 81 | {skill.skill} 82 |
    83 |
  • 84 | ))} 85 |
86 |
87 |
88 | ); 89 | }; 90 | 91 | export default Skils; 92 | -------------------------------------------------------------------------------- /src/components/Projects.js: -------------------------------------------------------------------------------- 1 | import Project from "./Project"; 2 | import SectionTitle from "./SectionTitle"; 3 | 4 | const data = [ 5 | { 6 | id: 1, 7 | title: 8 | "React shopping -tech alpha Electroinc store web application", 9 | img1: "https://res.cloudinary.com/dgjjgijyu/image/upload/v1675860786/portfolio-project/tech-alpha-01_qtc6qh.png", 10 | img2: "https://res.cloudinary.com/dgjjgijyu/image/upload/v1675860785/portfolio-project/tech-alpha-02_engilf.png", 11 | describe: 12 | "This repository contains the code for a React e-commerce shopping cart application, implemented using Redux Toolkit and data fetching with Redux Thunk. The shopping cart uses local storage to save data and display items in the browser.", 13 | tools: ["React js", "Redux", "Redux Toolkit", "Redux Thunk", "Tailwind CSS"], 14 | liveLink: "https://rafiul-tech-alpha.netlify.app/", 15 | fontEndLink: "https://github.com/Rafiul29/tech-alpha.git", 16 | }, 17 | 18 | { 19 | id: 2, 20 | title: 21 | "Proxima | Project Management App", 22 | img1: "https://res.cloudinary.com/dgjjgijyu/image/upload/c_limit,f_jpg,fl_lossy.any_format.preserve_transparency.progressive,h_1600,pg_1,q_auto,w_1600/v1/portfolio-project/proxima-1", 23 | img2: "https://res.cloudinary.com/dgjjgijyu/image/upload/c_limit,f_jpg,fl_lossy.any_format.preserve_transparency.progressive,h_1600,pg_1,q_auto,w_1600/v1/portfolio-project/proxima-2", 24 | describe: 25 | "Pormixa is an innovative project management app that helps users manage their projects with ease. With its powerful CRUD (Create, Read, Update, Delete) operations and intuitive interface, Pormixa allows users to create, update, and delete projects effortlessly. Pormixa uses JWT authentication, which allows only authorized users to access the app's features. ", 26 | tools: ["React","Express","Mongodb","Context-api","Tailwind CSS", ], 27 | liveLink: "https://rafiul-proxima.netlify.app/", 28 | fontEndLink: "https://github.com/Rafiul29/proxima-client.git", 29 | backEndLink: "https://github.com/Rafiul29/proxima-server.git", 30 | 31 | }, 32 | 33 | { 34 | id: 3, 35 | title: 36 | "Cyberbullying-Cyber | Stand Up Against Cyberbullying.", 37 | img1: "https://res.cloudinary.com/dgjjgijyu/image/upload/v1675864972/portfolio-project/Cyberbulling-1_h9kqmx.png", 38 | img2: "https://res.cloudinary.com/dgjjgijyu/image/upload/v1675864971/portfolio-project/cyerBulling-2_seq9nc.png", 39 | describe: 40 | "This is a website about cyberbullying, providing information and resources on the topic. The website aims to raise awareness about cyberbullying, its effects, and ways to prevent and address it. The site includes educational content, tips for staying safe online, and resources for individuals and families affected by cyberbullying.", 41 | tools: ["React", "Tailwind CSS", "Gsap", ], 42 | liveLink: "https://rafiul-cyberbullying.netlify.app/", 43 | fontEndLink: "https://github.com/Rafiul29/cyberbullying.git", 44 | 45 | }, 46 | ]; 47 | const Projects = () => { 48 | return ( 49 |
50 | 51 |
52 | {data.map((project) => ( 53 | 54 | ))} 55 |
56 |
57 | ); 58 | }; 59 | 60 | export default Projects; 61 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Getting Started with Create React App 2 | 3 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). 4 | 5 | ## Available Scripts 6 | 7 | In the project directory, you can run: 8 | 9 | ### `npm start` 10 | 11 | Runs the app in the development mode.\ 12 | Open [http://localhost:3000](http://localhost:3000) to view it in your browser. 13 | 14 | The page will reload when you make changes.\ 15 | You may also see any lint errors in the console. 16 | 17 | ### `npm test` 18 | 19 | Launches the test runner in the interactive watch mode.\ 20 | See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. 21 | 22 | ### `npm run build` 23 | 24 | Builds the app for production to the `build` folder.\ 25 | It correctly bundles React in production mode and optimizes the build for the best performance. 26 | 27 | The build is minified and the filenames include the hashes.\ 28 | Your app is ready to be deployed! 29 | 30 | See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. 31 | 32 | ### `npm run eject` 33 | 34 | **Note: this is a one-way operation. Once you `eject`, you can't go back!** 35 | 36 | If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. 37 | 38 | Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own. 39 | 40 | You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it. 41 | 42 | ## Learn More 43 | 44 | You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). 45 | 46 | To learn React, check out the [React documentation](https://reactjs.org/). 47 | 48 | ### Code Splitting 49 | 50 | This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting) 51 | 52 | ### Analyzing the Bundle Size 53 | 54 | This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size) 55 | 56 | ### Making a Progressive Web App 57 | 58 | This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app) 59 | 60 | ### Advanced Configuration 61 | 62 | This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration) 63 | 64 | ### Deployment 65 | 66 | This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) 67 | 68 | ### `npm run build` fails to minify 69 | 70 | This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify) 71 | -------------------------------------------------------------------------------- /src/components/Contact.js: -------------------------------------------------------------------------------- 1 | import React, { useRef } from "react"; 2 | import SectionTitle from "./SectionTitle"; 3 | import {useInputFieldReveal} from "../Hooks/gsap" 4 | import emailjs from "@emailjs/browser" 5 | import { toast } from 'react-toastify'; 6 | 7 | 8 | const Contact = () => { 9 | 10 | const formRef=useRef(null) 11 | 12 | const nameRef=useRef(null) 13 | const emailRef=useRef(null) 14 | const messageRef=useRef(null) 15 | const btnRef=useRef(null) 16 | 17 | const contactFieldRef=[nameRef,emailRef,messageRef,btnRef] 18 | 19 | useInputFieldReveal(contactFieldRef,1.5) 20 | 21 | const sendEmail=(e)=>{ 22 | e.preventDefault() 23 | 24 | //emailjs integration 25 | emailjs.sendForm(process.env.REACT_APP_SERVICE_ID, 26 | process.env.REACT_APP_TEMPLATE_ID, 27 | formRef.current, 28 | process.env.REACT_APP_PUBLIC_ID 29 | ).then(()=>{ 30 | 31 | toast.success('🦄 Message Send Success', { 32 | position: "bottom-left", 33 | autoClose: 5000, 34 | hideProgressBar: false, 35 | closeOnClick: true, 36 | pauseOnHover: true, 37 | draggable: true, 38 | progress: undefined, 39 | theme: "colored", 40 | }); 41 | },()=>{ 42 | toast.error('🦄 Message Not Send Success', { 43 | position: "bottom-left", 44 | autoClose: 5000, 45 | hideProgressBar: false, 46 | closeOnClick: true, 47 | pauseOnHover: true, 48 | draggable: true, 49 | progress: undefined, 50 | theme: "colored", 51 | }); 52 | }) 53 | 54 | //reset 55 | e.target.querySelector(".fullname").value="" 56 | e.target.querySelector(".email").value="" 57 | e.target.querySelector(".message").value="" 58 | } 59 | 60 | return ( 61 |
62 | 63 | 64 |
67 |
68 | 75 |
76 |
77 | 84 |
85 |
86 |