├── .eslintrc.json
├── .gitignore
├── LICENSE
├── README.md
├── Screenshot 2023-08-06 131904.png
├── blogList.txt
├── components
└── buttons
│ ├── AnimatedButton.jsx
│ └── BackTo.jsx
├── constants
├── AppsData.js
├── BlogsData.js
├── EducationData.js
├── ExperienceData.jsx
├── JourneyData.js
├── NavbarData.js
├── NewsData.js
├── ProjectsData.js
├── SkillsData.js
├── SocialMediaData.js
└── index.js
├── context
└── themeContext.js
├── contextApi
└── PortfolioContext.jsx
├── database
└── connect.js
├── jsconfig.json
├── layout
├── footer
│ └── Footer.jsx
└── navbar
│ ├── Navbar.jsx
│ ├── NavbarItems.js
│ ├── NavbarMobile.jsx
│ └── SidebarMobile.jsx
├── models
├── feedback.js
└── mail.js
├── next.config.js
├── package-lock.json
├── package.json
├── pages
├── _app.js
├── _document.js
├── api
│ ├── chatgpt.js
│ ├── feedback
│ │ └── new.js
│ ├── mail
│ │ └── new.js
│ ├── masonary.js
│ ├── news.js
│ └── translate.js
├── apps
│ ├── apna-chat-gpt.jsx
│ ├── hindi-translator.jsx
│ ├── music-chalao.jsx
│ ├── news-app.jsx
│ ├── quiz-app.jsx
│ └── tic-tac-toe.jsx
├── blogs.jsx
├── blogs
│ ├── css
│ │ ├── blend-mode.jsx
│ │ ├── css-animation.jsx
│ │ ├── css-grid.jsx
│ │ ├── css-rare-selectors.jsx
│ │ ├── css-transform.jsx
│ │ ├── linear-gradient.jsx
│ │ └── object-fit.jsx
│ ├── javascript
│ │ ├── Hoisting.jsx
│ │ ├── closure.jsx
│ │ ├── debouncing.jsx
│ │ ├── letVarConst.jsx
│ │ ├── spreadOperator.jsx
│ │ └── throttling.jsx
│ ├── others
│ │ ├── github-pages-deployment.jsx
│ │ ├── readme.jsx
│ │ ├── send-email.jsx
│ │ └── why-next.jsx
│ └── react
│ │ ├── component-life-cycle.jsx
│ │ ├── drag-and-drop.jsx
│ │ ├── fragment.jsx
│ │ ├── react-masonary.jsx
│ │ ├── react-res-carousel.jsx
│ │ ├── useEffect.jsx
│ │ ├── useState.jsx
│ │ └── virtual-dom.jsx
└── index.js
├── postcss.config.js
├── public
├── favicon.ico
├── images
│ ├── admin-dashboard.png
│ ├── apna-chat-gpt-l.png
│ ├── apna-chat-gpt.png
│ ├── carousel1.png
│ ├── carousel2.png
│ ├── carousel3.png
│ ├── cartoon 0.png
│ ├── chat-gpt.ico
│ ├── circle.png
│ ├── developer.png
│ ├── ecommerce.png
│ ├── hii.png
│ ├── hindi-translator-l.png
│ ├── hindi-translator.ico
│ ├── hindi-translator.png
│ ├── male.png
│ ├── news-app-l.png
│ ├── news-app.ico
│ ├── news-app.png
│ ├── quiz-app-l.png
│ ├── quiz-app.ico
│ ├── quiz-app.png
│ ├── room.jpg
│ ├── salon-application.png
│ ├── screen1.png
│ ├── screen2.png
│ ├── tic-tac-toe-l.png
│ ├── tic-tac-toe.ico
│ ├── tic-tac-toe.png
│ ├── welcome-screen.png
│ ├── x.png
│ └── youtube-clone.png
├── next.svg
└── vercel.svg
├── sections
├── Apps.jsx
├── Intro.jsx
├── LatestBlogs.jsx
├── Projects.jsx
├── Skills.jsx
├── about.jsx
├── education.jsx
├── experience.jsx
└── journeyParts
│ ├── College.jsx
│ ├── FirstInternship.jsx
│ ├── Iit.jsx
│ ├── School.jsx
│ ├── SecondInternship.jsx
│ ├── YouTube.jsx
│ └── index.js
├── styles
├── Home.module.css
├── animation.css
├── cssGrid.css
└── globals.css
├── tailwind.config.js
└── utils
├── ChatSystem.jsx
├── Feedback.jsx
├── Resume.jsx
├── SendMail.jsx
├── ShoveeModal.jsx
├── SocialMedia.jsx
└── Theme.jsx
/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": ["next/core-web-vitals"],
3 | "rules": {
4 | "no-multiple-empty-lines": ["error", { "max": 2 }],
5 | "import/no-duplicates": "error",
6 | "import/order": [
7 | "error",
8 | {
9 | "groups": [["builtin", "external"], "internal", ["parent", "sibling", "index"]],
10 | "newlines-between": "always"
11 | }
12 | ],
13 | "quotes": ["error", "double"],
14 | "react/jsx-max-props-per-line": ["error", { "maximum": 3 }],
15 | "react/jsx-sort-props": ["error", { "ignoreCase": true }],
16 | "react/self-closing-comp": "error"
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/.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 | # next.js
12 | /.next/
13 | /out/
14 |
15 | # production
16 | /build
17 |
18 | # misc
19 | .DS_Store
20 | *.pem
21 |
22 | # debug
23 | npm-debug.log*
24 | yarn-debug.log*
25 | yarn-error.log*
26 |
27 | # local env files
28 | .env*.local
29 |
30 | # vercel
31 | .vercel
32 |
33 | # typescript
34 | *.tsbuildinfo
35 | next-env.d.ts
36 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2023 Shivraj
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 |
--------------------------------------------------------------------------------
/Screenshot 2023-08-06 131904.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iamshiv007/NextJS-Portfolio/117b48acd745ea5112462fe4e36d92358b9da7dc/Screenshot 2023-08-06 131904.png
--------------------------------------------------------------------------------
/blogList.txt:
--------------------------------------------------------------------------------
1 | 1. Why Next JS
2 |
3 | 2. CSS Transform
4 |
5 | 3. background-blend-mode
6 |
7 | 4. Css Rare Selector
8 |
9 | 5. Hoisting in JavaScript
10 |
11 | 6. React Responsive Carousel
12 |
13 | 7. CSS Animation
14 |
15 | 8. Object Fit
16 |
17 | 9. linear-gradient
18 |
19 | 10. How to send a email with attachment in node js
20 |
21 | 11. Tic-Tac-Toe
22 |
23 | 12. Drag And Drop
24 |
25 | 13. React Masonary
26 |
27 | 14. Css Grid
28 |
29 | 15. Deployment on Github Pages
30 |
31 | 16. Readme file syntax
32 |
33 | 17. Quiz App
34 |
35 | 18. Hindi Translator
36 |
37 | 19. Apna Chat gpt
38 |
39 | 20 News App
40 |
41 | 20 Music Chalao
42 |
43 | 21 closure in Javasript
44 |
45 | 22. Debouncing in JavaScript
46 |
47 | 23. Throttling in javascript
48 |
49 | 23. Rest and Spread Operator in javascript
50 |
51 | 24. let, var and const
52 |
53 | 25. Component Life Cycle
54 |
55 | 26. useEffect in React
56 |
57 | 27. useState in React
58 |
59 | 28. Virtual DOM in React
60 |
61 | 29. Fragment in React
--------------------------------------------------------------------------------
/components/buttons/AnimatedButton.jsx:
--------------------------------------------------------------------------------
1 | import Link from "next/link";
2 | import { motion } from "framer-motion";
3 |
4 | const AnimatedButton = () => (
5 |
6 |
16 | Explore All Blogs
17 |
18 |
19 | );
20 |
21 | export default AnimatedButton;
22 |
--------------------------------------------------------------------------------
/components/buttons/BackTo.jsx:
--------------------------------------------------------------------------------
1 | import React, { Fragment } from "react";
2 | import Link from "next/link";
3 | import { HiArrowNarrowLeft } from "react-icons/hi";
4 |
5 | const BackTo = ({ backTo }) => {
6 | return (
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | Back to {backTo === "" ? "Home" : backTo}
15 |
16 |
17 |
18 |
19 | );
20 | };
21 |
22 | export default BackTo;
23 |
--------------------------------------------------------------------------------
/constants/AppsData.js:
--------------------------------------------------------------------------------
1 | export const AppsData = [
2 | {
3 | name: "Tic-Tac-Toe",
4 | imageUrl: "/images/tic-tac-toe.png",
5 | imageLight: "/images/tic-tac-toe-l.png",
6 | iconUrl: "/images/tic-tac-toe.ico",
7 | linkName: "apps/tic-tac-toe",
8 | date: "June 9, 2023",
9 | },
10 | {
11 | name: "Quiz App",
12 | imageUrl: "/images/quiz-app.png",
13 | imageLight: "/images/quiz-app-l.png",
14 | iconUrl: "/images/quiz-app.ico",
15 | linkName: "apps/quiz-app",
16 | date: "June 20, 2023",
17 | },
18 | {
19 | name: "Translator",
20 | imageUrl: "/images/hindi-translator.png",
21 | imageLight: "/images/hindi-translator-l.png",
22 | iconUrl: "/images/hindi-translator.ico",
23 | linkName: "apps/hindi-translator",
24 | date: "June 21, 2023",
25 | },
26 | {
27 | name: "Chat GPT",
28 | imageUrl: "/images/apna-chat-gpt.png",
29 | imageLight: "/images/apna-chat-gpt-l.png",
30 | iconUrl: "/images/chat-gpt.ico",
31 | linkName: "apps/apna-chat-gpt",
32 | date: "June 22, 2023",
33 | },
34 | {
35 | name: "News App",
36 | imageUrl: "/images/news-app.png",
37 | imageLight: "/images/news-app-l.png",
38 | iconUrl: "/images/news-app.ico",
39 | linkName: "apps/news-app",
40 | date: "June 23, 2023",
41 | },
42 | ];
43 |
--------------------------------------------------------------------------------
/constants/BlogsData.js:
--------------------------------------------------------------------------------
1 | export const BlogsData = [
2 | {
3 | name: "Why we should move in to Next js",
4 | imageUrl:
5 | "https://images.prismic.io/launchdarkly/6bfcaa10-40a3-42a5-9346-9e83d25cbeb4_What's%20So%20Great%20About%20Next.js.png?ixlib=gatsbyFP&auto=compress%2Cformat&fit=max&rect=0%2C0%2C4000%2C2252&w=2000&h=1126",
6 | linkName: "others/why-next",
7 | date: "Aprile 17, 2023",
8 | },
9 | {
10 | name: "CSS transform property",
11 | imageUrl:
12 | "https://tenten.vn/tin-tuc/wp-content/uploads/2022/05/css_transform-4.png",
13 | linkName: "css/css-transform",
14 | date: "May 29, 2023",
15 | },
16 | {
17 | name: "CSS background-blend-mode",
18 | imageUrl:
19 | "https://d33wubrfki0l68.cloudfront.net/a9e6f9b548512fc1e81455a6ca2d59e273d41bda/668f7/assets/images/blending-examples.png",
20 | linkName: "css/blend-mode",
21 | date: "May 30, 2023",
22 | },
23 | {
24 | name: "CSS Rare Selectors",
25 | imageUrl:
26 | "https://internetingishard.netlify.app/css-selectors-1f0064.464e0c0e.png",
27 | linkName: "css/css-rare-selectors",
28 | date: "May 31, 2023",
29 | },
30 | {
31 | name: "Hoisting In Javasript",
32 | imageUrl:
33 | "https://cdn.hashnode.com/res/hashnode/image/upload/v1612248117684/PTiy4Ga2n.jpeg?w=1600&h=840&fit=crop&crop=entropy&auto=compress,format&format=webpy",
34 | linkName: "javascript/Hoisting",
35 | date: "June 1, 2023",
36 | },
37 | {
38 | name: "React Responsive carousel",
39 | imageUrl:
40 | "https://reactscript.com/wp-content/uploads/2016/07/React.js-Responsive-Carousel.png",
41 | linkName: "react/react-res-carousel",
42 | date: "June 2, 2023",
43 | },
44 | {
45 | name: "CSS Animation",
46 | imageUrl:
47 | "https://res.cloudinary.com/practicaldev/image/fetch/s--rNSGibyc--/c_imagga_scale,f_auto,fl_progressive,h_420,q_auto,w_1000/https://dev-to-uploads.s3.amazonaws.com/i/54ydb37tzyny06ac8xdf.jpg",
48 | linkName: "css/css-animation",
49 | date: "June 5, 2023",
50 | },
51 | {
52 | name: "object-fit",
53 | imageUrl:
54 | "https://webdesign-trends.net/wp/wp-content/uploads/2020/05/object-fit-tate02-1024x697.png",
55 | linkName: "css/object-fit",
56 | date: "June 6, 2023",
57 | },
58 | {
59 | name: "linear-gradient",
60 | imageUrl:
61 | "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRxVjbf9Rf5VEHP_D6IiUYOksUi2OgEzhg2ny5DkeV5kA&usqp=CAU&ec=48600112",
62 | linkName: "css/linear-gradient",
63 | date: "June 7, 2023",
64 | },
65 | {
66 | name: "How to send a email with attachment in node js",
67 | imageUrl:
68 | "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcR1IqjYMScfJK41xjyEnKWgYs2DgTON4QyWKkwQ3Qpmkw&usqp=CAU&ec=48600112",
69 | linkName: "others/send-email",
70 | date: "June 8, 2023",
71 | },
72 |
73 | {
74 | name: "Drag And Drop",
75 | imageUrl:
76 | "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSvf3LxW2yGYlBT15yJsQmnXbGTSl-Q2_nKkZLJrvU2Hg&usqp=CAU&ec=48600112",
77 | linkName: "apps/drag-and-drop",
78 | date: "June 15, 2023",
79 | },
80 | {
81 | name: "React Masonary",
82 | imageUrl:
83 | "https://reactjsexample.com/content/images/2018/11/React-Photo-Gallery.jpg",
84 | linkName: "react/react-masonary",
85 | date: "June 16, 2023",
86 | },
87 | {
88 | name: "Css Grid",
89 | imageUrl:
90 | "https://www.freecodecamp.org/news/content/images/size/w2000/2022/05/CSS-GRID-3.png",
91 | linkName: "css/css-grid",
92 | date: "June 16, 2023",
93 | },
94 | {
95 | name: "Deployment on Github Pages",
96 | imageUrl:
97 | "https://soshace.com/wp-content/uploads/2019/05/the-ultimate-guide-to-github-pages-main.jpg",
98 | linkName: "others/github-pages-deployment",
99 | date: "June 18, 2023",
100 | },
101 | {
102 | name: "Readme file syntax",
103 | imageUrl:
104 | "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQfYZKGMNHktg0e4wVK9TNS22qijcqvYg0QmJYp-Hp7Wg&usqp=CAU&ec=48600112",
105 | linkName: "others/readme",
106 | date: "June 19, 2023",
107 | },
108 | {
109 | name: "Music Chalao",
110 | imageUrl:
111 | "https://thumbs.dreamstime.com/b/news-newspapers-folded-stacked-word-wooden-block-puzzle-dice-concept-newspaper-media-press-release-42301371.jpg",
112 | linkName: "apps/music-chalao",
113 | date: "June 25, 2023",
114 | },
115 | {
116 | name: "Closure in Javascript",
117 | imageUrl:
118 | "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSxuSU_XV8gfjdse5Pl4LyDnVpmLvNEbjiii3yhgmLj_A&usqp=CAU&ec=48600112",
119 | linkName: "javascript/closure",
120 | date: "June 26, 2023",
121 | },
122 | {
123 | name: "Debouncing in Javascript",
124 | imageUrl:
125 | "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQFNt-rL1StGYk10YCMxez5SnHolxHC82nsVrNyBDjcJw&usqp=CAU&ec=48600112",
126 | linkName: "javascript/debouncing",
127 | date: "June 27, 2023",
128 | },
129 | {
130 | name: "Throttling in Javascript",
131 | imageUrl:
132 | "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSDXKGVPWZR3E56lLvZde0pb_uGNkq6A_UFQw&usqp=CAU",
133 | linkName: "javascript/throttling",
134 | date: "June 28, 2023",
135 | },
136 | {
137 | name: "Rest and Spread Operator",
138 | imageUrl:
139 | "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcS1i7928wer2C-LN0mx0bdsp88row0sCsjREw&usqp=CAU",
140 | linkName: "javascript/spreadOperator",
141 | date: "June 29, 2023",
142 | },
143 | {
144 | name: "Let Var and Const",
145 | imageUrl:
146 | "https://blogger.googleusercontent.com/img/a/AVvXsEjtvbXJQa3o7dsXB27ED6xiA2DlUTEG1eTDaT1wK_cUtLRwoMHBhTeNSimGv9v5d0Fh92nRW02lze1jjhP0CoSEgwdJ2zztMg0QMQuCZrOc4hHsBafBsinTRrkee7O1qcjEY5D5H5sQW-uapZX_DXxIpgtOAamuqtEQkKBiNEgIutlFy989AhyiuTWI=w1200-h630-p-k-no-nu",
147 | linkName: "javascript/letVarConst",
148 | date: "June 30, 2023",
149 | },
150 | {
151 | name: "Component Life Cycle",
152 | imageUrl:
153 | "https://cdn-media-1.freecodecamp.org/images/1*_drMYY_IEgboMS4RhvC-lQ.png",
154 | linkName: "react/component-life-cycle",
155 | date: "July 3, 2023",
156 | },
157 | {
158 | name: "useEffect in React",
159 | imageUrl:
160 | "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSbhezzFR6qB93F9NaClSY5oCFZ1wg4j0YQww&usqp=CAU",
161 | linkName: "react/useEffect",
162 | date: "July 4, 2023",
163 | },
164 | {
165 | name: "useState in React",
166 | imageUrl:
167 | "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRYTiTHUjDbI_QrgGMU6NWTtrjV161GoAzxUQ&usqp=CAU",
168 | linkName: "react/useState",
169 | date: "July 5, 2023",
170 | },
171 | {
172 | name: "Virtual DOM in React",
173 | imageUrl:
174 | "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRQYGau3eAtYMcIqqrHk2U1CR39SCnyhywjHA&usqp=CAU",
175 | linkName: "react/virtual-dom",
176 | date: "July 6, 2023",
177 | },
178 | {
179 | name: "Fragment In React",
180 | imageUrl:
181 | "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcT77S6c9Tlz-zqWRRPgKeJDd8kSjbR_alp30g&usqp=CAU",
182 | linkName: "react/fragment",
183 | date: "July 7, 2023",
184 | },
185 | ];
186 |
--------------------------------------------------------------------------------
/constants/EducationData.js:
--------------------------------------------------------------------------------
1 | export const EducationData = [
2 | {
3 | name: "Bachelor of Science",
4 | image:
5 | "http://res.cloudinary.com/dhixp5pnk/image/upload/v1696219056/edekjqivqlnsyg8pfmxw.png",
6 | schoolOrCollege: "GOVERNMENT COLLEGE, KOTA",
7 | fromTo: "2021 - 2022",
8 | statusOrPrecentage: "Dropped in second year",
9 | },
10 | {
11 | name: "Senior Secondary Examination",
12 | image:
13 | "http://res.cloudinary.com/dhixp5pnk/image/upload/v1696219649/jkjfvdlxjntnyrxs57ia.png",
14 | schoolOrCollege: "SWAMI TEONRAM ALOK SR. SEC. SCHOOL DADABARI, KOTA",
15 | fromTo: "2021",
16 | statusOrPrecentage: "96.80 %",
17 | },
18 | {
19 | name: "Secondary Examination",
20 | image:
21 | "http://res.cloudinary.com/dhixp5pnk/image/upload/v1696219649/tnverjapfr4slg7fnfcw.png",
22 | schoolOrCollege: "A.V.M. SECONDARY SCHOOL, RAWATBHATA",
23 | fromTo: "2019",
24 | statusOrPrecentage: "93.33%",
25 | },
26 | ];
--------------------------------------------------------------------------------
/constants/ExperienceData.jsx:
--------------------------------------------------------------------------------
1 | export const ExperienceData = [
2 | {
3 | companyName: "Good Tech MIND",
4 | location: "Kolkata, India",
5 | role: "MERN STACK INTERN",
6 | fromTo: "Aprile 2023 - June 2023",
7 | description:
8 | "In this internship, I worked on many projects, including an eCommerce application and a real-time chat system. Through this internship, I gained a strong command of Redux and Redux Toolkit. After completing this internship, I have gained the confidence and skills needed to develop a full-stack application for a real-world eCommerce site.",
9 | side: "left",
10 | },
11 | {
12 | companyName: "MILLENNIA AHEAD TECHNOLIOIES",
13 | location: "Nagpur, India",
14 | role: "REACT JS INTERN",
15 | fromTo: "December 2022 - March 2023",
16 | description:
17 | "During this internship, we worked for a startup company to build an online salon appointment booking platform. In my first internship, I learned about version control tools like Git and GitHub. I spent a lot of time improving my skills in building UI and UX to advance my proficiency in CSS styling and JavaScript logic.",
18 | side: "right",
19 | },
20 | ];
21 |
--------------------------------------------------------------------------------
/constants/JourneyData.js:
--------------------------------------------------------------------------------
1 | export const JourneyData = [
2 | {
3 | heading: "School",
4 | time: "2015-2019",
5 | image:
6 | "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQpCDvRmnjiBTgBd9WyPHlJHEPzRz2shaS3YQ&usqp=CAU",
7 | summary:
8 | "Topper during School time, A Mathematics Guy, Shy and Introverted personality, Always with Boyz friend Zone.",
9 | },
10 | {
11 | heading: "IIT Preparation",
12 | time: "2019-2021",
13 | image:
14 | "https://www.besteducationsikar.com/wp-content/uploads/2021/11/2019-06-15-800x600.jpg",
15 | summary:
16 | "Because I was a topper during my school days, some of my friends suggested that I pursue IIT. Additionally, my father's friend recommended IIT to my father for me. As a result, I went to Kota for IIT preparation. However, after my first attempt, I decided to quit IIT.",
17 | },
18 | {
19 | heading: "BSC College",
20 | time: "2021-2022",
21 | image:
22 | "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQ3xSTnbK57kUx2XgDd_zzXJp5uXPSNUmeZ9g&usqp=CAUF",
23 | summary:
24 | "After quite IIT, again without reason i jumped to the BSC, I was trying to figure out what I wanted to do with my life and which career path to choose. However, by the end of my first year, I made the decision to enter the tech field, so I quit BSC after completing my first year exams.",
25 | },
26 | {
27 | heading: "Coding Journey",
28 | time: "2022-Ongoing",
29 | image:
30 | "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTbb0NTA9qMmGFF4NPZgMqebIfkPpOpK7TWlQ&usqp=CAU",
31 | summary:
32 | "I started exploring coding and programming through YouTube and realized that I could learn many things for free. This, along with my belief in prioritizing skills over certificates or college degrees, led me to decide not to join a BCA college or pay for courses.",
33 | },
34 | {
35 | heading: "First Internship",
36 | time: "1 dec 2022 to 15 march 2023",
37 | summary: (
38 |
39 | {" "}
40 |
41 | Company : Millennia Ahead Technology pvt. ltd. (Nagpur, Maharashtra)
42 |
43 |
Mode : Remote (Work From Home)
I obtained my first internship
44 | after learning coding from YouTube in 5 months. Essentially, it is a
45 | startup-based company where all team members, including myself, are
46 | working on an online salon appointment booking application. This is my
47 | first experience with a real-world project, and I have learned a lot
48 | from it. Primarily, I learned frontend design and the functionality of
49 | dynamic applications, Redux, reactstrap, as well as how a team
50 | collaborates on a single project, including code merging using Git and
51 | GitHub.
52 |
53 | ),
54 | },
55 | {
56 | heading: "Second Internship",
57 | time: "24 Apr 2023 to 10 July 2022",
58 | summary: (
59 |
60 |
Company : Good Tech Mind (Kolkata, West Benal)
61 |
Mode : Remote (Work From Home)
62 | After completing my first internship, I wanted to pursue an offline
63 | intern job. So, I went for more than 5 interviews in two months. It was
64 | a little challenging to get shortlisted for interviews because I focused
65 | on learning web development and the mathematics involved. As a result, I
66 | didn't create many projects to showcase and was not aware of GitHub.
67 | Subsequently, I joined a remote non-paid internship that would pay me
68 | after two months. However, due to a lack of response and slow progress,
69 | my trust was broken, and I quit the internship. Nevertheless, I worked
70 | on three full-stack projects during that time, which boosted my
71 | confidence to undertake and complete any project using the MERN stack.
72 |
73 | ),
74 | },
75 | ];
76 |
--------------------------------------------------------------------------------
/constants/NavbarData.js:
--------------------------------------------------------------------------------
1 | import { AiTwotoneHome } from "react-icons/ai";
2 | import { FaLaptopCode } from "react-icons/fa";
3 | import { GiRailRoad } from "react-icons/gi";
4 | import { CgClapperBoard } from "react-icons/cg";
5 | import { BsPenFill } from "react-icons/bs";
6 | import { IoMdAppstore } from "react-icons/io";
7 |
8 | export const NavbarData = [
9 | {
10 | name: "Home",
11 | link: "#home",
12 | icon:
13 | },
14 | {
15 | name: "Skills",
16 | link: "#skills",
17 | icon:
18 | },
19 | {
20 | name: "Projects",
21 | link: "#projects",
22 | icon:
23 | },
24 | {
25 | name: "Blogs",
26 | link: "#blogs",
27 | icon:
28 | },
29 | {
30 | name: "My Journey",
31 | link: "#myJourney",
32 | icon:
33 | },
34 | {
35 | name: "apps",
36 | link: "#apps",
37 | icon:
38 | }
39 | ]
--------------------------------------------------------------------------------
/constants/ProjectsData.js:
--------------------------------------------------------------------------------
1 | export const ProjectsData = [
2 | {
3 | projectName: "Shovee : Personal Portfolio Generator",
4 | liveUrl: "https://shovee.com",
5 | githubUrl: "https://github.com/iamshiv007/shovee",
6 | projectImage: {
7 | imageUrl: "http://res.cloudinary.com/dqfrtazgi/image/upload/v1696218285/yn3naeznjfgszsbbjr92.png"
8 | },
9 | techs: ["NextJS", "TailwindCSS", "Redux Toolkit", "Cloudinary", "Intersection Objerver"]
10 | },
11 | {
12 | projectName: "YouTube clone",
13 | liveUrl: "https://youtube-clone-shivraj.vercel.app",
14 | githubUrl: "https://github.com/iamshiv007/yotube-clone",
15 | projectImage: {
16 | imageUrl: "http://res.cloudinary.com/dqfrtazgi/image/upload/v1696218286/t1zjvlwogccwit9888w7.png"
17 | },
18 | techs: ["ReactJS", "ContextAPI", "ChakraUI", "YoutubeAPI", "ContextAPI"]
19 | },
20 | {
21 | projectName: "Eccommerce Application",
22 | liveUrl: "https://ecommerce-application-shivraj.vercel.app",
23 | githubUrl: "https://github.com/iamshiv007/ecommerce-frontend",
24 | projectImage: {
25 | imageUrl: "http://res.cloudinary.com/dqfrtazgi/image/upload/v1696220173/lnnt6nmesjvvmo3nx9ep.png"
26 | },
27 | techs: ["ReactJS", "NodeJS", "Express", "MongoDB", "Redux Toolkit"]
28 | }
29 | ]
--------------------------------------------------------------------------------
/constants/SkillsData.js:
--------------------------------------------------------------------------------
1 | import { AiFillHtml5 } from "react-icons/ai";
2 | import {
3 | SiNodedotjs,
4 | SiNextdotjs,
5 | SiVercel,
6 | SiNetlify,
7 | SiExpress,
8 | SiRedux,
9 | SiTailwindcss,
10 | SiMui,
11 | SiChakraui,
12 | SiFirebase,
13 | SiTypescript,
14 | SiJquery
15 | } from "react-icons/si";
16 | import { DiJavascript1, DiReact, DiMongodb, DiSass } from "react-icons/di";
17 | import { BsGit, BsGithub } from "react-icons/bs";
18 | import { FaBootstrap, FaCss3Alt, FaAngular, FaPhp, FaShopify, FaJava } from "react-icons/fa";
19 | import { TbBrandReactNative } from "react-icons/tb";
20 | import { GrMysql } from "react-icons/gr";
21 |
22 | export const TechStackData = [
23 | {
24 | Advance: [
25 | {
26 | name: "ReactJS",
27 | icon: ,
28 | },
29 | {
30 | name: "JavaScript",
31 | icon: ,
32 | },
33 | {
34 | name: "Redux-toolkit",
35 | icon: ,
36 | },
37 | {
38 | name: "HTML5",
39 | icon: ,
40 | },
41 | {
42 | name: "CSS3",
43 | icon: ,
44 | },
45 | {
46 | name: "Bootstrap",
47 | icon: ,
48 | },
49 | {
50 | name: "Tailwind CSS",
51 | icon: ,
52 | },
53 | {
54 | name: "Meterial UI",
55 | icon: ,
56 | },
57 | {
58 | name: "Chakra UI",
59 | icon:
60 | },
61 | {
62 | name: "Vercel",
63 | icon:
64 | },
65 | {
66 | name: "Github",
67 | icon:
68 | },
69 | ],
70 | Good: [
71 | {
72 | name: "NextJS",
73 | icon:
74 | },
75 | {
76 | name: "NodeJS",
77 | icon: ,
78 | },
79 | {
80 | name: "Express",
81 | icon: ,
82 | },
83 | {
84 | name: "MongoDB",
85 | icon: ,
86 | },
87 | {
88 | name: "firebase",
89 | icon:
90 | },
91 | {
92 | name: "jQuery",
93 | icon:
94 | },
95 | {
96 | name: "netlify",
97 | icon:
98 | },
99 | {
100 | name: "Git",
101 | icon:
102 | },
103 |
104 | ],
105 | Familiar: [
106 | {
107 | name: "TypeScript",
108 | icon:
109 | },
110 | {
111 | name: "Angular",
112 | icon:
113 | },
114 | {
115 | name: "React Native",
116 | icon:
117 | },
118 | {
119 | name: "PHP",
120 | icon:
121 | },
122 | {
123 | name: "JAVA",
124 | icon:
125 | },
126 | {
127 | name: "SASS",
128 | icon: ,
129 | },
130 | {
131 | name: "MySQL",
132 | icon:
133 | },
134 | {
135 | name: "Shopify",
136 | icon:
137 | }
138 | ]
139 |
140 | }
141 | ]
--------------------------------------------------------------------------------
/constants/SocialMediaData.js:
--------------------------------------------------------------------------------
1 | import { AiOutlineInstagram } from "react-icons/ai";
2 | import { BsGithub } from "react-icons/bs";
3 | import { FaLinkedinIn } from "react-icons/fa";
4 | import { IoClose } from "react-icons/io5";
5 |
6 | export const SocialMediaData = [
7 | {
8 | icon: ,
9 | color:
10 | "linear-gradient(135deg, #833AB4, #C13584, #E1306C, #FD1D1D, #F56040, #FFDC80)",
11 | link: "https://www.instagram.com/iam_shiv_726",
12 | },
13 | {
14 | icon: ,
15 | color: "#0f0f0f",
16 | link: "https://twitter.com/ShivrajGurjar15",
17 | },
18 | {
19 | icon: ,
20 | color: "#0072b1",
21 | link: "https://www.linkedin.com/in/shivraj-dev",
22 | },
23 | {
24 | icon: ,
25 | color: "#171515",
26 | link: "https://www.github.com/iamshiv007",
27 | },
28 | ];
29 |
--------------------------------------------------------------------------------
/constants/index.js:
--------------------------------------------------------------------------------
1 | import { AppsData } from "./AppsData";
2 | import { BlogsData } from "./BlogsData";
3 | import { NewsData } from "./NewsData";
4 | import { SkillsData } from "./SkillsData";
5 | import { JourneyData } from "./JourneyData";
6 | import { ProjectsData } from "./ProjectsData";
7 |
8 | export { AppsData, BlogsData, NewsData, SkillsData, JourneyData, ProjectsData }
--------------------------------------------------------------------------------
/context/themeContext.js:
--------------------------------------------------------------------------------
1 | "use client";
2 | import React, { useState, createContext, useEffect } from "react";
3 |
4 | export const ThemeContext = createContext();
5 |
6 | const ThemeProvider = ({ children }) => {
7 | const [theme, setTheme] = useState("dark");
8 |
9 | // Toggle Theme
10 | const setThemeFun = () => {
11 | if (theme === "dark") {
12 | setTheme("light");
13 | localStorage.setItem("myPortfolioProfileTheme", "light");
14 | } else {
15 | setTheme("dark");
16 | localStorage.setItem("myPortfolioProfileTheme", "dark");
17 | }
18 | };
19 |
20 | // Get Theme Value From LocalStorage
21 | useEffect(() => {
22 | const getTheme = localStorage.getItem("myPortfolioProfileTheme");
23 | if (!getTheme) {
24 | return
25 | }
26 | setTheme(getTheme);
27 | }, []);
28 |
29 | return (
30 |
31 |
34 |
35 | );
36 | };
37 |
38 | export default ThemeProvider;
--------------------------------------------------------------------------------
/contextApi/PortfolioContext.jsx:
--------------------------------------------------------------------------------
1 | const { useState, createContext } = require("react");
2 |
3 | export const PortfolioContext = createContext();
4 |
5 | export const PortfolioProvider = ({ children }) => {
6 | const [dark, setDark] = useState(true);
7 | const [showModal, setShowModal] = useState(false);
8 |
9 | return (
10 |
13 | {children}
14 |
15 | );
16 | };
17 |
--------------------------------------------------------------------------------
/database/connect.js:
--------------------------------------------------------------------------------
1 | import mongoose from "mongoose"
2 |
3 | export const connectDb = async () => {
4 |
5 | try {
6 | await mongoose.connect(process.env.NEXT_PUBLIC_MONGODB_CONNECTION_STRING)
7 | console.log("Database Connected")
8 |
9 | } catch (error) {
10 | console.log(error)
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/jsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "paths": {
4 | "@/*": ["./*"]
5 | }
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/layout/footer/Footer.jsx:
--------------------------------------------------------------------------------
1 | import React, { Fragment } from "react";
2 |
3 | const Footer = () => {
4 | return (
5 |
6 |
7 | @Shiv 2023
8 |
9 |
10 | );
11 | };
12 |
13 | export default Footer;
14 |
--------------------------------------------------------------------------------
/layout/navbar/Navbar.jsx:
--------------------------------------------------------------------------------
1 | "use client";
2 | import React, { Fragment, useContext, useEffect, useState } from "react";
3 | import Link from "next/link";
4 | import { DiTechcrunch } from "react-icons/di";
5 | import { BsFillLightningChargeFill } from "react-icons/bs";
6 | import { TbBulbFilled } from "react-icons/tb";
7 |
8 | import MobileNavbar from "./SidebarMobile";
9 | import { NavbarMenu } from "./NavbarItems";
10 | import NavbarMobile from "./NavbarMobile";
11 |
12 | import { ThemeContext } from "@/context/themeContext";
13 |
14 | const Navbar = () => {
15 | const [top, setTop] = useState("0");
16 | const [showMenu, setShowMenu] = useState(false);
17 |
18 | const { setThemeFun, theme } = useContext(ThemeContext);
19 |
20 | // Logic for Navbar Hide and Show on scrolling behaviour
21 | useEffect(() => {
22 | let prevScrollPos = window.scrollY;
23 |
24 | const handleScroll = () => {
25 | const currentScrollPos = window.scrollY;
26 |
27 | if (prevScrollPos > currentScrollPos) {
28 | setTop("0"); // Show the navbar
29 | } else {
30 | setTop("-80px"); // Hide the navbar
31 | }
32 |
33 | prevScrollPos = currentScrollPos;
34 | };
35 |
36 | window.addEventListener("scroll", handleScroll);
37 | return () => {
38 | // Cleanup: Remove the event listener when the component unmounts
39 | window.removeEventListener("scroll", handleScroll);
40 | };
41 | }, []);
42 |
43 | return (
44 |
45 | {/* Desktop Header */}
46 |
50 | {/* Name Logo */}
51 |
52 | SHIV
53 |
54 |
55 | {/* Navbar Links */}
56 | {NavbarMenu.map((navbar) => (
57 |
62 |
63 | {navbar.name}
64 |
65 |
66 | ))}
67 |
68 | {/* Toggle Theme button */}
69 |
70 |
74 | {theme === "dark" ? (
75 |
76 | ) : (
77 |
78 | )}
79 |
80 |
81 |
82 |
83 | {/* Mobile Header */}
84 |
91 |
92 | {/* SideMenu For Mobile Screen */}
93 |
94 |
95 | );
96 | };
97 |
98 | export default Navbar;
99 |
--------------------------------------------------------------------------------
/layout/navbar/NavbarItems.js:
--------------------------------------------------------------------------------
1 | export const NavbarMenu = [
2 | {
3 | name: "Home",
4 | link: "#home",
5 | },
6 | {
7 | name: "About",
8 | link: "#about",
9 | },
10 | {
11 | name: "Tech Stack",
12 | link: "#techStack",
13 | },
14 | {
15 | name: "Education",
16 | link: "#education",
17 | },
18 | {
19 | name: "Experience",
20 | link: "#experience",
21 | },
22 | {
23 | name: "Project",
24 | link: "#project",
25 | },
26 | ];
--------------------------------------------------------------------------------
/layout/navbar/NavbarMobile.jsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import { DiTechcrunch } from "react-icons/di";
3 | import { BsFillLightningChargeFill } from "react-icons/bs";
4 | import { TbBulbFilled } from "react-icons/tb";
5 | import { GiHamburgerMenu } from "react-icons/gi";
6 |
7 | const NavbarMobile = ({ setShowMenu, setThemeFun, theme, showMenu, top }) => {
8 | return (
9 | // Mobile Header
10 |
14 |
15 | {/* Open Sidebar Button */}
16 |
setShowMenu(!showMenu)}
19 | >
20 |
21 |
22 |
23 | {/* Name Logo */}
24 |
25 | SHIV
26 |
27 |
28 |
29 | {/* Toggle Theme Button */}
30 |
31 |
35 | {theme === "dark" ? : }
36 |
37 |
38 |
39 | );
40 | };
41 |
42 | export default NavbarMobile;
43 |
--------------------------------------------------------------------------------
/layout/navbar/SidebarMobile.jsx:
--------------------------------------------------------------------------------
1 | import React, { Fragment } from "react";
2 | import Link from "next/link";
3 | import { IoMdClose } from "react-icons/io";
4 | import { DiTechcrunch } from "react-icons/di";
5 |
6 | import { NavbarMenu } from "./NavbarItems";
7 |
8 | const MobileNavbar = ({ showMenu, setShowMenu }) => {
9 | return (
10 |
11 | setShowMenu(!showMenu)}
16 | >
17 | {/* Sidebar */}
18 |
23 |
24 | {/* Name Logo */}
25 |
26 |
27 | S
28 |
29 |
30 | SHIV
31 |
32 |
33 |
34 | {/* Sidebar Close button */}
35 |
setShowMenu(!showMenu)}
38 | >
39 |
40 |
41 |
42 |
43 |
44 | {/* Navbar Links */}
45 | {NavbarMenu.map((navbar) => (
46 |
51 | {navbar.name}
52 |
53 | ))}
54 |
55 |
56 |
57 |
58 | );
59 | };
60 |
61 | export default MobileNavbar;
62 |
--------------------------------------------------------------------------------
/models/feedback.js:
--------------------------------------------------------------------------------
1 | const { default: mongoose } = require("mongoose");
2 |
3 | const feedbackSchema = new mongoose.Schema({
4 | name: {
5 | type: String,
6 | required: true
7 | },
8 | email: {
9 | type: String,
10 | },
11 | rating: {
12 | type: Number,
13 | required: true
14 | },
15 | good: {
16 | type: String,
17 | },
18 | bad: {
19 | type: String,
20 | },
21 | suggetion: {
22 | type: String,
23 | },
24 | })
25 |
26 | mongoose.models = {};
27 |
28 | export const Feedback = mongoose.model("feedback", feedbackSchema)
--------------------------------------------------------------------------------
/models/mail.js:
--------------------------------------------------------------------------------
1 | const { default: mongoose } = require("mongoose");
2 |
3 | const mailSchema = new mongoose.Schema({
4 | name: {
5 | type: String,
6 | required: true
7 | },
8 | email: {
9 | type: String,
10 | required: true
11 | },
12 | subject: {
13 | type: String,
14 | required: true
15 | },
16 | message: {
17 | type: String,
18 | required: true
19 | },
20 | })
21 |
22 | mongoose.models = {};
23 |
24 | export const Mail = mongoose.model("mail", mailSchema)
--------------------------------------------------------------------------------
/next.config.js:
--------------------------------------------------------------------------------
1 | /** @type {import('next').NextConfig} */
2 | const nextConfig = {
3 | reactStrictMode: true,
4 | images: {
5 | domains: ["encrypted-tbn0.gstatic.com", "scontent.fjdh1-1.fna.fbcdn.net", "www.besteducationsikar.com", "cdn-media-1.freecodecamp.org", "thumbs.dreamstime.com", "soshace.com", "next.config.js", "images.prismic.io", "d33wubrfki0l68.cloudfront.net", "cdn.hashnode.com", "res.cloudinary.com", "www.freecodecamp.org", "blogger.googleusercontent.com", "tenten.vn", "internetingishard.netlify.app", "reactscript.com", "webdesign-trends.net", "reactjsexample.com", "vercel.com", "nextjs.org", "http://res.cloudinary.com"]
6 | },
7 | eslint: {
8 | ignoreDuringBuilds: true,
9 | }
10 | }
11 |
12 | module.exports = nextConfig
13 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "first-app",
3 | "version": "0.1.0",
4 | "private": true,
5 | "scripts": {
6 | "dev": "next dev",
7 | "build": "next build",
8 | "start": "next start",
9 | "lint": "next lint"
10 | },
11 | "dependencies": {
12 | "@vercel/analytics": "^1.0.2",
13 | "axios": "^1.4.0",
14 | "framer-motion": "^10.12.18",
15 | "he": "^1.2.0",
16 | "mongoose": "^7.4.0",
17 | "next": "^13.3.0",
18 | "nodemailer": "^6.9.4",
19 | "react": "^18.2.0",
20 | "react-dom": "^18.2.0",
21 | "react-ga4": "^2.1.0",
22 | "react-icons": "^4.9.0",
23 | "react-responsive-carousel": "^3.2.23",
24 | "react-responsive-masonry": "^2.1.7",
25 | "react-syntax-highlighter": "^15.5.0"
26 | },
27 | "devDependencies": {
28 | "autoprefixer": "^10.4.14",
29 | "eslint": "8.47.0",
30 | "eslint-config-next": "13.4.16",
31 | "postcss": "^8.4.24",
32 | "tailwindcss": "^3.3.2"
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/pages/_app.js:
--------------------------------------------------------------------------------
1 | import "@/styles/globals.css"
2 | import "@/styles/animation.css"
3 | import "@/styles/cssGrid.css"
4 | import "@/styles/Home.module.css"
5 | import { Analytics } from "@vercel/analytics/react"
6 | import ReactGA from "react-ga4";
7 |
8 | import { PortfolioProvider } from "@/contextApi/PortfolioContext"
9 | import ThemeProvider from "@/context/themeContext"
10 |
11 | ReactGA.initialize(process.env.NEXT_PUBLIC_MEASUREMENT_ID);
12 |
13 |
14 | export default function App({ Component, pageProps }) {
15 |
16 | return (
17 |
18 |
19 |
20 |
21 |
22 |
23 | )
24 | }
25 |
--------------------------------------------------------------------------------
/pages/_document.js:
--------------------------------------------------------------------------------
1 | import { Html, Head, Main, NextScript } from "next/document"
2 |
3 | export default function Document() {
4 | return (
5 |
6 |
8 |
9 |
10 |
11 |
12 | )
13 | }
14 |
--------------------------------------------------------------------------------
/pages/api/chatgpt.js:
--------------------------------------------------------------------------------
1 | import axios from "axios";
2 |
3 | export default async function handler(req, res) {
4 |
5 | try {
6 |
7 | const { query } = req.query
8 |
9 | if (req.method !== "POST") return res.send({ success: false, message: `${req.method} Method Not Allowed` })
10 |
11 | const options = {
12 | method: "POST",
13 | url: "https://chatgpt-api8.p.rapidapi.com/",
14 | headers: {
15 | "content-type": "application/json",
16 | "X-RapidAPI-Key": process.env.RAPID_API_KEY,
17 | "X-RapidAPI-Host": "chatgpt-api8.p.rapidapi.com",
18 | },
19 | data: [
20 | {
21 | content: query,
22 | role: "user",
23 | },
24 | ],
25 | };
26 |
27 | const { data } = await axios.request(options)
28 |
29 | res.send({ success: true, answer: data.text })
30 |
31 | } catch (error) {
32 | res.send({ success: false, message: error?.response?.data?.messaege || error })
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/pages/api/feedback/new.js:
--------------------------------------------------------------------------------
1 | import { connectDb } from "@/database/connect";
2 | import { Feedback } from "@/models/feedback";
3 |
4 | export default async function handler(req, res) {
5 | if (req.method === "POST") {
6 |
7 | const { name, rating } = req.body
8 |
9 | if (!name || !rating) return res.status(400).json({ success: false, message: "Name and Rating Required?" })
10 |
11 | try {
12 | connectDb()
13 | const feedback = await Feedback.create(req.body)
14 |
15 | res.status(200).json({ success: true, message: "Thanks for Your Feedback", feedback });
16 | } catch (error) {
17 | console.error("Error sending email:", error);
18 | res.status(500).json({ success: false, message: error.response.data.message || error.message || "" });
19 | }
20 | } else {
21 | res.status(405).json({ error: "Method not allowed" });
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/pages/api/mail/new.js:
--------------------------------------------------------------------------------
1 | // pages/api/send-email.js
2 | import nodemailer from "nodemailer";
3 |
4 | import { connectDb } from "@/database/connect";
5 | import { Mail } from "@/models/mail";
6 |
7 | export default async function handler(req, res) {
8 | if (req.method === "POST") {
9 |
10 | const { name, email, subject, message } = req.body;
11 |
12 | // Replace these with your actual email service settings
13 | const transporter = nodemailer.createTransport({
14 | service: "Gmail",
15 | auth: {
16 | user: process.env.FROM_EMAIL_ADDRESS,
17 | pass: process.env.FROM_EMAIL_PASS,
18 | },
19 | });
20 |
21 | const mailOptions = {
22 | from: process.env.FROM_EMAIL_ADDRESS,
23 | to: process.env.TO_EMAIL_PASS,
24 | subject,
25 | text: `name = ${name}, email = ${email}, message = ${message}`
26 | };
27 |
28 | try {
29 | await transporter.sendMail(mailOptions);
30 |
31 | connectDb()
32 | const mail = await Mail.create(req.body)
33 |
34 | res.status(200).json({ success: true, message: "Email sent successfully", mail });
35 | } catch (error) {
36 | console.error("Error sending email:", error);
37 | res.status(500).json({ error: "An error occurred while sending the email" });
38 | }
39 | } else {
40 | res.status(405).json({ error: "Method not allowed" });
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/pages/api/masonary.js:
--------------------------------------------------------------------------------
1 | import axios from "axios";
2 |
3 | export default async function handler(req, res) {
4 |
5 | try {
6 |
7 | const config = {
8 | headers: {
9 | Authorization: process.env.PEXELS_API_KEY
10 | },
11 | };
12 |
13 | if (req.method !== "GET") return res.send({ success: false, message: `${req.method} Method Not Allowed` })
14 |
15 | const url = `https://api.pexels.com/v1/curated?page=${1}`;
16 |
17 | const { data } = await axios.get(url, config)
18 |
19 | res.send({ success: true, photos: data.photos })
20 |
21 | } catch (error) {
22 | res.send({ success: false, message: error?.response?.data?.messaege || error.message || error })
23 | }
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/pages/api/news.js:
--------------------------------------------------------------------------------
1 | import axios from "axios";
2 |
3 | export default async function handler(req, res) {
4 |
5 | try {
6 |
7 | const { category, lang, country, max } = req.query
8 |
9 | if (req.method !== "GET") return res.send({ success: false, message: `${req.method} Method Not Allowed` })
10 |
11 | const apikey = process.env.GOOGLE_NEWS_API_KEY;
12 |
13 | const url = `https://gnews.io/api/v4/top-headlines?category=${category}&lang=${lang}&country=${country}&max=${max}&apikey=` + apikey;
14 |
15 | const { data } = await axios.get(url)
16 |
17 | res.send({ success: true, articles: data.articles })
18 |
19 | } catch (error) {
20 | res.send({ success: false, message: error?.response?.data?.messaege || error.message || error })
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/pages/api/translate.js:
--------------------------------------------------------------------------------
1 | import axios from "axios";
2 |
3 | export default async function handler(req, res) {
4 |
5 | try {
6 |
7 | const { text, language } = req.query
8 |
9 | if (req.method !== "POST") return res.send({ success: false, message: `${req.method} Method Not Allowed` })
10 |
11 | const options = {
12 | method: "POST",
13 | url: "https://microsoft-translator-text.p.rapidapi.com/translate",
14 | params: {
15 | "to[0]": language,
16 | "api-version": "3.0",
17 | profanityAction: "NoAction",
18 | textType: "plain",
19 | },
20 | headers: {
21 | "content-type": "application/json",
22 | "X-RapidAPI-Key": process.env.RAPID_API_KEY,
23 | "X-RapidAPI-Host": "microsoft-translator-text.p.rapidapi.com",
24 | },
25 | data: [
26 | {
27 | Text: text,
28 | },
29 | ],
30 | };
31 |
32 | const { data } = await axios.request(options)
33 |
34 | res.send({ success: true, translatedText: data[0].translations[0].text })
35 |
36 | } catch (error) {
37 | res.send({ success: false, message: error?.response?.data?.messaege || error })
38 | }
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/pages/apps/apna-chat-gpt.jsx:
--------------------------------------------------------------------------------
1 | import React, { Fragment, useState } from "react";
2 | import Head from "next/head";
3 | import axios from "axios";
4 |
5 | import Theme from "@/utils/Theme";
6 | import BackTo from "@/components/buttons/BackTo";
7 |
8 | const ApnaChatGpt = () => {
9 | const [question, setQuestion] = useState("");
10 | const [loading, setLoading] = useState(false);
11 | const [questionPreview, setQuestionPreview] = useState("");
12 | const [answer, setAnswer] = useState();
13 | const [history, setHistory] = useState([]);
14 |
15 | const enterHit = (e) => {
16 | if (e.key === "Enter") {
17 | generateAnswer();
18 | }
19 | };
20 |
21 | const generateAnswer = async () => {
22 | try {
23 | setLoading(true);
24 | setQuestionPreview(question);
25 | setQuestion("");
26 | setAnswer("");
27 | const { data } = await axios.post(`/api/chatgpt?query=${question}`);
28 | if (!data.success) {
29 | alert(data.message);
30 | setLoading(false);
31 | return;
32 | }
33 | setLoading(false);
34 | setAnswer(data.answer);
35 | setHistory([{ question, answer: data.answer }, ...history]);
36 | console.log(data.answer);
37 | } catch (error) {
38 | console.log(error);
39 | alert(error?.response?.data?.message || error);
40 | }
41 | };
42 |
43 | return (
44 |
45 |
46 | Apna-Chat-Gpt
47 |
48 |
49 |
50 |
51 |
52 |
53 |
Apna-Chat-Gpt
54 |
55 |
56 | setQuestion(e.target.value)}
61 | onKeyDown={enterHit}
62 | placeholder="Ask any question..."
63 | type="text"
64 | value={question}
65 | />
66 |
67 |
68 |
69 | {questionPreview && (
70 |
71 | {" "}
72 |
Q. {questionPreview}
73 |
{loading ? "Generating..." : "Ans => " + answer}
74 |
75 | )}
76 |
77 | {answer !== ""
78 | ? history
79 | .filter((data, key) => key !== 0)
80 | .map((data, key) => (
81 |
82 |
{"Q. " + data.question}
83 |
{"Ans => " + data.answer}
84 |
85 | ))
86 | : history.map((data, key) => (
87 |
88 |
{"Q. " + data.question}
89 |
{"Ans => " + data.answer}
90 |
91 | ))}
92 |
93 |
94 |
95 |
96 |
100 | Generate
101 |
102 |
103 |
104 |
105 |
106 | );
107 | };
108 |
109 | export default ApnaChatGpt;
110 |
--------------------------------------------------------------------------------
/pages/apps/hindi-translator.jsx:
--------------------------------------------------------------------------------
1 | import React, { Fragment, useState } from "react";
2 | import Head from "next/head";
3 | import axios from "axios";
4 |
5 | import Theme from "@/utils/Theme";
6 | import BackTo from "@/components/buttons/BackTo";
7 |
8 | const HindiTranslator = () => {
9 | const [text, setText] = useState("");
10 | const [language, setLanguage] = useState("hi");
11 | const [output, setOutput] = useState("");
12 | const [loading, setLoading] = useState(false);
13 |
14 | const translateFun = async () => {
15 | try {
16 | setLoading(true);
17 | const { data } = await axios.post(
18 | `/api/translate?text=${text}&language=${language}`
19 | );
20 | if (!data.success) {
21 | alert(data.message);
22 | setLoading(false);
23 | return;
24 | }
25 | setLoading(false);
26 | console.log(data.translatedText);
27 | setOutput(data.translatedText);
28 | } catch (error) {
29 | console.error(error);
30 | }
31 | };
32 |
33 | return (
34 |
35 |
36 | Hindi-Translator
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 | Hindi Translator
45 |
46 |
47 |
48 |
49 |
58 |
59 |
60 |
61 | Translate in
62 |
63 | setLanguage(e.target.value)}
68 | value={language}
69 | >
70 | Hindi
71 | {/* English */}
72 |
73 |
74 |
78 | Translate
79 |
80 |
81 |
82 |
83 |
90 |
91 |
92 |
93 |
94 |
95 |
99 | Translate
100 |
101 |
102 |
103 |
104 | );
105 | };
106 |
107 | export default HindiTranslator;
108 |
--------------------------------------------------------------------------------
/pages/apps/music-chalao.jsx:
--------------------------------------------------------------------------------
1 | import React, { Fragment, useEffect, useState } from "react";
2 | import Head from "next/head";
3 | import axios from "axios";
4 |
5 | import Theme from "@/utils/Theme";
6 |
7 | const MusicChalao = () => {
8 | const [songs, setSongs] = useState({});
9 |
10 | useEffect(() => {}, []);
11 |
12 | const loadMusic = async () => {
13 | const options = {
14 | method: "GET",
15 | url: "https://deezerdevs-deezer.p.rapidapi.com/infos",
16 | headers: {
17 | "X-RapidAPI-Key": process.enc.RAPID_API_KEY,
18 | "X-RapidAPI-Host": "deezerdevs-deezer.p.rapidapi.com",
19 | },
20 | };
21 |
22 | try {
23 | const response = await axios.request(options);
24 | console.log(response.data);
25 | setSongs(response.data);
26 | } catch (error) {
27 | console.error(error);
28 | }
29 | };
30 |
31 | return (
32 |
33 |
34 | Music Chalao
35 |
36 |
37 |
38 |
39 |
40 | News App
41 |
42 |
43 |
44 |
45 |
Load Data
46 |
47 |
48 |
49 | );
50 | };
51 |
52 | export default MusicChalao;
53 |
--------------------------------------------------------------------------------
/pages/apps/quiz-app.jsx:
--------------------------------------------------------------------------------
1 | import React, { Fragment, useEffect, useState } from "react";
2 | import Head from "next/head";
3 | import axios from "axios";
4 | import he from "he";
5 | import { TiTick } from "react-icons/ti";
6 | import { ImCross } from "react-icons/im";
7 |
8 | import Theme from "@/utils/Theme";
9 | import BackTo from "@/components/buttons/BackTo";
10 |
11 | const QuizApp = () => {
12 | const [question, setQuestion] = useState();
13 | const [options, setOptions] = useState([]);
14 | const [correctAnswer, setCorrectAnswer] = useState();
15 | const [answer, setAnswer] = useState();
16 | const [loading, setLoading] = useState(true);
17 | const [category, setCategory] = useState("");
18 |
19 | useEffect(() => {
20 | generateQuestion();
21 | }, []);
22 |
23 | const generateQuestion = () => {
24 | setAnswer();
25 | setLoading(true);
26 | axios
27 | .get("https://opentdb.com/api.php?amount=1&type=multiple")
28 | .then((res) => {
29 | setLoading(false);
30 | setQuestion(he.decode(res.data.results[0].question));
31 |
32 | setCategory(he.decode(res.data.results[0].category));
33 |
34 | let myOptions = [...res.data.results[0].incorrect_answers.slice(0, 3)];
35 | let myOptions2 = [...myOptions];
36 |
37 | var randomNumber = Math.floor(Math.random() * 4);
38 |
39 | myOptions2[randomNumber] = res.data.results[0].correct_answer;
40 |
41 | if (randomNumber !== 3) {
42 | myOptions2[3] = myOptions[randomNumber];
43 | }
44 |
45 | setOptions(myOptions2);
46 |
47 | setCorrectAnswer(res.data.results[0].correct_answer);
48 | });
49 | };
50 |
51 | return (
52 |
53 |
54 | Quiz App
55 |
56 |
57 |
58 |
59 |
60 |
61 |
Quiz App
62 |
63 | {loading ? "" :
Category :- {category}
}
64 |
65 | {!loading ? (
66 |
67 |
Q. {question}
68 |
69 |
70 | {options.map((option, key) => (
71 |
72 | {
78 | if (!answer) setAnswer(e.target.value);
79 | }}
80 | type="checkbox"
81 | value={option}
82 | />
83 |
84 | {key + 1}. {he.decode(option)}
85 |
86 |
87 | ))}
88 |
89 |
90 | ) : (
91 |
92 | ...Loading
93 |
94 | )}
95 |
96 |
97 | {answer ? (
98 | answer === correctAnswer ? (
99 |
100 |
101 |
102 |
103 | Right Answer
104 |
105 | ) : (
106 |
107 |
108 |
109 |
110 |
111 | Wrong Answer
112 |
113 |
114 | {options.indexOf(correctAnswer) + 1}.{" "}
115 | {he.decode(correctAnswer)}
116 |
117 |
118 | )
119 | ) : null}
120 |
121 |
122 |
123 |
127 | Next
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 | );
136 | };
137 |
138 | export default QuizApp;
139 |
--------------------------------------------------------------------------------
/pages/apps/tic-tac-toe.jsx:
--------------------------------------------------------------------------------
1 | import React, { Fragment, useEffect, useState } from "react";
2 | import Head from "next/head";
3 |
4 | import Theme from "@/utils/Theme";
5 | import BackTo from "@/components/buttons/BackTo";
6 |
7 | const TicTacToe = () => {
8 | const [game, setGame] = useState(0);
9 | const [over, setOver] = useState(false);
10 | const [winer, setWiner] = useState();
11 | const [count, setCount] = useState(0);
12 |
13 | useEffect(() => {
14 | const ones = document.getElementsByClassName("one");
15 | const twos = document.getElementsByClassName("two");
16 | const threes = document.getElementsByClassName("three");
17 | const fours = document.getElementsByClassName("four");
18 | const fives = document.getElementsByClassName("five");
19 | const sixs = document.getElementsByClassName("six");
20 | const sevens = document.getElementsByClassName("seven");
21 | const eights = document.getElementsByClassName("eight");
22 |
23 | if (
24 | (ones[0].innerText === "0" &&
25 | ones[1].innerText === "0" &&
26 | ones[2].innerText === "0") ||
27 | (ones[0].innerText === "❌" &&
28 | ones[1].innerText === "❌" &&
29 | ones[2].innerText === "❌")
30 | ) {
31 | setOver(true);
32 | setWiner(ones[0].innerText);
33 | } else if (
34 | (twos[0].innerText === "0" &&
35 | twos[1].innerText === "0" &&
36 | twos[2].innerText === "0") ||
37 | (twos[0].innerText === "❌" &&
38 | twos[1].innerText === "❌" &&
39 | twos[2].innerText === "❌")
40 | ) {
41 | setOver(true);
42 | setWiner(twos[0].innerText);
43 | } else if (
44 | (threes[0].innerText === "0" &&
45 | threes[1].innerText === "0" &&
46 | threes[2].innerText === "0") ||
47 | (threes[0].innerText === "❌" &&
48 | threes[1].innerText === "❌" &&
49 | threes[2].innerText === "❌")
50 | ) {
51 | setOver(true);
52 | setWiner(threes[0].innerText);
53 | } else if (
54 | (fours[0].innerText === "0" &&
55 | fours[1].innerText === "0" &&
56 | fours[2].innerText === "0") ||
57 | (fours[0].innerText === "❌" &&
58 | fours[1].innerText === "❌" &&
59 | fours[2].innerText === "❌")
60 | ) {
61 | setOver(true);
62 | setWiner(fours[0].innerText);
63 | } else if (
64 | (fives[0].innerText === "0" &&
65 | fives[1].innerText === "0" &&
66 | fives[2].innerText === "0") ||
67 | (fives[0].innerText === "❌" &&
68 | fives[1].innerText === "❌" &&
69 | fives[2].innerText === "❌")
70 | ) {
71 | setOver(true);
72 | setWiner(fives[0].innerText);
73 | } else if (
74 | (sixs[0].innerText === "0" &&
75 | sixs[1].innerText === "0" &&
76 | sixs[2].innerText === "0") ||
77 | (sixs[0].innerText === "❌" &&
78 | sixs[1].innerText === "❌" &&
79 | sixs[2].innerText === "❌")
80 | ) {
81 | setOver(true);
82 | setWiner(sixs[0].innerText);
83 | } else if (
84 | (sevens[0].innerText === "0" &&
85 | sevens[1].innerText === "0" &&
86 | sevens[2].innerText === "0") ||
87 | (sevens[0].innerText === "❌" &&
88 | sevens[1].innerText === "❌" &&
89 | sevens[2].innerText === "❌")
90 | ) {
91 | setOver(true);
92 | setWiner(sevens[0].innerText);
93 | } else if (
94 | (eights[0].innerText === "0" &&
95 | eights[1].innerText === "0" &&
96 | eights[2].innerText === "0") ||
97 | (eights[0].innerText === "❌" &&
98 | eights[1].innerText === "❌" &&
99 | eights[2].innerText === "❌")
100 | ) {
101 | setOver(true);
102 | setWiner(eights[0].innerText);
103 | }
104 | }, [game]);
105 |
106 | const gameFun = (e) => {
107 | if (!e.target.innerText && !over) {
108 | e.target.innerText = game;
109 | setGame(game ? 0 : "❌");
110 | setCount(count + 1);
111 | }
112 | };
113 |
114 | const resetGame = () => {
115 | const allSquares = document.getElementsByClassName("square");
116 | for (let i = 0; i < 9; i++) {
117 | allSquares[i].innerText = null;
118 | }
119 |
120 | setOver(false);
121 | setWiner();
122 | setCount(0);
123 | };
124 |
125 | return (
126 |
127 |
128 | Tic-Tac-Toe
129 |
130 |
131 |
132 |
133 |
134 |
135 |
Tic-Tac-Toe
136 |
137 |
138 |
139 |
140 |
141 |
142 | {(over || (count === 9 && !winer)) && (
143 |
144 | {count === 9 && !winer ? (
145 |
Game draw
146 | ) : (
147 |
148 | {winer} is won the
149 | game
150 |
151 | )}
152 |
156 | Restart
157 |
158 |
159 | )}
160 |
161 |
162 |
163 | );
164 | };
165 |
166 | export default TicTacToe;
167 |
168 | const FirstRow = ({ gameFun }) => {
169 | return (
170 | <>
171 |
176 | >
177 | );
178 | };
179 |
180 | const SecondRow = ({ gameFun }) => {
181 | return (
182 | <>
183 |
188 | >
189 | );
190 | };
191 |
192 | const ThirdRow = ({ gameFun }) => {
193 | return (
194 | <>
195 |
200 | >
201 | );
202 | };
203 |
--------------------------------------------------------------------------------
/pages/blogs.jsx:
--------------------------------------------------------------------------------
1 | import React, { Fragment } from "react";
2 | import Head from "next/head";
3 | import Link from "next/link";
4 | import Image from "next/image";
5 | import Masonry, { ResponsiveMasonry } from "react-responsive-masonry";
6 |
7 | import { BlogsData } from "@/constants";
8 | import Theme from "@/utils/Theme";
9 | import BackTo from "@/components/buttons/BackTo";
10 |
11 | const BlogsPage = () => {
12 | return (
13 |
14 |
15 | Blogs
16 |
17 |
18 |
19 |
20 |
21 |
Blogs
22 |
23 |
24 |
27 |
28 | {BlogsData.map((blog) => (
29 |
33 |
34 |
35 |
43 |
44 |
{blog.name}
45 |
46 | {blog.date}
47 |
48 |
49 |
50 |
51 |
52 | ))}
53 |
54 |
55 |
56 |
57 |
58 |
59 | );
60 | };
61 |
62 | export default BlogsPage;
63 |
--------------------------------------------------------------------------------
/pages/blogs/css/blend-mode.jsx:
--------------------------------------------------------------------------------
1 | import React, { Fragment, useState } from "react";
2 | import Head from "next/head";
3 |
4 | import Theme from "@/utils/Theme";
5 | import BackTo from "@/components/buttons/BackTo";
6 |
7 | const BlendMode = () => {
8 | const [blendMode, setBlendMode] = useState("normal");
9 |
10 | return (
11 |
12 |
13 | Background Blend Mode
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
Background Blend Mode
22 |
23 |
24 | {" "}
25 | Note:- Before we are starting a example you
26 | should know, this property use for two images.
27 |
28 |
29 |
setBlendMode(e.target.value)}
34 | value={blendMode}
35 | >
36 | normal
37 | screen
38 | multiply
39 | overlay
40 | darken
41 | lighten
42 | color-dodge
43 | saturation
44 | color
45 | difference
46 | hue
47 | luminocity
48 | color-burn
49 | hard-light
50 | soft-light
51 |
52 |
53 |
54 | background-blend-mode : {blendMode}
55 |
56 |
57 |
64 |
65 |
66 |
67 |
68 | CSS was first proposed by Håkon Wium Lie in 1994 and has since
69 | become a fundamental technology for designing and styling web
70 | pages.
71 |
72 | F
73 |
74 |
75 |
76 |
77 | );
78 | };
79 |
80 | export default BlendMode;
81 |
--------------------------------------------------------------------------------
/pages/blogs/css/css-animation.jsx:
--------------------------------------------------------------------------------
1 | import React, { Fragment } from "react";
2 | import Head from "next/head";
3 |
4 | import Theme from "@/utils/Theme";
5 | import BackTo from "@/components/buttons/BackTo";
6 |
7 | const CssAnimation = () => {
8 | return (
9 |
10 |
11 | Css-Animation
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
Css Animation
20 |
21 | With help of css Animation we can make our UI more attractive and
22 | user friendly. In this Blog we are going explore all the
23 | properties of css animation with example explaination.{" "}
24 |
25 |
26 |
Example 1
27 |
28 | animation-name : widthIncrease
29 |
30 |
animation-duration : 1s
31 |
32 | animation-iteration-count : 1s
33 |
34 |
animation-delay : 2s
35 |
36 | animation-timing-function : linear
37 |
38 |
39 |
40 | @keyframes widthIncrease {{" "}
41 |
42 |
43 | from { width: 6rem; }
44 |
45 |
46 | {" "}
47 | to { width: 20rem; }
48 |
49 |
}
50 |
51 |
52 |
53 |
54 | animation-name
55 |
56 |
57 | According to css animation rules we have to give a animation-name
58 | so we can use this name next time for animation
59 |
60 |
61 |
62 | animation-duration
63 |
64 |
65 | animation-duration is time value in seconds (exa = 2s, 3s,) which
66 | takes to complete to animation.
67 |
68 |
69 |
70 | animation-iteration-count
71 |
72 |
73 | animation-iteration-count is like how many times we want the
74 | animation
75 | repeat we can give it value{" "}
76 |
1, 2, 3 ... or infinite
etc.
77 |
78 |
79 |
80 | animation-delay
81 |
82 |
83 | As Its name animation delay is time in which time animation not
84 | start value = 1s, 2s, ...
85 |
86 |
87 |
88 | animation-timing-function
89 |
90 |
91 | animation-timing-function is speed to complete animation values =
92 | linear, ease, ease-in, ease-out, ease-in-out, step-end,
93 | step-start, cubic-bezier
94 |
95 |
96 |
97 |
Lorem
98 |
99 |
100 |
101 | );
102 | };
103 |
104 | export default CssAnimation;
105 |
--------------------------------------------------------------------------------
/pages/blogs/css/css-grid.jsx:
--------------------------------------------------------------------------------
1 | import React, { Fragment, useContext } from "react";
2 | import Head from "next/head";
3 | import SyntaxHighlighter from "react-syntax-highlighter";
4 | import { github, dark } from "react-syntax-highlighter/dist/cjs/styles/hljs";
5 |
6 | import Theme from "@/utils/Theme";
7 | import BackTo from "@/components/buttons/BackTo";
8 | import { ThemeContext } from "@/context/themeContext";
9 |
10 | const CssGrid = () => {
11 | const { theme } = useContext(ThemeContext);
12 |
13 | return (
14 |
15 |
16 | CSS Grid
17 |
18 |
19 |
20 |
21 |
22 |
Css-Grid
23 |
24 |
25 |
26 |
27 |
28 |
29 | );
30 | };
31 |
32 | export default CssGrid;
33 |
34 | const ExampleOne = ({ myDark }) => {
35 | const codeString1 = "grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr";
36 | const codeString2 = "grid-template-columns: repeat(7, 1fr)";
37 |
38 | return (
39 | <>
40 | Example 1
41 |
42 |
43 | {codeString1}
44 |
45 | OR
46 |
47 | {codeString2}
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | >
60 | );
61 | };
62 |
63 | const ExampleTwo = ({ myDark }) => {
64 | const codeString1 =
65 | "grid-template-columns: repeat(auto-fit, minmax(200px, 1fr))";
66 |
67 | return (
68 | <>
69 | Example 2
70 |
71 |
72 | {codeString1}
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 | >
85 | );
86 | };
87 |
88 | const ExampleThree = ({ myDark }) => {
89 | const codeString1 = ` grid-template-columns: repeat(5, 1fr);
90 | grid-template-rows: repeat(3, 200px);`;
91 |
92 | const codeString2 = `grid-column: 1/3;
93 | grid-row: 1/3;`;
94 |
95 | const codeString3 = `grid-column-start: 1;
96 | grid-column-end: 3;
97 | grid-row-start: 1;
98 | grid-row-end: 3;`;
99 |
100 | const codeString4 = "grid-column: 3/6;";
101 |
102 | const codeString5 = `grid-column: 1/3;
103 | grid-row: 3/4;`;
104 |
105 | const codeString6 = `grid-column: 3/5;
106 | grid-row: 2/4;`;
107 |
108 | return (
109 | <>
110 | Example 3
111 |
112 |
113 | {codeString1}
114 |
115 |
116 |
117 |
118 | {" "}
119 |
120 | {codeString2}
121 |
122 |
OR
123 |
124 | {codeString3}
125 |
126 |
127 |
128 |
129 | {codeString4}
130 |
131 |
132 |
133 |
134 | {codeString5}
135 |
136 |
137 |
138 |
139 | {codeString6}
140 |
141 |
142 |
143 |
144 |
145 | >
146 | );
147 | };
148 |
--------------------------------------------------------------------------------
/pages/blogs/css/css-rare-selectors.jsx:
--------------------------------------------------------------------------------
1 | import React, { Fragment } from "react";
2 | import Head from "next/head";
3 |
4 | import Theme from "@/utils/Theme";
5 | import BackTo from "@/components/buttons/BackTo";
6 |
7 | const CssSelector = () => {
8 | return (
9 |
10 |
11 | Css-rare-selector
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
CSS Rare Selector
21 |
22 | If you are a web developer then you have used many css selector
23 | to give styling to your web page. In this blog we are going to
24 | explore some rare but usefull selector of css
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 | 1. Adjacent Sibling Selector (+)
34 |
35 |
36 | In simple way it select the next first sibling respectively
37 | tag.
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 | 2. General Sibling Selector (~)
46 |
47 |
48 | Where + select next first sibling but ~ select all next
49 | sibling after tag.
50 |
51 |
52 |
53 |
54 |
55 |
Pseudo class selector
56 |
57 |
58 |
3. :active
59 |
Select all active link
60 |
61 |
62 |
63 |
64 |
65 |
4. :checked
66 |
Select all chcked input
67 |
68 |
69 |
70 |
71 |
72 |
5. :empty
73 |
Select all element that has no children
74 |
75 |
76 |
77 |
78 |
79 |
5. :enabled
80 |
Select all enabled input
81 |
82 |
83 |
84 |
85 |
86 |
6. :first-of-type
87 |
Select all element that is first element of its parent
88 |
89 |
90 |
91 |
92 |
93 |
7. :last-of-type
94 |
95 | Select all element that is last element of its parent(opposite
96 | of first-of-type)
97 |
98 |
99 |
100 |
101 |
102 |
103 |
8. :focus
104 |
Select all input element that has focus
105 |
106 |
107 |
108 |
109 |
110 |
9. :in-range
111 |
Select all input element that has a value in a range
112 |
113 |
114 |
115 |
116 |
117 |
10. :invalid
118 |
Select all input element that has a invalid value
119 |
120 |
121 |
122 |
123 |
124 |
10. :lang(language)
125 |
126 | Select all element with a lang attribute value start with
127 | language
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 | On August 6, 1991, without fanfare, British computer scientist Tim
136 | Berners-Lee published the first-ever website while working at
137 | CERN, the huge particle physics lab in Switzerland
138 |
139 |
140 |
141 |
142 |
143 | );
144 | };
145 |
146 | export default CssSelector;
147 |
--------------------------------------------------------------------------------
/pages/blogs/css/css-transform.jsx:
--------------------------------------------------------------------------------
1 | import React, { Fragment, useState } from "react";
2 | import Head from "next/head";
3 |
4 | import Theme from "@/utils/Theme";
5 | import BackTo from "@/components/buttons/BackTo";
6 |
7 | const CssTransform = () => {
8 | const [value1, setValue1] = useState(0);
9 | const [direction1, setDirection1] = useState("X");
10 | const [value2, setValue2] = useState(0);
11 | const [direction2, setDirection2] = useState("X");
12 |
13 | return (
14 |
15 |
16 | CSS Transform
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
CSS Transform
26 |
27 | Css tranform is less used but very important property of css
28 | which is use to give some movement in our web page which make ux
29 | better. In this blog we are going to understand css transform
30 | with easy examples.
31 |
32 |
33 |
34 |
35 |
36 | {/* Example */}
37 |
43 |
44 |
45 | {/* Example */}
46 |
52 |
53 |
54 |
55 |
56 | "College or Degree can't define you and can't
57 | decide What you can do?."
58 |
59 |
60 |
61 |
62 |
63 | );
64 | };
65 |
66 | export default CssTransform;
67 |
68 | const Exa1 = ({ value1, setValue1, direction1, setDirection1 }) => {
69 | return (
70 |
71 |
Example 1
72 |
setValue1(e.target.value)}
78 | step={25}
79 | type="range"
80 | value={value1}
81 | />
82 |
83 | {/* Direction Radios */}
84 |
89 |
90 |
91 | transform: translate{" "}
92 | {direction1}
93 |
94 | ({`${value1}px`})
95 |
96 |
97 |
101 |
102 | );
103 | };
104 |
105 | const Exa1Radios = ({ setValue1, direction1, setDirection1 }) => {
106 | return (
107 |
140 | );
141 | };
142 |
143 | const Exa2 = ({ value2, setValue2, direction2, setDirection2 }) => {
144 | return (
145 |
146 |
Example 2
147 |
setValue2(e.target.value)}
153 | step={25}
154 | type="range"
155 | value={value2}
156 | />
157 |
158 | {/* Direction Radios */}
159 |
164 |
165 |
166 | transform: translate{" "}
167 | {direction2}
168 |
169 | ({`${value2}deg`})
170 |
171 |
172 |
176 |
177 | );
178 | };
179 |
180 | const Exa2Radios = ({ setValue2, direction2, setDirection2 }) => {
181 | return (
182 |
231 | );
232 | };
233 |
--------------------------------------------------------------------------------
/pages/blogs/css/linear-gradient.jsx:
--------------------------------------------------------------------------------
1 | import React, { Fragment, useState } from "react";
2 | import Head from "next/head";
3 |
4 | import Theme from "@/utils/Theme";
5 | import BackTo from "@/components/buttons/BackTo";
6 |
7 | const LinearGradient = () => {
8 | const [dire1, setDire1] = useState("right");
9 | const [dire2, setDire2] = useState("top");
10 | const [dire3, setDire3] = useState("right");
11 | const [dire4, setDire4] = useState("right");
12 | const [color1, setColor1] = useState("red");
13 | const [color2, setColor2] = useState("orange");
14 | const [color3, setColor3] = useState("blue");
15 | const [color4, setColor4] = useState("aqua");
16 | const [color5, setColor5] = useState("red");
17 | const [color6, setColor6] = useState("blue");
18 | const [color7, setColor7] = useState("green");
19 |
20 | return (
21 |
22 |
23 | linear-gradient
24 |
25 |
26 |
27 |
28 |
29 |
30 |
172 |
173 |
Hello
174 |
175 |
176 |
177 | );
178 | };
179 |
180 | export default LinearGradient;
181 |
--------------------------------------------------------------------------------
/pages/blogs/css/object-fit.jsx:
--------------------------------------------------------------------------------
1 | import React, { Fragment } from "react";
2 | import Head from "next/head";
3 | import Image from "next/image";
4 |
5 | import Theme from "@/utils/Theme";
6 | import BackTo from "@/components/buttons/BackTo";
7 |
8 | const ObjectFit = () => {
9 | return (
10 |
11 |
12 | Object-Fit
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | object-fit
22 |
23 |
24 |
25 | object-fit : fill
26 |
27 |
28 |
29 | In This condition image cover all it's parent width and height but
30 | not maintain it's own width and hight ratio.
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 | object-fit : contain
39 |
40 |
41 | In This condition image maintain it's own width and heigth ratio
42 | but not neccessary to cover parent element's all height and width.
43 |
44 |
45 |
51 |
52 |
53 |
54 | object-fit : cover
55 |
56 |
57 | This property will cover all with and heigth of parent element of
58 | image width maintain image width and height ratio.
59 |
60 |
61 |
67 |
68 |
69 |
70 | object-fit : none
71 |
72 |
73 | In This condition image have it's real width and height.
74 |
75 |
76 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 | );
90 | };
91 |
92 | export default ObjectFit;
93 |
--------------------------------------------------------------------------------
/pages/blogs/javascript/Hoisting.jsx:
--------------------------------------------------------------------------------
1 | import React, { Fragment, useContext } from "react";
2 | import Head from "next/head";
3 | import SyntaxHighlighter from "react-syntax-highlighter";
4 | import { github, dark } from "react-syntax-highlighter/dist/cjs/styles/hljs";
5 |
6 | import Theme from "@/utils/Theme";
7 | import BackTo from "@/components/buttons/BackTo";
8 | import { ThemeContext } from "@/context/themeContext";
9 |
10 | const HoistingComponent = () => {
11 | const { theme } = useContext(ThemeContext);
12 |
13 | return (
14 |
15 |
16 | Javascript hoisting
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
Hoisting
25 |
26 |
27 |
28 |
29 |
30 |
31 |
Lorem
32 |
33 |
34 |
35 | );
36 | };
37 |
38 | export default HoistingComponent;
39 |
40 | const Example1 = ({ myDark }) => {
41 | const codeString = ` sayHello();
42 |
43 | function sayHello() {
44 | console.log("Hello!");
45 | }`;
46 | return (
47 | <>
48 |
49 | Example 1 : Function Declaration Hoisting
50 |
51 |
56 | {codeString}
57 |
58 |
59 | In this example, we call the sayHello()
60 | function before it is actually defined. However JavaScript hoists
61 | function declaration to the top of their scope, so the function can be
62 | called before its declarations without causing a error. The output will
63 | be "Hello".
64 |
65 | >
66 | );
67 | };
68 |
69 | const Example2 = ({ myDark }) => {
70 | const codeString = ` console.log(x);
71 | var x = 5;`;
72 | return (
73 | <>
74 |
75 | Example 2 : Variable Declaration Hoisting
76 |
77 |
82 | {codeString}
83 |
84 |
85 | In this example, we try to access the value of the variable{" "}
86 | "x" before it is declared. However javaScript
87 | hoists variable declaration to the top of their scope, so the variable
88 | is created before the console log statement is executed. The output will
89 | be "undefined" because the variable is
90 | declared but not assigned a value at the time "console log"
91 | statement.
92 |
93 | >
94 | );
95 | };
96 |
97 | const Example3 = ({ myDark }) => {
98 | const codeString = ` function foo() {
99 | console.log(x);
100 | var x = 10;
101 | console.log(x);
102 | }
103 | foo();`;
104 |
105 | return (
106 | <>
107 |
108 | Example 3 : Hoisting within a Function
109 |
110 |
115 | {codeString}
116 |
117 |
118 | In this example, we define a function "foo" {" "}
119 | that contain variable declaration and assignment. When we call the
120 | function JavaScript hoist the variable declarations{" "}
121 | "var x" to the top of the functon's
122 | scope. However, the assignment "x=10" is
123 | not hoisted, so the first "console.log" {" "}
124 | statement will output "undefined" , and the
125 | second "console.log" statement will output{" "}
126 | "10"
127 |
128 | >
129 | );
130 | };
131 |
--------------------------------------------------------------------------------
/pages/blogs/javascript/debouncing.jsx:
--------------------------------------------------------------------------------
1 | import React, { Fragment, useContext } from "react";
2 | import Head from "next/head";
3 | import { github, dark } from "react-syntax-highlighter/dist/cjs/styles/hljs";
4 | import SyntaxHighlighter from "react-syntax-highlighter";
5 |
6 | import Theme from "@/utils/Theme";
7 | import BackTo from "@/components/buttons/BackTo";
8 | import { ThemeContext } from "@/context/themeContext";
9 |
10 | const Debouncing = () => {
11 | const { theme } = useContext(ThemeContext);
12 |
13 | return (
14 |
15 |
16 | Debouncing in JavaScript
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
Debouncing in JavaScript
25 |
26 |
DEFINATION
27 |
By Javascript
28 |
29 | The concept of debouncing is pretty straightforward. It delays the
30 | function invocation by a defined period of time to avoid
31 | unnecessary invocations. So, the function will only be invoked if
32 | no event is triggered within that time, If the user triggers a new
33 | event during that time the time will be reset.
34 |
35 |
By Me
36 |
37 | Dekho har bar event par function call karne ki bajaye ek time set
38 | kr diya jaata hai jisase pata chale ki user abb output chahata hai
39 | or time khatam hone par function call ho jata hai. Agar hum 5 bar
40 | ki jagah ek bar function call karainge to application ki speed
41 | badhegi obevious hai.
42 |
43 |
44 |
45 |
46 |
47 |
Namaste
48 |
49 |
50 |
51 | );
52 | };
53 |
54 | export default Debouncing;
55 |
56 | const Example1 = ({ myDark }) => {
57 | const codeString = `const Example1 = () => {
58 | const debounceFun = (fun, delay) => {
59 | var timer;
60 |
61 | return function () {
62 | clearTimeout(timer);
63 | timer = setTimeout(() => {
64 | fun();
65 | }, delay);
66 | };
67 | };
68 |
69 | const innerFun = debounceFun(() => {
70 | alert("Function run after 2 second");
71 | }, 2000);
72 | return (
73 |
79 | );
80 | };`;
81 |
82 | const debounceFun = (fun, delay) => {
83 | var timer;
84 |
85 | return function () {
86 | clearTimeout(timer);
87 | timer = setTimeout(() => {
88 | fun();
89 | }, delay);
90 | };
91 | };
92 |
93 | const innerFun = debounceFun(() => {
94 | alert("Function run after 2 seconds");
95 | }, 2000);
96 |
97 | return (
98 | <>
99 | Example 1
100 |
101 | In This example when you stop writing for 2 second alert will be showing
102 | = "Function run after 2 seconds"
103 |
104 |
112 |
117 | {codeString}
118 |
119 | >
120 | );
121 | };
122 |
--------------------------------------------------------------------------------
/pages/blogs/javascript/throttling.jsx:
--------------------------------------------------------------------------------
1 | import Head from "next/head";
2 | import React, { Fragment, useContext, useState } from "react";
3 | import SyntaxHighlighter from "react-syntax-highlighter";
4 | import { github, dark } from "react-syntax-highlighter/dist/cjs/styles/hljs";
5 |
6 | import Theme from "@/utils/Theme";
7 | import BackTo from "@/components/buttons/BackTo";
8 | import { ThemeContext } from "@/context/themeContext";
9 |
10 | const Throttling = () => {
11 | const { theme } = useContext(ThemeContext);
12 |
13 | return (
14 |
15 |
16 | Throttling in JavaScript
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
Throttling in JavaScript
25 |
26 |
Defination
27 |
28 |
English wale
29 |
30 | Trottling is a technique in which, no matters how many times user
31 | fires the event, the attached function executed only once in a
32 | given time interval.
33 |
34 |
35 |
Hindi Wale
36 |
37 | Dekho bhai user bar bar button click kar ke jyada payment na kar
38 | de 😂😂 .Esliye button click karte hi usko kuch time disable kr
39 | dete hai. Jisase ki galti se 1 se jyada bar click na hoye. Yahi
40 | apni throttling hai.
41 |
42 |
43 |
44 |
45 |
46 |
Hello
47 |
48 |
49 |
50 | );
51 | };
52 |
53 | export default Throttling;
54 |
55 | const Example1 = ({ myDark }) => {
56 | const codeString = `const Example1 = () => {
57 | const [isTime, setIsTime] = useState(false);
58 | const [count, setCount] = useState(0);
59 |
60 | const throttleFun = (call, delay) => {
61 | return function () {
62 | if (isTime) return;
63 | setIsTime(true);
64 | call();
65 |
66 | setTimeout(() => {
67 | setIsTime(false)
68 | }, delay);
69 | };
70 | };
71 |
72 | const runFun = throttleFun(() => {
73 | setCount(count + 1);
74 | }, 3000);
75 |
76 | return (
77 | <>
78 | Click
79 | {count}
80 | >
81 | );
82 | };`;
83 |
84 | const [isTime, setIsTime] = useState(false);
85 | const [count, setCount] = useState(0);
86 |
87 | const throttleFun = (call, delay) => {
88 | return function () {
89 | if (isTime) return;
90 | setIsTime(true);
91 | call();
92 |
93 | setTimeout(() => {
94 | setIsTime(false);
95 | }, delay);
96 | };
97 | };
98 |
99 | const runFun = throttleFun(() => {
100 | setCount(count + 1);
101 | }, 3000);
102 |
103 | return (
104 | <>
105 | Example 1
106 |
107 | In This example when you clicked button it delays for 3 second before
108 | next call.
109 |
110 |
115 | Click
116 |
117 | {count}
118 |
123 | {codeString}
124 |
125 | >
126 | );
127 | };
128 |
--------------------------------------------------------------------------------
/pages/blogs/others/github-pages-deployment.jsx:
--------------------------------------------------------------------------------
1 | import React, { Fragment, useContext } from "react";
2 | import Head from "next/head";
3 | import { github, dark } from "react-syntax-highlighter/dist/cjs/styles/hljs";
4 | import SyntaxHighlighter from "react-syntax-highlighter";
5 |
6 | import Theme from "@/utils/Theme";
7 | import BackTo from "@/components/buttons/BackTo";
8 | import { ThemeContext } from "@/context/themeContext";
9 |
10 | const GithubPagesDeploy = () => {
11 | const { theme } = useContext(ThemeContext);
12 |
13 | return (
14 |
15 |
16 | React Deployment on Github Pages
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
React Deployment on Github Page
25 |
26 |
27 | {" "}
28 | Note:- Before going to deploy a{" "}
29 | react app on Github Pages you should know github
30 | pages not support packages like react-router , so
31 | you can deploy simple static site on github
32 | pages.
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
❤️ Thank You 🙏
41 |
42 |
43 |
Hello
44 |
45 |
46 |
47 | );
48 | };
49 |
50 | export default GithubPagesDeploy;
51 |
52 | const StepOne = ({ myDark }) => {
53 | const codeString =
54 | '"homepage": "https://your_github_username.github.io/repo_name",';
55 |
56 | return (
57 | <>
58 |
59 | 1. Add{" "}
60 |
61 | homepage
62 | {" "}
63 | to{" "}
64 |
65 | package.json
66 | {" "}
67 | file.
68 |
69 |
70 |
71 | {codeString}
72 |
73 | >
74 | );
75 | };
76 |
77 | const StepTwo = ({ myDark }) => {
78 | const codeString1 = "npm install --save gh-pages";
79 | const codeString2 = "yarn add gh-pages";
80 |
81 | return (
82 | <>
83 |
84 | 2. Install{" "}
85 |
86 | gh-pages
87 | {" "}
88 | .
89 |
90 |
91 |
92 | {codeString1}
93 |
94 | OR
95 |
96 | {codeString2}
97 |
98 | >
99 | );
100 | };
101 |
102 | const StepThree = ({ myDark }) => {
103 | const codeString = `"predeploy": "npm run build",
104 | "deploy": "gh-pages -d build"`;
105 |
106 | return (
107 | <>
108 |
109 | 3. Add{" "}
110 |
111 | deploy
112 | {" "}
113 | to
114 |
115 | scripts
116 | {" "}
117 | in
118 |
119 | package.json
120 | {" "}
121 | .
122 |
123 |
124 |
125 | {codeString}
126 |
127 | >
128 | );
129 | };
130 |
131 | const StepFour = ({ myDark }) => {
132 | const codeString = "npm run deploy";
133 |
134 | return (
135 | <>
136 |
137 | 4. Deploy the site by running{" "}
138 |
139 | npm run deploy
140 | {" "}
141 | .
142 |
143 |
144 |
145 | {codeString}
146 |
147 | >
148 | );
149 | };
150 |
--------------------------------------------------------------------------------
/pages/blogs/others/readme.jsx:
--------------------------------------------------------------------------------
1 | import React, { Fragment, useContext } from "react";
2 | import Head from "next/head";
3 | import { github, dark } from "react-syntax-highlighter/dist/cjs/styles/hljs";
4 | import SyntaxHighlighter from "react-syntax-highlighter";
5 |
6 | import Theme from "@/utils/Theme";
7 | import BackTo from "@/components/buttons/BackTo";
8 | import { ThemeContext } from "@/context/themeContext";
9 |
10 | const Readme = () => {
11 | const { theme } = useContext(ThemeContext);
12 |
13 | return (
14 |
15 |
16 | Radme syntax
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
Readme File Syntax
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
Hello
33 |
34 |
35 |
36 | );
37 | };
38 |
39 | export default Readme;
40 |
41 | const PointOne = ({ myDark }) => {
42 | const codeString1 = `# Heading level 1
43 |
44 | ## Heading level 2
45 |
46 | ### Heading level 3
47 |
48 | #### Heading level 4
49 |
50 | ##### Heading level 5
51 |
52 | ###### Heading level 6`;
53 |
54 | return (
55 | <>
56 | 1. Typography
57 |
58 |
63 | {codeString1}
64 |
65 |
66 |
Heading level 1
67 | Heading level 2
68 | Heading level 3
69 | Heading level 4
70 | Heading level 5
71 | Heading level 6
72 |
73 |
74 | {" "}
75 | Note:- Make sure to add a space after last # and must
76 | be line space after and before heading typography.
77 |
78 | >
79 | );
80 | };
81 |
82 | const PointTwo = ({ myDark }) => {
83 | const codeString = `**Bold Text**
84 | *Italic Text*`;
85 |
86 | return (
87 | <>
88 | 2. Bold and Italic
89 |
90 |
96 | {codeString}
97 |
98 |
99 |
Bold Text
100 |
Italic Text
101 |
102 | >
103 | );
104 | };
105 |
106 | const PointThree = ({ myDark }) => {
107 | const codeString = `Write text without any space in starting.
108 | Simple add two or more space in end of line for line break in a Paragraph.`;
109 |
110 | return (
111 | <>
112 | 3. Paragraph
113 |
114 |
120 | {codeString}
121 |
122 |
123 |
124 |
125 | Write text without any space in starting.
126 | Simple add 2 or 3 space in end of line for line break in a Paragraph.
127 |
128 |
129 | >
130 | );
131 | };
132 |
133 | const PointFour = ({ myDark }) => {
134 | const codeString =
135 | "> To create a blockquote, add a (>) in starting of a paragraph or line.";
136 |
137 | return (
138 | <>
139 | 4. Blockquotes
140 |
146 | {codeString}
147 |
148 |
149 | {" "}
150 | Note:- You can test Blockquotes in a readme.md file
151 | for how it look likes.
152 |
153 |
154 | {" "}
155 | Bonus:- You Can Preview your readme.md file in vs
156 | code, simply open your readme.md file in vs code, at right top you can
157 | see a option for open preview OR use ctr+shift+v .
158 |
159 | >
160 | );
161 | };
162 |
163 | const PointFive = ({ myDark }) => {
164 | const codeString1 = `1. simply write number in
165 | 2. starting of line
166 | 3. and don't forget
167 | 4. dot (.) after number`;
168 |
169 | const codeString2 = `- for unordered
170 | - list
171 | - simply write (-)
172 | - in starting of line`;
173 |
174 | return (
175 | <>
176 | 5. Lists
177 |
182 | {codeString1}
183 |
184 |
185 | simple write number in
186 | starting of line
187 | and don't forget
188 | dot (.) after number
189 |
190 |
191 |
196 | {codeString2}
197 |
198 |
199 | for unordered
200 | list
201 | simply write (-)
202 | in starting of line
203 |
204 | >
205 | );
206 | };
207 |
--------------------------------------------------------------------------------
/pages/blogs/react/drag-and-drop.jsx:
--------------------------------------------------------------------------------
1 | import React from "react"
2 |
3 | const DragAndDrop = () => {
4 | return (
5 | DragAndDrop
6 | )
7 | }
8 |
9 | export default DragAndDrop
--------------------------------------------------------------------------------
/pages/blogs/react/react-masonary.jsx:
--------------------------------------------------------------------------------
1 | import React, { Fragment, useEffect, useState } from "react";
2 | import Head from "next/head";
3 | import axios from "axios";
4 | import Masonry, { ResponsiveMasonry } from "react-responsive-masonry";
5 |
6 | import Theme from "@/utils/Theme";
7 | import BackTo from "@/components/buttons/BackTo";
8 |
9 | const ReactMasonary = () => {
10 | const [photos, setPhotos] = useState([]);
11 |
12 | useEffect(() => {
13 | axios
14 | .get("/api/masonary")
15 | .then((res) => {
16 | console.log(res.data.photos);
17 | setPhotos(res.data.photos);
18 | })
19 | .catch((err) => console.log(err));
20 | }, []);
21 |
22 | const handleDownload = async (imageUrl, myurl) => {
23 | try {
24 | const response = await fetch(imageUrl);
25 | const blob = await response.blob();
26 | const url = URL.createObjectURL(blob);
27 |
28 | const link = document.createElement("a");
29 | link.href = url;
30 | link.download = `${myurl.split("/")[myurl.split("/").length - 2]}.jpeg`;
31 | link.click();
32 |
33 | // Clean up the temporary URL
34 | URL.revokeObjectURL(url);
35 | } catch (error) {
36 | console.error("Error downloading image:", error);
37 | }
38 | };
39 |
40 | return (
41 |
42 |
43 | React Masonary
44 |
45 |
46 |
47 |
48 |
49 |
50 |
53 |
54 | {photos?.map((photo, key) => {
55 | return (
56 |
57 |
59 | handleDownload(photo.src.original, photo.url)
60 | }
61 | >
62 | Download
63 |
64 | {/* eslint-disable-next-line @next/next/no-img-element */}
65 |
66 |
67 | );
68 | })}
69 |
70 |
71 |
72 |
73 |
74 | );
75 | };
76 |
77 | export default ReactMasonary;
78 |
--------------------------------------------------------------------------------
/pages/blogs/react/react-res-carousel.jsx:
--------------------------------------------------------------------------------
1 | import React, { Fragment, useState } from "react";
2 | import Head from "next/head";
3 | import Image from "next/image";
4 | import { Carousel } from "react-responsive-carousel";
5 | import "react-responsive-carousel/lib/styles/carousel.min.css"; // requires a loader
6 |
7 | import Theme from "@/utils/Theme";
8 | import BackTo from "@/components/buttons/BackTo";
9 |
10 | const ReactResposiveCarousel = () => {
11 | const [arrows, setArrows] = useState(false);
12 | const [indicator, setIndicator] = useState(false);
13 | const [status, setStatus] = useState(false);
14 | const [keyBoard, setKeyBoard] = useState(false);
15 | const [thumbs, setThumbs] = useState(false);
16 |
17 | return (
18 |
19 |
20 | React Responsive Carousel
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
React Responsive Carousel
29 |
90 |
91 |
98 |
99 |
105 |
106 |
107 |
113 |
114 |
115 |
121 |
122 |
123 |
124 |
125 |
126 |
Lorem
127 |
128 |
129 |
130 | );
131 | };
132 |
133 | export default ReactResposiveCarousel;
134 |
--------------------------------------------------------------------------------
/pages/blogs/react/useEffect.jsx:
--------------------------------------------------------------------------------
1 | import React, { Fragment, useContext } from "react";
2 | import Head from "next/head";
3 | import SyntaxHighlighter from "react-syntax-highlighter";
4 | import { dark, github } from "react-syntax-highlighter/dist/cjs/styles/hljs";
5 |
6 | import Theme from "@/utils/Theme";
7 | import BackTo from "@/components/buttons/BackTo";
8 | import { ThemeContext } from "@/context/themeContext";
9 |
10 | const UseEffect = () => {
11 | const { theme } = useContext(ThemeContext);
12 |
13 | return (
14 |
15 |
16 | useEffect in React
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
useEffect in React
25 |
26 |
27 |
28 | The useEffect hook allows you to perform side Effects in your
29 | components.
30 |
31 |
32 |
33 | Some Examples of side effect are : Fetching Data, directly
34 | updating the form, and timers.
35 |
36 |
37 |
38 | useEffect accepts two arguments, The second argument is optional
39 | = useEffect(<function>, <dependency>)
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
❤️ Thank You 🙏
48 |
49 |
50 |
Pranam
51 |
52 |
53 |
54 | );
55 | };
56 |
57 | export default UseEffect;
58 |
59 | const Example1 = ({ myDark }) => {
60 | const codeString = ` useEffect(() => {
61 | //Runs on every render
62 | });`;
63 |
64 | return (
65 | <>
66 | Example 1
67 | 1. No dependency passed:
68 |
73 | {codeString}
74 |
75 | >
76 | );
77 | };
78 |
79 | const Example2 = ({ myDark }) => {
80 | const codeString = `useEffect(() => {
81 | //Runs only on the first render
82 | }, []);`;
83 |
84 | return (
85 | <>
86 | Example 2
87 | 2. An empty array:
88 |
93 | {codeString}
94 |
95 | >
96 | );
97 | };
98 |
99 | const Example3 = ({ myDark }) => {
100 | const codeString = `useEffect(() => {
101 | //Runs on the first render
102 | //And any time any dependency value changes
103 | }, [prop, state]);`;
104 |
105 | return (
106 | <>
107 | Example 3
108 | 3. Props or state values:
109 |
114 | {codeString}
115 |
116 | >
117 | );
118 | };
119 |
--------------------------------------------------------------------------------
/pages/blogs/react/useState.jsx:
--------------------------------------------------------------------------------
1 | import React, { Fragment, useContext } from "react";
2 | import Head from "next/head";
3 | import SyntaxHighlighter from "react-syntax-highlighter";
4 | import { github, dark } from "react-syntax-highlighter/dist/cjs/styles/hljs";
5 |
6 | import BackTo from "@/components/buttons/BackTo";
7 | import Theme from "@/utils/Theme";
8 | import { ThemeContext } from "@/context/themeContext";
9 |
10 | const UseState = () => {
11 | const { theme } = useContext(ThemeContext);
12 |
13 | return (
14 |
15 |
16 | useState in React
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
useState in React
25 |
26 |
27 |
Introduction :-
28 |
29 | React is a popular javascript library for building user
30 | interfaces, and its introduction to hooks in 16.8 brought
31 | significant improvements to functional component. One of the
32 | most widely used hooks is useState , which allows developers to
33 | add state managment capabilities to their functional
34 | compoenents. In this blog post, we will explore the usestate
35 | hook, understand its usage, and learn how it simplifies state
36 | managment in React applications.
37 |
38 |
39 |
Why useState? :-
40 |
41 | Before the introduction of hooks, state managment in React is
42 | primarily done using class components. While class components
43 | serve the purpose , they often require boilerplate code and
44 | complex syntax . Functinal components, on the other hand, were
45 | simpler and more lightweight but lacked built in state managment
46 | capabilities. The useState hook bridges this gap by enabling
47 | functinal components to handle state, making them more powerful
48 | and easier to work with.
49 |
50 |
51 |
52 |
53 |
🙏 Dhanyawaad
54 |
55 |
56 |
57 |
Namaste
58 |
59 |
60 |
61 | );
62 | };
63 |
64 | export default UseState;
65 |
66 | const Syntax = ({ myDark }) => {
67 | const codeString = "const [state, setState] = useState(initialState);";
68 |
69 | return (
70 | <>
71 |
72 | The useState hook is a function that takes an initial state value as its
73 | arguments and return an array with two elements: the current state value
74 | and a function to update that state value.
75 |
76 |
77 |
82 | {codeString}
83 |
84 |
85 |
86 |
87 |
Here's the breakdown of syntax :-
88 |
89 |
90 | state = Represents the current value of the state
91 | variable. It can be of any data type e.g = Boolean, String, Object or
92 | Array.
93 |
94 |
95 |
96 | setState = The function return by useState that
97 | allows you to update the state value . When called with a new value,
98 | it triggers a re-render of the component , updating the state and any
99 | component elements that depend on it.
100 |
101 |
102 |
103 | useState(initialState) =
104 | the useState function takes the initial state values as its argument .
105 | This initial state is only used during the first render of the
106 | component. After that, the state variable will be updated with new
107 | values.
108 |
109 |
110 | >
111 | );
112 | };
113 |
--------------------------------------------------------------------------------
/pages/blogs/react/virtual-dom.jsx:
--------------------------------------------------------------------------------
1 | import React, { Fragment } from "react";
2 | import Head from "next/head";
3 |
4 | import Theme from "@/utils/Theme";
5 | import BackTo from "@/components/buttons/BackTo";
6 |
7 | const VirtualDom = () => {
8 | return (
9 |
10 |
11 | Virtual DOM
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 | Virtual DOM in React
21 |
22 |
23 |
24 | When you're working with a web application built using frameworks
25 | like React, there are often many changes happening in user
26 | interface(UI). The virtual dom is a concept that helps optimize
27 | these changes and improve performance.
28 |
29 |
30 |
1. Traditional DOM
31 |
32 | The document object model(DOM) is representation of the html
33 | structure of a web page. It defines how elements are organized,
34 | their attributes and their relationship with each other. Whenever
35 | there's a change in the application's state or data, the DOM needs
36 | to be updated to reflect those changes.
37 |
38 |
39 |
2. Virtual DOM
40 |
41 | The virtual DOM is like a lightweight copy or representation of
42 | actual DOM. It's a javascript object that keeps track of current
43 | state of the ui. When changes occures in your application, the
44 | virtual dom is updated instead of directly modifying the actual
45 | DOM.
46 |
47 |
48 |
49 |
"Ram Ram"
50 |
51 |
52 |
53 | );
54 | };
55 |
56 | export default VirtualDom;
57 |
--------------------------------------------------------------------------------
/pages/index.js:
--------------------------------------------------------------------------------
1 | import { Fragment } from "react";
2 | import Head from "next/head";
3 | import dynamic from "next/dynamic";
4 |
5 | import ShoveeModal from "@/utils/ShoveeModal";
6 | import About from "@/sections/about";
7 | import Education from "@/sections/education";
8 | import Experience from "@/sections/experience";
9 | const Navbar = dynamic(() => import("@/layout/navbar/Navbar"))
10 | const Footer = dynamic(() => import("@/layout/footer/Footer"))
11 | const Intro = dynamic(() => import("@/sections/Intro"))
12 | const Skills = dynamic(() => import("@/sections/Skills"))
13 | const Projects = dynamic(() => import("@/sections/Projects"))
14 | const LatestBlogs = dynamic(() => import("@/sections/LatestBlogs"))
15 | const Apps = dynamic(() => import("@/sections/Apps"))
16 | const SendMail = dynamic(() => import("@/utils/SendMail"))
17 | const SocialMedia = dynamic(() => import("@/utils/SocialMedia"))
18 | const ChatSystem = dynamic(() => import("@/utils/ChatSystem"))
19 | const Feedback = dynamic(() => import("@/utils/Feedback"))
20 |
21 | const Home = () => {
22 |
23 | return (
24 |
25 |
26 | Shiv's Portfolio
27 | {/* */}
28 |
29 |
30 |
31 | {/* */}
32 |
33 |
34 |
35 |
36 |
37 |
38 | {/* */}
39 |
40 |
41 |
42 |
43 |
44 |
45 | {/* */}
46 |
47 |
48 |
49 |
50 | {/* */}
51 |
52 |
53 |
54 |
55 |
56 | {/* Desktop Navbar */}
57 |
58 | {/* Welcome Page */}
59 |
60 | {/* About */}
61 |
62 | {/* Skills */}
63 |
64 | {/* Education */}
65 |
66 | {/* Experience */}
67 |
68 | {/* Projects */}
69 |
70 | {/* SocialMedia */}
71 |
72 |
73 | {/* LatestBlog */}
74 |
75 | {/* Apps */}
76 |
77 | {/* Send Mail */}
78 |
79 | {/* Footer */}
80 |
81 |
82 | {/* tawk.to Chat System */}
83 |
84 |
85 | {/* Feedback Modal */}
86 |
87 | {/* ShoveeModal */}
88 |
89 |
90 |
91 |
92 | );
93 | }
94 |
95 | export default Home
96 |
--------------------------------------------------------------------------------
/postcss.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | plugins: {
3 | tailwindcss: {},
4 | autoprefixer: {},
5 | }
6 | }
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iamshiv007/NextJS-Portfolio/117b48acd745ea5112462fe4e36d92358b9da7dc/public/favicon.ico
--------------------------------------------------------------------------------
/public/images/admin-dashboard.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iamshiv007/NextJS-Portfolio/117b48acd745ea5112462fe4e36d92358b9da7dc/public/images/admin-dashboard.png
--------------------------------------------------------------------------------
/public/images/apna-chat-gpt-l.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iamshiv007/NextJS-Portfolio/117b48acd745ea5112462fe4e36d92358b9da7dc/public/images/apna-chat-gpt-l.png
--------------------------------------------------------------------------------
/public/images/apna-chat-gpt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iamshiv007/NextJS-Portfolio/117b48acd745ea5112462fe4e36d92358b9da7dc/public/images/apna-chat-gpt.png
--------------------------------------------------------------------------------
/public/images/carousel1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iamshiv007/NextJS-Portfolio/117b48acd745ea5112462fe4e36d92358b9da7dc/public/images/carousel1.png
--------------------------------------------------------------------------------
/public/images/carousel2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iamshiv007/NextJS-Portfolio/117b48acd745ea5112462fe4e36d92358b9da7dc/public/images/carousel2.png
--------------------------------------------------------------------------------
/public/images/carousel3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iamshiv007/NextJS-Portfolio/117b48acd745ea5112462fe4e36d92358b9da7dc/public/images/carousel3.png
--------------------------------------------------------------------------------
/public/images/cartoon 0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iamshiv007/NextJS-Portfolio/117b48acd745ea5112462fe4e36d92358b9da7dc/public/images/cartoon 0.png
--------------------------------------------------------------------------------
/public/images/chat-gpt.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iamshiv007/NextJS-Portfolio/117b48acd745ea5112462fe4e36d92358b9da7dc/public/images/chat-gpt.ico
--------------------------------------------------------------------------------
/public/images/circle.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iamshiv007/NextJS-Portfolio/117b48acd745ea5112462fe4e36d92358b9da7dc/public/images/circle.png
--------------------------------------------------------------------------------
/public/images/developer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iamshiv007/NextJS-Portfolio/117b48acd745ea5112462fe4e36d92358b9da7dc/public/images/developer.png
--------------------------------------------------------------------------------
/public/images/ecommerce.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iamshiv007/NextJS-Portfolio/117b48acd745ea5112462fe4e36d92358b9da7dc/public/images/ecommerce.png
--------------------------------------------------------------------------------
/public/images/hii.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iamshiv007/NextJS-Portfolio/117b48acd745ea5112462fe4e36d92358b9da7dc/public/images/hii.png
--------------------------------------------------------------------------------
/public/images/hindi-translator-l.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iamshiv007/NextJS-Portfolio/117b48acd745ea5112462fe4e36d92358b9da7dc/public/images/hindi-translator-l.png
--------------------------------------------------------------------------------
/public/images/hindi-translator.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iamshiv007/NextJS-Portfolio/117b48acd745ea5112462fe4e36d92358b9da7dc/public/images/hindi-translator.ico
--------------------------------------------------------------------------------
/public/images/hindi-translator.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iamshiv007/NextJS-Portfolio/117b48acd745ea5112462fe4e36d92358b9da7dc/public/images/hindi-translator.png
--------------------------------------------------------------------------------
/public/images/male.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iamshiv007/NextJS-Portfolio/117b48acd745ea5112462fe4e36d92358b9da7dc/public/images/male.png
--------------------------------------------------------------------------------
/public/images/news-app-l.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iamshiv007/NextJS-Portfolio/117b48acd745ea5112462fe4e36d92358b9da7dc/public/images/news-app-l.png
--------------------------------------------------------------------------------
/public/images/news-app.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iamshiv007/NextJS-Portfolio/117b48acd745ea5112462fe4e36d92358b9da7dc/public/images/news-app.ico
--------------------------------------------------------------------------------
/public/images/news-app.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iamshiv007/NextJS-Portfolio/117b48acd745ea5112462fe4e36d92358b9da7dc/public/images/news-app.png
--------------------------------------------------------------------------------
/public/images/quiz-app-l.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iamshiv007/NextJS-Portfolio/117b48acd745ea5112462fe4e36d92358b9da7dc/public/images/quiz-app-l.png
--------------------------------------------------------------------------------
/public/images/quiz-app.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iamshiv007/NextJS-Portfolio/117b48acd745ea5112462fe4e36d92358b9da7dc/public/images/quiz-app.ico
--------------------------------------------------------------------------------
/public/images/quiz-app.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iamshiv007/NextJS-Portfolio/117b48acd745ea5112462fe4e36d92358b9da7dc/public/images/quiz-app.png
--------------------------------------------------------------------------------
/public/images/room.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iamshiv007/NextJS-Portfolio/117b48acd745ea5112462fe4e36d92358b9da7dc/public/images/room.jpg
--------------------------------------------------------------------------------
/public/images/salon-application.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iamshiv007/NextJS-Portfolio/117b48acd745ea5112462fe4e36d92358b9da7dc/public/images/salon-application.png
--------------------------------------------------------------------------------
/public/images/screen1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iamshiv007/NextJS-Portfolio/117b48acd745ea5112462fe4e36d92358b9da7dc/public/images/screen1.png
--------------------------------------------------------------------------------
/public/images/screen2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iamshiv007/NextJS-Portfolio/117b48acd745ea5112462fe4e36d92358b9da7dc/public/images/screen2.png
--------------------------------------------------------------------------------
/public/images/tic-tac-toe-l.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iamshiv007/NextJS-Portfolio/117b48acd745ea5112462fe4e36d92358b9da7dc/public/images/tic-tac-toe-l.png
--------------------------------------------------------------------------------
/public/images/tic-tac-toe.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iamshiv007/NextJS-Portfolio/117b48acd745ea5112462fe4e36d92358b9da7dc/public/images/tic-tac-toe.ico
--------------------------------------------------------------------------------
/public/images/tic-tac-toe.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iamshiv007/NextJS-Portfolio/117b48acd745ea5112462fe4e36d92358b9da7dc/public/images/tic-tac-toe.png
--------------------------------------------------------------------------------
/public/images/welcome-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iamshiv007/NextJS-Portfolio/117b48acd745ea5112462fe4e36d92358b9da7dc/public/images/welcome-screen.png
--------------------------------------------------------------------------------
/public/images/x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iamshiv007/NextJS-Portfolio/117b48acd745ea5112462fe4e36d92358b9da7dc/public/images/x.png
--------------------------------------------------------------------------------
/public/images/youtube-clone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iamshiv007/NextJS-Portfolio/117b48acd745ea5112462fe4e36d92358b9da7dc/public/images/youtube-clone.png
--------------------------------------------------------------------------------
/public/next.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/public/vercel.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/sections/Apps.jsx:
--------------------------------------------------------------------------------
1 | import React, { Fragment, useContext } from "react";
2 | import Link from "next/link";
3 | import Image from "next/image";
4 | import { IoMdAppstore } from "react-icons/io";
5 |
6 | import { AppsData } from "@/constants";
7 | import { ThemeContext } from "@/context/themeContext";
8 |
9 | const Apps = () => {
10 | const { theme } = useContext(ThemeContext);
11 |
12 | return (
13 |
14 |
15 |
16 |
17 |
18 | {" "}
19 |
20 | {" "}
21 | Apps
22 |
23 |
24 |
25 | {AppsData.map((app, key) => (
26 |
27 |
28 |
35 |
36 |
37 | ))}
38 |
39 |
40 |
41 |
42 |
43 | );
44 | };
45 |
46 | export default Apps;
47 |
48 | const MobileScreenApps = () => {
49 | return (
50 |
51 | {AppsData.map((app, key) => (
52 |
53 |
54 |
55 |
62 |
63 |
64 |
{app.name}
65 |
66 | ))}
67 |
68 | );
69 | };
70 |
--------------------------------------------------------------------------------
/sections/Intro.jsx:
--------------------------------------------------------------------------------
1 | "use client";
2 | import React, { Fragment, useEffect, useRef, useState } from "react";
3 | import Head from "next/head";
4 | import Link from "next/link";
5 |
6 | const Intro = () => {
7 | const [isHome, setIsHome] = useState(false);
8 |
9 | const homeRef = useRef();
10 | const introRef = useRef();
11 | const profileRef = useRef();
12 |
13 | // Intersection observer animation on scroll
14 | useEffect(() => {
15 | const getScreenWidth = () =>
16 | window.innerWidth ||
17 | document.documentElement.clientWidth ||
18 | document.body.clientWidth;
19 |
20 | // Scroll Animation
21 | if (homeRef.current) {
22 | const homeObserver = new IntersectionObserver(
23 | ([homeEntry]) => {
24 | setIsHome(homeEntry.isIntersecting);
25 | },
26 | {
27 | rootMargin: `${getScreenWidth() <= 700 ? "-100px" : "-300px"}`,
28 | }
29 | );
30 |
31 | homeObserver.observe(homeRef.current);
32 |
33 | if (isHome) {
34 | profileRef.current.classList.add("slide-in");
35 | introRef.current.classList.add("slide-in");
36 | } else {
37 | profileRef.current.classList.remove("slide-in");
38 | introRef.current.classList.remove("slide-in");
39 | }
40 | }
41 | }, [homeRef, isHome]);
42 |
43 | return (
44 |
45 |
46 | Shiv's Portfolio
47 |
48 |
49 |
53 |
57 |
58 | Hi There !
59 |
60 | {/* Profile Name */}
61 |
62 | I'm a full stack
63 |
64 | {" "}
65 | developer |
66 |
67 |
68 |
69 | {/* Hire Me Button */}
70 |
74 | Hire me
75 |
76 | {/* Download CV Button */}
77 |
82 | Download CV
83 |
84 |
85 |
86 |
87 | {/* Image */}
88 |
95 |
96 |
97 |
98 | );
99 | };
100 |
101 | export default Intro;
102 |
--------------------------------------------------------------------------------
/sections/LatestBlogs.jsx:
--------------------------------------------------------------------------------
1 | import React, { Fragment } from "react";
2 | import Link from "next/link";
3 | import Image from "next/image";
4 | import { BsPenFill } from "react-icons/bs";
5 |
6 | import { BlogsData } from "@/constants";
7 | import AnimatedButton from "@/components/buttons/AnimatedButton";
8 |
9 | const LatestBlogs = () => {
10 | return (
11 |
12 |
13 |
16 |
17 |
18 |
19 |
20 | Blogs
21 |
22 |
23 | {BlogsData.slice(-4)
24 | .reverse()
25 | .map((blog) => (
26 |
27 |
28 |
29 |
37 |
38 |
{blog.name}
39 |
40 | {blog.date}
41 |
42 |
43 |
44 |
45 |
46 | ))}
47 |
48 |
51 |
52 |
53 |
54 | );
55 | };
56 |
57 | export default LatestBlogs;
58 |
--------------------------------------------------------------------------------
/sections/Projects.jsx:
--------------------------------------------------------------------------------
1 | "use client";
2 | import React, { Fragment, useState, useRef, useEffect } from "react";
3 | import Link from "next/link";
4 | import { CgWebsite } from "react-icons/cg";
5 | import { HiExternalLink } from "react-icons/hi";
6 | import { BsGithub } from "react-icons/bs";
7 |
8 | import { ProjectsData } from "@/constants";
9 |
10 | const Project = () => {
11 | const [height1, setHeight1] = useState("");
12 | const [isProjects, setIsProjects] = useState(false);
13 | const projectRef = useRef();
14 | const projectBoxesRef = useRef();
15 |
16 | useEffect(() => {
17 | if (projectRef.current) {
18 | const projectsObserver = new IntersectionObserver(
19 | ([projectsEntry]) => {
20 | setIsProjects(projectsEntry.isIntersecting);
21 | },
22 | {
23 | rootMargin: "-100px",
24 | }
25 | );
26 |
27 | projectsObserver.observe(projectRef.current);
28 |
29 | if (isProjects) {
30 | projectBoxesRef.current.classList.add("pop-up-child");
31 | } else {
32 | projectBoxesRef.current.classList.remove("pop-up-child");
33 | }
34 | }
35 | }, [isProjects, projectRef]);
36 |
37 | return (
38 |
39 |
40 |
41 | Projects
42 |
43 |
44 |
48 | {ProjectsData.map((project) => (
49 |
53 | {/* Project Image */}
54 |
setHeight1("")}
59 | onMouseMove={() => setHeight1(project.projectName)}
60 | style={{
61 | backgroundImage: `url(${
62 | project?.projectImage?.imageUrl || ""
63 | })`,
64 | }}
65 | >
66 |
setHeight1("")}
69 | onMouseMove={() => setHeight1(project.projectName)}
70 | >
71 | {/* Project Name */}
72 |
75 | setHeight1(height1 === "" ? project.projectName : "")
76 | }
77 | >
78 | {project.projectName}
79 |
80 |
88 | {/* GitHub Link */}
89 | {project.liveUrl && (
90 |
95 |
96 |
97 | )}
98 | {/* Live url */}
99 | {project.githubUrl && (
100 |
105 |
106 |
107 | )}
108 |
109 |
110 |
111 | {/* Tech Stack */}
112 |
113 | {project.techs.map((tech) => (
114 |
118 | {tech}
119 |
120 | ))}
121 |
122 |
123 | ))}
124 |
125 |
126 |
127 | );
128 | };
129 |
130 | export default Project;
131 |
--------------------------------------------------------------------------------
/sections/Skills.jsx:
--------------------------------------------------------------------------------
1 | "use client";
2 | import React, { Fragment, useState, useEffect, useRef } from "react";
3 | import { FaLaptopCode } from "react-icons/fa";
4 |
5 | import { TechStackData } from "@/constants/SkillsData";
6 |
7 | const TechStack = () => {
8 | const [section, setSection] = useState("Advance");
9 | const [sectionData, setSectionData] = useState([]);
10 | const [istechStack, setIsTechStack] = useState(false);
11 | const techStackRef = useRef();
12 | const techBoxesRef = useRef();
13 | const buttonsRef = useRef();
14 |
15 | useEffect(() => {
16 | const getScreenWidth = () =>
17 | window.innerWidth ||
18 | document.documentElement.clientWidth ||
19 | document.body.clientWidth;
20 |
21 | const techStackObserver = new IntersectionObserver(
22 | ([techStackEntry]) => {
23 | setIsTechStack(techStackEntry.isIntersecting);
24 | },
25 | {
26 | rootMargin: `${getScreenWidth() <= 700 ? "-100px" : "-250px"}`,
27 | }
28 | );
29 |
30 | techStackObserver.observe(techStackRef.current);
31 |
32 | if (istechStack) {
33 | techBoxesRef.current.classList.add("pop-up-child");
34 | buttonsRef.current.classList.add("pop-up");
35 | } else {
36 | techBoxesRef.current.classList.remove("pop-up-child");
37 | buttonsRef.current.classList.remove("pop-up");
38 | }
39 | }, [istechStack]);
40 |
41 | useEffect(() => {
42 | const selectedSection = TechStackData.find((sections) =>
43 | sections.hasOwnProperty(section)
44 | );
45 | setSectionData(selectedSection ? selectedSection[section] : []);
46 |
47 | setTimeout(() => {
48 | techBoxesRef.current.classList.add("pop-up-child");
49 | }, 300);
50 | }, [section]);
51 |
52 | return (
53 |
54 |
59 |
60 | Tech Stack
61 |
62 |
63 |
67 | {
72 | setSection(e.target.innerText);
73 | if (section !== e.target.innerText)
74 | techBoxesRef.current.classList.remove("pop-up-child");
75 | }}
76 | >
77 | Advance
78 |
79 | {
84 | setSection(e.target.innerText);
85 | if (section !== e.target.innerText)
86 | techBoxesRef.current.classList.remove("pop-up-child");
87 | }}
88 | >
89 | Good
90 |
91 | {
96 | setSection(e.target.innerText);
97 | if (section !== e.target.innerText)
98 | techBoxesRef.current.classList.remove("pop-up-child");
99 | }}
100 | >
101 | Familiar
102 |
103 |
104 |
105 |
109 | {sectionData.map((tech) => (
110 |
114 |
{tech.icon}
115 |
{tech.name}
116 |
117 | ))}
118 |
119 |
120 |
121 | );
122 | };
123 |
124 | export default TechStack;
125 |
--------------------------------------------------------------------------------
/sections/about.jsx:
--------------------------------------------------------------------------------
1 | "use client";
2 | import React, { Fragment, useState, useRef, useEffect } from "react";
3 | import Image from "next/image";
4 | import { FaBlackTie, FaUserCheck } from "react-icons/fa";
5 | import { ImLocation } from "react-icons/im";
6 | import { IoPerson } from "react-icons/io5";
7 | import { BsMenuAppFill } from "react-icons/bs";
8 |
9 | const About = () => {
10 | const [isAbout, setIsAbout] = useState(false);
11 |
12 | const aboutRef = useRef();
13 | const profile2Ref = useRef();
14 | const aboutInfoRef = useRef();
15 |
16 | // Scroll Animation
17 | useEffect(() => {
18 | if (aboutRef.current) {
19 | const getScreenWidth = () =>
20 | window.innerWidth ||
21 | document.documentElement.clientWidth ||
22 | document.body.clientWidth;
23 |
24 | const aboutObserver = new IntersectionObserver(
25 | ([aboutEntry]) => {
26 | setIsAbout(aboutEntry.isIntersecting);
27 | },
28 | {
29 | rootMargin: `${getScreenWidth() <= 700 ? "-100px" : "-300px"}`,
30 | }
31 | );
32 |
33 | aboutObserver.observe(aboutRef.current);
34 |
35 | if (isAbout) {
36 | profile2Ref.current.classList.add("slide-in");
37 | aboutInfoRef.current.classList.add("slide-in");
38 | } else {
39 | profile2Ref.current.classList.remove("slide-in");
40 | aboutInfoRef.current.classList.remove("slide-in");
41 | }
42 | }
43 | }, [isAbout, aboutRef]);
44 |
45 | return (
46 |
47 |
52 |
53 | About me
54 |
55 |
56 | {/* Person Image */}
57 |
67 |
71 | {/* Full Name */}
72 |
73 | Shivraj Gurjar
74 |
75 | {/* Profil Name */}
76 |
77 | Ful stack web developer
78 |
79 | {/* Location */}
80 |
81 |
82 |
83 |
84 | Location
85 |
86 |
87 |
88 |
89 |
90 |
91 | Kota Rajasthan India{" "}
92 |
93 |
94 | {/* Age */}
95 |
96 |
97 |
98 | Age
99 |
100 |
101 |
102 |
103 |
104 |
105 | 20{" "}
106 |
107 |
108 | {/* Experience */}
109 |
110 |
111 |
112 | Experience
113 |
114 |
115 |
116 |
117 |
118 |
119 | 1 Year{" "}
120 |
121 |
122 | {/* Project */}
123 |
124 |
125 |
126 | Projects
127 |
128 |
129 |
130 |
131 |
132 |
133 | 3{" "}
134 |
135 |
136 |
137 |
138 |
139 |
140 | Passionate and driven ReactJS developer with a strong foundation
141 | in MERN Stack and NextJS. Dedicated to creating dynamic and
142 | user-centric web applications. Eager to contribute my expertise
143 | in frontend frameworks, modern UI/UX design, and responsive
144 | development to a forward-thinking team, while continuously
145 | learning and growing in the ever-evolving world of web
146 | development.
147 |
148 |
149 |
150 |
151 |
152 |
153 | );
154 | };
155 |
156 | export default About;
157 |
--------------------------------------------------------------------------------
/sections/education.jsx:
--------------------------------------------------------------------------------
1 | "use client";
2 | import React, { Fragment, useRef, useState, useEffect } from "react";
3 | import Image from "next/image";
4 | import { IoSchoolSharp } from "react-icons/io5";
5 |
6 | import { EducationData } from "@/constants/EducationData";
7 |
8 | const Education = () => {
9 | const [isEducation, setIsEducation] = useState(false);
10 | const educationRef = useRef();
11 | const educationBoxesRef = useRef();
12 |
13 | useEffect(() => {
14 | const getScreenWidth = () =>
15 | window.innerWidth ||
16 | document.documentElement.clientWidth ||
17 | document.body.clientWidth;
18 |
19 | const educationObserver = new IntersectionObserver(
20 | ([educationEntry]) => {
21 | setIsEducation(educationEntry.isIntersecting);
22 | },
23 | {
24 | rootMargin: `${getScreenWidth() <= 700 ? "-100px" : "-300px"}`,
25 | }
26 | );
27 |
28 | educationObserver.observe(educationRef.current);
29 |
30 | if (isEducation) {
31 | educationBoxesRef.current.classList.add("pop-up-child");
32 | } else {
33 | educationBoxesRef.current.classList.remove("pop-up-child");
34 | }
35 | }, [isEducation]);
36 |
37 | return (
38 |
39 |
44 |
45 | Education
46 |
47 |
48 |
52 | {EducationData.map((education) => (
53 |
57 |
64 |
65 |
66 | {education.name}
67 |
68 |
{education.schoolOrCollege}
69 |
70 | {education.fromTo} | {" "}
71 | {education.statusOrPrecentage}
72 |
73 |
74 |
75 | ))}
76 |
77 |
78 |
79 | );
80 | };
81 |
82 | export default Education;
83 |
--------------------------------------------------------------------------------
/sections/experience.jsx:
--------------------------------------------------------------------------------
1 | "use client";
2 | import React, { Fragment, useState, useEffect, useRef } from "react";
3 | import { MdWork } from "react-icons/md";
4 | import { ImLocation } from "react-icons/im";
5 | import { BsArrowDownCircle } from "react-icons/bs";
6 |
7 | import { ExperienceData } from "@/constants/ExperienceData";
8 |
9 | const Experience = () => {
10 | const [desc, setDesc] = useState("");
11 | const [isExpe, setIsExpe] = useState(false);
12 | const expeRef = useRef();
13 | const expeBoxesRef = useRef();
14 |
15 | useEffect(() => {
16 | const expeObserver = new IntersectionObserver(
17 | ([expeEntry]) => {
18 | setIsExpe(expeEntry.isIntersecting);
19 | },
20 | {
21 | rootMargin: "-100px",
22 | }
23 | );
24 |
25 | expeObserver.observe(expeRef.current);
26 |
27 | if (isExpe) {
28 | expeBoxesRef.current.classList.add("pop-up-child");
29 | } else {
30 | expeBoxesRef.current.classList.remove("pop-up-child");
31 | }
32 | }, [isExpe]);
33 |
34 | return (
35 |
36 |
37 |
38 | Experience
39 |
40 |
41 |
45 | {ExperienceData.map((experience, index) =>
46 | experience.side === "left" ? (
47 |
53 |
56 | setDesc(
57 | desc === experience.description
58 | ? ""
59 | : experience.description
60 | )
61 | }
62 | >
63 |
64 |
65 | {experience.companyName}
66 |
67 |
68 | {experience.location}
69 |
70 |
71 |
72 |
73 |
{experience.role}
74 |
{experience.fromTo}
75 |
76 |
77 |
85 | {experience.description}
86 |
87 |
88 |
91 | setDesc(
92 | desc === experience.description
93 | ? ""
94 | : experience.description
95 | )
96 | }
97 | style={
98 | desc === experience.description
99 | ? { transform: "rotate(180deg)" }
100 | : {}
101 | }
102 | >
103 |
104 |
105 |
106 | ) : (
107 |
111 |
114 | setDesc(
115 | desc === experience.description
116 | ? ""
117 | : experience.description
118 | )
119 | }
120 | style={
121 | desc === experience.description
122 | ? { transform: "rotate(180deg)" }
123 | : {}
124 | }
125 | >
126 |
127 |
128 |
131 | setDesc(
132 | desc === experience.description
133 | ? ""
134 | : experience.description
135 | )
136 | }
137 | >
138 |
139 |
140 | {experience.companyName}
141 |
142 |
143 | {experience.location}
144 |
145 |
146 |
147 |
148 |
{experience.role}
149 |
{experience.fromTo}
150 |
151 |
159 | {experience.description}
160 |
161 |
162 |
163 | )
164 | )}
165 |
166 |
167 |
168 | );
169 | };
170 |
171 | export default Experience;
172 |
--------------------------------------------------------------------------------
/sections/journeyParts/College.jsx:
--------------------------------------------------------------------------------
1 | import React, { Fragment } from "react";
2 | import Image from "next/image";
3 |
4 | import { JourneyData } from "@/constants";
5 |
6 | export const College = () => {
7 | return (
8 |
9 |
10 | {
11 |
12 |
13 | {JourneyData[2].heading}
14 |
15 |
{JourneyData[2].summary}
16 |
17 | }
18 |
19 |
26 |
27 |
28 |
29 | );
30 | };
31 |
--------------------------------------------------------------------------------
/sections/journeyParts/FirstInternship.jsx:
--------------------------------------------------------------------------------
1 | import React, { Fragment } from "react";
2 | import Image from "next/image";
3 |
4 | import { JourneyData } from "@/constants";
5 |
6 | export const FirstInternship = () => {
7 | return (
8 |
9 |
10 |
11 |
12 | {JourneyData[4].heading} - 3 Months
13 |
14 |
{JourneyData[4].summary}
15 |
16 | {JourneyData[4].image && (
17 |
18 |
25 |
26 | )}
27 |
28 |
29 | );
30 | };
31 |
--------------------------------------------------------------------------------
/sections/journeyParts/Iit.jsx:
--------------------------------------------------------------------------------
1 | import React, { Fragment } from "react";
2 | import Image from "next/image";
3 |
4 | import { JourneyData } from "@/constants";
5 |
6 | export const Iit = () => {
7 | return (
8 |
9 |
10 |
11 |
12 | {JourneyData[1].heading} {" "}
13 | ( Kota 11th and 12th )
14 |
15 |
16 |
{JourneyData[1].summary}
17 |
18 |
19 |
20 |
27 |
28 |
29 |
30 | );
31 | };
--------------------------------------------------------------------------------
/sections/journeyParts/School.jsx:
--------------------------------------------------------------------------------
1 | import React, { Fragment } from "react";
2 | import Image from "next/image";
3 |
4 | import { JourneyData } from "@/constants";
5 |
6 | export const School = () => {
7 | return (
8 |
9 |
10 |
11 |
12 | {JourneyData[0].heading} {" "}
13 | ( Till 10th Grade )
14 |
15 |
{JourneyData[0].summary}
16 |
17 |
18 |
25 |
26 |
27 |
28 | );
29 | };
30 |
--------------------------------------------------------------------------------
/sections/journeyParts/SecondInternship.jsx:
--------------------------------------------------------------------------------
1 | import React, { Fragment } from "react";
2 | import Image from "next/image";
3 |
4 | import { JourneyData } from "@/constants";
5 |
6 | export const SecondInternship = () => {
7 | return (
8 |
9 |
10 |
11 |
12 | {JourneyData[5].heading} - 2 Months
13 |
14 |
{JourneyData[5].summary}
15 |
16 | {JourneyData[5].image && (
17 |
18 |
25 |
26 | )}
27 |
28 |
29 | );
30 | };
31 |
--------------------------------------------------------------------------------
/sections/journeyParts/YouTube.jsx:
--------------------------------------------------------------------------------
1 | import React, { Fragment } from "react";
2 | import Image from "next/image";
3 |
4 | import { JourneyData } from "@/constants";
5 |
6 | export const YouTube = () => {
7 | return (
8 |
9 |
10 |
11 |
12 | {JourneyData[3].heading}
13 |
14 |
{JourneyData[3].summary}
15 |
16 |
17 |
24 |
25 |
26 |
27 | );
28 | };
--------------------------------------------------------------------------------
/sections/journeyParts/index.js:
--------------------------------------------------------------------------------
1 | import { School } from "./School";
2 | import { College } from "./College";
3 | import { Iit } from "./Iit";
4 | import { YouTube } from "./YouTube";
5 | import { FirstInternship } from "./FirstInternship";
6 | import { SecondInternship } from "./SecondInternship";
7 |
8 | export { School, College, Iit, YouTube, FirstInternship, SecondInternship };
9 |
--------------------------------------------------------------------------------
/styles/Home.module.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iamshiv007/NextJS-Portfolio/117b48acd745ea5112462fe4e36d92358b9da7dc/styles/Home.module.css
--------------------------------------------------------------------------------
/styles/animation.css:
--------------------------------------------------------------------------------
1 | .animation-1 {
2 | animation-name: widthIncrease;
3 | animation-duration: 1s;
4 | animation-iteration-count: infinite;
5 | animation-fill-mode: backwards;
6 | animation-delay: 2s;
7 | animation-timing-function: linear;
8 | }
9 |
10 | @keyframes widthIncrease {
11 | from {
12 | width: 6rem;
13 | }
14 | to {
15 | width: 20rem;
16 | }
17 | }
18 |
19 | @media (min-width: 640px) {
20 | .blogLink:hover {
21 | transition: all 0.5s;
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/styles/cssGrid.css:
--------------------------------------------------------------------------------
1 | .grid1 div,
2 | .grid2 div,
3 | .grid3 div {
4 | background-color: #5f9ea0;
5 | @apply dark:bg-[#7cdfe2];
6 | }
7 |
8 | .grid1 div,
9 | .grid2 div {
10 | height: 200px;
11 | }
12 |
13 | .grid1,
14 | .grid2,
15 | .grid3 {
16 | display: grid;
17 | gap: 10px;
18 | border: 4px solid #7cdfe2;
19 | padding: 10px;
20 | @apply dark:border-[#5f9ea0];
21 | }
22 |
23 | .grid1 {
24 | grid-template-columns: repeat(7, 1fr);
25 | }
26 |
27 | .grid2 {
28 | grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
29 | }
30 |
31 | .grid3 {
32 | grid-template-columns: repeat(5, 1fr);
33 | grid-template-rows: repeat(3, 200px);
34 | }
35 |
36 | .grid3 div {
37 | padding: 5px;
38 | padding-top: 15px;
39 | }
40 |
41 | .grid3 > div:nth-child(1) {
42 | grid-column-start: 1;
43 | grid-column-end: 3;
44 | grid-row-start: 1;
45 | grid-row-end: 3;
46 | }
47 |
48 | .grid3 > div:nth-child(2) {
49 | grid-column: 3/6;
50 | }
51 |
52 | .grid3 > div:nth-child(3) {
53 | grid-column: 1/3;
54 | grid-row: 3/4;
55 | }
56 |
57 | .grid3 > div:nth-child(4) {
58 | grid-column: 3/5;
59 | grid-row: 2/4;
60 | }
61 |
--------------------------------------------------------------------------------
/styles/globals.css:
--------------------------------------------------------------------------------
1 | @tailwind base;
2 | @tailwind components;
3 | @tailwind utilities;
4 |
5 | * {
6 | scroll-behavior: smooth !important;
7 | -webkit-scroll-behavior: smooth !important; /* other browsers */
8 | }
9 |
10 | p,
11 | div {
12 | text-align: justify;
13 | }
14 |
15 | .sectionHeading {
16 | @apply px-4 text-center flex justify-center items-center text-3xl md:text-4xl font-medium dark:text-[#07d0e5] text-[#c72c6c] pb-8 md:pb-10;
17 | }
18 |
19 | @layer components {
20 | .blog-heading {
21 | @apply md:text-3xl text-xl font-bold text-center bg-[#07d0e5] dark:bg-[#c72c6c] rounded p-2;
22 | }
23 |
24 | /* Blogs.jsx */
25 | .blogLink {
26 | @apply md:font-bold font-normal text-sm font-sans md:text-xl text-center p-1 mx-1;
27 | }
28 |
29 | /* For Blog Page */
30 | .layoutContainer {
31 | @apply flex gap-x-7 w-full dark:bg-gray-900 sm:dark:bg-gray-700 transition-all duration-1000;
32 | }
33 |
34 | .layoutBox1 {
35 | @apply sm:w-[60%] ml-[3%] w-[94%] border-0 sm:border border-solid border-gray-300 rounded-xl p-4 sm:ml-[10%] min-h-[84vh] sm:h-[84vh] sm:overflow-y-scroll dark:bg-gray-900 my-[2vh] transition-all duration-1000;
36 | }
37 | .layoutBox2 {
38 | @apply w-[20%] p-2 mt-2 hidden sm:block transition-all duration-1000;
39 | }
40 |
41 | /* For tic-tac-toe */
42 | .ttt .one,
43 | .ttt .two,
44 | .ttt .three {
45 | @apply sm:w-24 sm:h-24 w-16 h-16 border-2 border-solid border-black text-2xl font-bold flex items-center justify-center dark:border-white;
46 | }
47 |
48 | .ttt .one,
49 | .ttt .two {
50 | @apply border-r-0;
51 | }
52 |
53 | .ttt > div > div:nth-child(2) {
54 | @apply border-y-0;
55 | }
56 | }
57 |
58 | /* Home Animation and About Animation */
59 | .slide-in {
60 | transform: translateX(0);
61 | opacity: 1;
62 | }
63 | /* TechStack, Experience, Education, Projects animation */
64 | .pop-down {
65 | opacity: 0;
66 | scale: 0;
67 | }
68 |
69 | .pop-up {
70 | opacity: 1;
71 | scale: 1;
72 | }
73 |
74 | .pop-down-child > div {
75 | opacity: 0;
76 | scale: 0;
77 | }
78 |
79 | .pop-up-child > div {
80 | opacity: 1;
81 | scale: 1;
82 | }
83 |
84 | /* SocialMedia animation */
85 | .social-hide > div {
86 | transform: scale(0);
87 | }
88 |
89 | .social-show > div {
90 | transform: scale(0.9);
91 | }
92 |
--------------------------------------------------------------------------------
/tailwind.config.js:
--------------------------------------------------------------------------------
1 | /** @type {import('tailwindcss').Config} */
2 | module.exports = {
3 | content: [
4 | "./pages/**/*.{js,ts,jsx,tsx,mdx}",
5 | "./components/**/*.{js,ts,jsx,tsx,mdx}",
6 | "./app/**/*.{js,ts,jsx,tsx,mdx}",
7 | "./sections/**/*.{js,ts,jsx,tsx,mdx}",
8 | "./utils/**/*.{js,ts,jsx,tsx,mdx}",
9 | "./layout/**/*.{js,ts,jsx,tsx,mdx}",
10 | ],
11 | darkMode: "class",
12 | theme: {
13 | extend: {},
14 | },
15 | plugins: [],
16 | }
--------------------------------------------------------------------------------
/utils/ChatSystem.jsx:
--------------------------------------------------------------------------------
1 | import React, { useEffect } from "react";
2 |
3 | const ChatSystem = () => {
4 | useEffect(() => {
5 | // Tawk.to script
6 | var Tawk_API = Tawk_API || {};
7 | var Tawk_LoadStart = new Date();
8 | (function () {
9 | var s1 = document.createElement("script"),
10 | s0 = document.getElementsByTagName("script")[0];
11 | s1.async = true;
12 | s1.src = `https://embed.tawk.to/${process.env.NEXT_PUBLIC_TAWK_TO_API_KEY}`;
13 | s1.charset = "UTF-8";
14 | s1.setAttribute("crossorigin", "*");
15 | s0.parentNode.insertBefore(s1, s0);
16 |
17 | window.Tawk_API = window.Tawk_API || {};
18 | window.Tawk_API.customStyle = {
19 | zIndex: 2,
20 | };
21 | })();
22 | }, []);
23 |
24 | return <>>; // The component doesn't need to render anything, it's just for the script to run.
25 | };
26 |
27 | export default ChatSystem;
28 |
--------------------------------------------------------------------------------
/utils/Feedback.jsx:
--------------------------------------------------------------------------------
1 | import React, { Fragment, useContext, useState } from "react";
2 | import axios from "axios";
3 |
4 | import { PortfolioContext } from "@/contextApi/PortfolioContext";
5 |
6 | const Feedback = () => {
7 | const [formData, setFormData] = useState({});
8 | const [submit, setSubmit] = useState(false);
9 | const { showModal, setShowModal } = useContext(PortfolioContext);
10 |
11 | const collectData = (e) => {
12 | const { name, value } = e.target;
13 | setFormData((prevData) => ({ ...prevData, [name]: value }));
14 | };
15 |
16 | const submitFeedback = async (e) => {
17 | e.preventDefault();
18 | setSubmit(true);
19 | try {
20 | const { data } = await axios.post("/api/feedback/new", formData);
21 | setFormData({});
22 | setSubmit(false);
23 | setShowModal(false);
24 | if (data.success) {
25 | alert(data.message);
26 | }
27 | } catch (error) {
28 | setSubmit(false);
29 | alert(
30 | error.response.data.message || error.message || "Some error Accured"
31 | );
32 | }
33 | };
34 |
35 | return (
36 |
37 |
121 |
122 | );
123 | };
124 |
125 | export default Feedback;
126 |
--------------------------------------------------------------------------------
/utils/Resume.jsx:
--------------------------------------------------------------------------------
1 | import React, { Fragment } from "react";
2 |
3 | const Resume = () => {
4 | return (
5 |
6 |
14 |
15 | );
16 | };
17 |
18 | export default Resume;
19 |
--------------------------------------------------------------------------------
/utils/SendMail.jsx:
--------------------------------------------------------------------------------
1 | import React, { Fragment, useState } from "react";
2 | import axios from "axios";
3 | import { FiMessageCircle } from "react-icons/fi";
4 |
5 | const SendMail = () => {
6 | const [formData, setFormData] = useState({});
7 | const [sending, setSending] = useState(false);
8 |
9 | const collectData = (e) => {
10 | setFormData({ ...formData, [e.target.name]: e.target.value });
11 | };
12 |
13 | const sendMessage = (e) => {
14 | e.preventDefault();
15 |
16 | const { name, email, message, subject } = formData;
17 |
18 | if (!name || !email || !subject || !message) {
19 | return alert("Please Fill All Data");
20 | }
21 |
22 | setSending(true);
23 | axios
24 | .post("/api/mail/new", formData)
25 | .then((res) => {
26 | console.log(res.data);
27 | setSending(false);
28 | alert("Message Sended Successfully");
29 | setFormData({});
30 | })
31 | .catch((err) => {
32 | console.log(err);
33 | setSending(false);
34 | alert(err);
35 | });
36 | };
37 |
38 | return (
39 |
40 |
97 |
98 | );
99 | };
100 |
101 | export default SendMail;
102 |
--------------------------------------------------------------------------------
/utils/ShoveeModal.jsx:
--------------------------------------------------------------------------------
1 | "use client";
2 | import React, { useEffect, useState } from "react";
3 | import Link from "next/link";
4 | import Image from "next/image";
5 |
6 | const ShoveeModal = () => {
7 | const [showModal, setShowModal] = useState(false);
8 |
9 | useEffect(() => {
10 | setTimeout(() => {
11 | setShowModal(true);
12 | }, 25000);
13 | }, []);
14 |
15 | return (
16 |
20 |
21 |
22 | Create your personal portfolio website in 5 minutes with{" "}
23 |
24 |
25 |
30 |
36 |
37 | SHOVEE
38 |
39 |
40 |
41 |
42 | setShowModal(false)}
45 | >
46 | Ask Me Later
47 |
48 |
53 | Go To Shovee
54 |
55 |
56 |
57 |
58 | );
59 | };
60 |
61 | export default ShoveeModal;
62 |
--------------------------------------------------------------------------------
/utils/SocialMedia.jsx:
--------------------------------------------------------------------------------
1 | import React, { Fragment, useContext } from "react";
2 | import Link from "next/link";
3 | import { MdFeedback } from "react-icons/md";
4 |
5 | import { SocialMediaData } from "@/constants/SocialMediaData";
6 | import { PortfolioContext } from "@/contextApi/PortfolioContext";
7 |
8 | const SocialMedia = () => {
9 | const { setShowModal } = useContext(PortfolioContext);
10 |
11 | return (
12 |
13 |
14 | {SocialMediaData.map((social, key) => (
15 |
16 |
20 | {social.icon}
21 |
22 |
23 | ))}
24 |
setShowModal(true)}
27 | >
28 |
29 |
30 |
31 |
32 | );
33 | };
34 |
35 | export default SocialMedia;
36 |
--------------------------------------------------------------------------------
/utils/Theme.jsx:
--------------------------------------------------------------------------------
1 | import React, { useContext } from "react";
2 |
3 | import { ThemeContext } from "@/context/themeContext";
4 |
5 | const Theme = ({ children }) => {
6 | const { theme } = useContext(ThemeContext);
7 |
8 | return (
9 | <>
10 | {children}
11 | >
12 | );
13 | };
14 |
15 | export default Theme;
16 |
--------------------------------------------------------------------------------