From cb97cad852737482d9b9348ad915fc11fc76af83 Mon Sep 17 00:00:00 2001 From: Mohd Faraz Date: Sat, 16 Sep 2023 21:12:05 +0530 Subject: [PATCH] generalize the layout * move all data to Constants.js Signed-off-by: Mohd Faraz --- package-lock.json | 12 +- src/Constants.js | 196 ++++++++++++++++++++++++ src/components/About/AboutCard.js | 34 ++-- src/components/About/Github.js | 3 +- src/components/About/Techstack.js | 68 +------- src/components/About/Toolstack.js | 30 +--- src/components/Footer.js | 61 ++------ src/components/Home/Home.js | 3 +- src/components/Home/Home2.js | 91 ++--------- src/components/Home/Type.js | 8 +- src/components/Navbar.js | 85 +++++----- src/components/Projects/ProjectCards.js | 5 +- src/components/Projects/Projects.js | 87 ++--------- src/components/Resume/ResumeNew.js | 8 +- 14 files changed, 328 insertions(+), 363 deletions(-) create mode 100644 src/Constants.js diff --git a/package-lock.json b/package-lock.json index 3fb122f4a3..158cd4e4a4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6262,9 +6262,9 @@ } }, "node_modules/domelementtype": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz", - "integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", "funding": [ { "type": "github", @@ -19826,9 +19826,9 @@ } }, "domelementtype": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz", - "integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==" + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==" }, "domexception": { "version": "2.0.1", diff --git a/src/Constants.js b/src/Constants.js new file mode 100644 index 0000000000..973762891e --- /dev/null +++ b/src/Constants.js @@ -0,0 +1,196 @@ +import { + AiFillGithub, + AiOutlineTwitter, + AiFillInstagram, +} from "react-icons/ai"; +import { FaLinkedinIn } from "react-icons/fa"; +import { CgCPlusPlus } from "react-icons/cg"; +import { + DiJavascript1, + DiReact, + DiNodejs, + DiMongodb, + DiPython, + DiGit, + DiJava, +} from "react-icons/di"; +import { + SiRedis, + SiFirebase, + SiNextdotjs, + SiSolidity, + SiPostgresql, +} from "react-icons/si"; +import { TbBrandGolang } from "react-icons/tb"; +import { + SiVisualstudiocode, + SiPostman, + SiSlack, + SiVercel, + SiMacos, +} from "react-icons/si"; + + +import leaf from "./Assets/Projects/leaf.png"; +import emotion from "./Assets/Projects/emotion.png"; +import editor from "./Assets/Projects/codeEditor.png"; +import chatify from "./Assets/Projects/chatify.png"; +import suicide from "./Assets/Projects/suicide.png"; +import bitsOfCode from "./Assets/Projects/blog.png"; +import logo from "./Assets/logo.png"; + +import pdf from "./Assets/../Assets/Soumyajit_Behera-BIT_MESRA.pdf"; + +export const data = { + 'name': "SOUMYAJIT BEHERA", + 'githubUsername': 'soumyajit4419', + 'logo': logo, + 'roles': [ + "Software Developer", + "Freelancer", + "MERN Stack Developer", + "Open Source Contributor" + ], + 'bio': <> + I fell in love with programming and I have at least learnt something, I think… 🤷‍♂️ +
+
I am fluent in classics like + + C++, Javascript and Go. + +
+
+ My field of Interest's are building new   + + Web Technologies and Products and + also in areas related to{" "} + + Blockchain. + + +
+
+ Whenever possible, I also apply my passion for developing products + with Node.js and + + + {" "} + Modern Javascript Library and Frameworks + + +   like + + React.js and Next.js + + , + 'socialMedia': [ + { + 'url': "https://github.com/soumyajit4419", + 'icon': + }, + { + 'url': "https://twitter.com/Soumyajit4419", + 'icon': + }, + { + 'url': "https://www.linkedin.com/in/soumyajit4419/", + 'icon': + }, + { + 'url': "https://www.instagram.com/soumyajit4419", + 'icon': + } + ], + 'about': <> + Hi Everyone, I am Soumyajit Behera + from Bhubaneswar, India. +
I am a final year student pursuing an Integrated MSc (IMSc) + in Maths and Computing at BIT Mesra. +
+ Additionally, I am currently employed as a software developer at + Juspay. +
+
+ Apart from coding, some other activities that I love to do! + , + 'activities': [ + "Playing Games", + "Writing Tech Blogs", + "Travelling" + ], + 'quote': "\"Strive to build things that make a difference!\"", + 'techStack': [ + , + , + , + , + , + , + , + , + , + , + , + , + , + + ], + 'toolStack': [ + , + , + , + , + + ], + 'projects': [ + { + 'imagePath': chatify, + 'title': "Chatify", + 'description': "Personal Chat Room or Workspace to share resources and hangout with friends build with react.js, Material-UI, and Firebase. Have features which allows user for realtime messaging, image sharing as well as supports reactions on messages.", + 'ghLink': "https://github.com/soumyajit4419/Chatify", + 'demoLink': "https://chatify-49.web.app/", + 'blog': false + }, + { + 'imagePath': bitsOfCode, + 'title': "Bits-0f-C0de", + 'description': "My personal blog page build with Next.js and Tailwind Css which takes the content from makdown files and renders it using Next.js. Supports dark mode and easy to write blogs using markdown.", + 'ghLink': "https://github.com/soumyajit4419/Bits-0f-C0de", + 'demoLink': "https://blogs.soumya-jit.tech/", + 'blog': false + }, + { + 'imagePath': editor, + 'title': "Editor.io", + 'description': "Online code and markdown editor build with react.js. Online Editor which supports html, css, and js code with instant view of website. Online markdown editor for building README file which supports GFM, Custom Html tags with toolbar and instant preview.Both the editor supports auto save of work using Local Storage.", + 'ghLink': "https://github.com/soumyajit4419/Editor.io", + 'demoLink': "https://editor.soumya-jit.tech/", + 'blog': false + }, + { + 'imagePath': leaf, + 'title': "Plant AI", + 'description': "Used the plant disease dataset from Kaggle and trained a image classifer model using 'PyTorch' framework using CNN and Transfer Learning with 38 classes of various plant leaves. The model was successfully able to detect diseased and healthy leaves of 14 unique plants. I was able to achieve an accuracy of 98% by using Resnet34 pretrained model.", + 'ghLink': "https://github.com/soumyajit4419/Plant_AI", + 'demoLink': "https://plant49-ai.herokuapp.com/", + 'blog': false + }, + { + 'imagePath': suicide, + 'title': "Ai For Social Good", + 'description': "Using 'Natural Launguage Processing' for the detection of suicide-related posts and user's suicide ideation in cyberspace and thus helping in sucide prevention.", + 'ghLink': "https://github.com/soumyajit4419/AI_For_Social_Good", + 'demoLink': "", // demoLink="https://www.youtube.com/watch?v=dQw4w9WgXcQ&ab_channel=RickAstley" + 'blog': false + }, + { + 'imagePath': emotion, + 'title': "Face Recognition and Emotion Detection", + 'description': "Trained a CNN classifier using 'FER-2013 dataset' with Keras and tensorflow backened. The classifier sucessfully predicted the various types of emotions of human. And the highest accuracy obtained with the model was 60.1%. Then used Open-CV to detect the face in an image and then pass the face to the classifer to predict the emotion of a person.", + 'ghLink': "https://github.com/soumyajit4419/Face_And_Emotion_Detection", + 'demoLink': "", // demoLink="https://blogs.soumya-jit.tech/" + 'blog': false + } + ], + 'pdf': pdf +} \ No newline at end of file diff --git a/src/components/About/AboutCard.js b/src/components/About/AboutCard.js index 29d4c36c68..a5765adff8 100644 --- a/src/components/About/AboutCard.js +++ b/src/components/About/AboutCard.js @@ -1,6 +1,7 @@ import React from "react"; import Card from "react-bootstrap/Card"; import { ImPointRight } from "react-icons/im"; +import { data } from "../../Constants"; function AboutCard() { return ( @@ -8,33 +9,24 @@ function AboutCard() {

- Hi Everyone, I am Soumyajit Behera - from Bhubaneswar, India. -
I am a final year student pursuing an Integrated MSc (IMSc) - in Maths and Computing at BIT Mesra. -
- Additionally, I am currently employed as a software developer at - Juspay. -
-
- Apart from coding, some other activities that I love to do! + {data.about}

    -
  • - Playing Games -
  • -
  • - Writing Tech Blogs -
  • -
  • - Travelling -
  • + { + data.activities.map((activity, index) => { + return ( +
  • + {activity} +
  • + ); + }) + }

- "Strive to build things that make a difference!"{" "} + {data.quote}{" "}

-
Soumyajit
+
{data.name}
diff --git a/src/components/About/Github.js b/src/components/About/Github.js index fbdb507316..d1ab9a88b2 100644 --- a/src/components/About/Github.js +++ b/src/components/About/Github.js @@ -1,6 +1,7 @@ import React from "react"; import GitHubCalendar from "react-github-calendar"; import { Row } from "react-bootstrap"; +import { data } from "../../Constants"; function Github() { return ( @@ -9,7 +10,7 @@ function Github() { Days I Code - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + {data.techStack.map((stack, index) => { + return ( + + {stack} + + ) + })} ); } diff --git a/src/components/About/Toolstack.js b/src/components/About/Toolstack.js index c741f21e8a..1591c1d3dd 100644 --- a/src/components/About/Toolstack.js +++ b/src/components/About/Toolstack.js @@ -1,31 +1,17 @@ import React from "react"; import { Col, Row } from "react-bootstrap"; -import { - SiVisualstudiocode, - SiPostman, - SiSlack, - SiVercel, - SiMacos, -} from "react-icons/si"; +import { data } from "../../Constants"; function Toolstack() { return ( - - - - - - - - - - - - - - - + {data["toolStack"].map((stack, index) => { + return ( + + {stack} + + ) + })} ); } diff --git a/src/components/Footer.js b/src/components/Footer.js index 40759086be..43301886d3 100644 --- a/src/components/Footer.js +++ b/src/components/Footer.js @@ -1,11 +1,6 @@ import React from "react"; import { Container, Row, Col } from "react-bootstrap"; -import { - AiFillGithub, - AiOutlineTwitter, - AiFillInstagram, -} from "react-icons/ai"; -import { FaLinkedinIn } from "react-icons/fa"; +import { data } from '../Constants' function Footer() { let date = new Date(); @@ -14,53 +9,25 @@ function Footer() { -

Designed and Developed by Soumyajit Behera

+

Designed and Developed by {data.name}

Copyright © {year} SB

diff --git a/src/components/Home/Home.js b/src/components/Home/Home.js index ff117bc3b3..3a5bc87d8f 100644 --- a/src/components/Home/Home.js +++ b/src/components/Home/Home.js @@ -4,6 +4,7 @@ import homeLogo from "../../Assets/home-main.svg"; import Particle from "../Particle"; import Home2 from "./Home2"; import Type from "./Type"; +import { data } from "../../Constants"; function Home() { return ( @@ -22,7 +23,7 @@ function Home() {

I'M - SOUMYAJIT BEHERA + {data.name}

diff --git a/src/components/Home/Home2.js b/src/components/Home/Home2.js index ac3a48310b..4d83dd0030 100644 --- a/src/components/Home/Home2.js +++ b/src/components/Home/Home2.js @@ -2,12 +2,7 @@ import React from "react"; import { Container, Row, Col } from "react-bootstrap"; import myImg from "../../Assets/avatar.svg"; import Tilt from "react-parallax-tilt"; -import { - AiFillGithub, - AiOutlineTwitter, - AiFillInstagram, -} from "react-icons/ai"; -import { FaLinkedinIn } from "react-icons/fa"; +import { data } from "../../Constants"; function Home2() { return ( @@ -19,37 +14,7 @@ function Home2() { LET ME INTRODUCE MYSELF

- I fell in love with programming and I have at least learnt - something, I think… 🤷‍♂️ -
-
I am fluent in classics like - - C++, Javascript and Go. - -
-
- My field of Interest's are building new   - - Web Technologies and Products and - also in areas related to{" "} - - Blockchain. - - -
-
- Whenever possible, I also apply my passion for developing products - with Node.js and - - - {" "} - Modern Javascript Library and Frameworks - - -   like - - React.js and Next.js - + {data.bio}

@@ -65,46 +30,18 @@ function Home2() { Feel free to connect with me

diff --git a/src/components/Home/Type.js b/src/components/Home/Type.js index 67cde05c8c..f63ae47701 100644 --- a/src/components/Home/Type.js +++ b/src/components/Home/Type.js @@ -1,16 +1,12 @@ import React from "react"; import Typewriter from "typewriter-effect"; +import { data } from "../../Constants"; function Type() { return ( + }, + { + 'url': '/project', + 'name': 'Projects', + 'outline': + }, + { + 'url': '/resume', + 'name': 'Resume', + 'outline': + }, + { + 'href': 'https://soumyajitblogs.vercel.app/', + 'name': 'Blogs', + 'outline': + }]; function scrollHandler() { if (window.scrollY >= 20) { @@ -39,7 +59,7 @@ function NavBar() { > - brand + brand - - updateExpanded(false)} - > - About - - - - - updateExpanded(false)} - > - {" "} - Projects - - - - - updateExpanded(false)} - > - Resume - - - - - - Blogs - - + {links.map((link, index) => { + return ( + + {link.href ? updateExpanded(false)} + > + {link.outline} {link.name} + : + updateExpanded(false)} + > + {link.outline} {link.name} + } + + ); + })} - {"\n"} - {"\n"} {/* If the component contains Demo link and if it's not a Blog then, it will render the below component */} {!props.isBlog && props.demoLink && ( +
); diff --git a/src/components/Projects/Projects.js b/src/components/Projects/Projects.js index acb2de231b..68f11e0bc1 100644 --- a/src/components/Projects/Projects.js +++ b/src/components/Projects/Projects.js @@ -2,12 +2,7 @@ import React from "react"; import { Container, Row, Col } from "react-bootstrap"; import ProjectCard from "./ProjectCards"; import Particle from "../Particle"; -import leaf from "../../Assets/Projects/leaf.png"; -import emotion from "../../Assets/Projects/emotion.png"; -import editor from "../../Assets/Projects/codeEditor.png"; -import chatify from "../../Assets/Projects/chatify.png"; -import suicide from "../../Assets/Projects/suicide.png"; -import bitsOfCode from "../../Assets/Projects/blog.png"; +import { data } from "../../Constants"; function Projects() { return ( @@ -21,72 +16,20 @@ function Projects() { Here are a few projects I've worked on recently.

- - - - - - - - - - - - - - - - - - - - - - - + {data.projects.map((project, index) => { + return ( + + + + ) + })}
diff --git a/src/components/Resume/ResumeNew.js b/src/components/Resume/ResumeNew.js index 696ba23125..b357be4d4c 100644 --- a/src/components/Resume/ResumeNew.js +++ b/src/components/Resume/ResumeNew.js @@ -2,10 +2,10 @@ import React, { useState, useEffect } from "react"; import { Container, Row } from "react-bootstrap"; import Button from "react-bootstrap/Button"; import Particle from "../Particle"; -import pdf from "../../Assets/../Assets/Soumyajit_Behera-BIT_MESRA.pdf"; import { AiOutlineDownload } from "react-icons/ai"; import { Document, Page, pdfjs } from "react-pdf"; import "react-pdf/dist/esm/Page/AnnotationLayer.css"; +import { data } from "../../Constants"; pdfjs.GlobalWorkerOptions.workerSrc = `//cdnjs.cloudflare.com/ajax/libs/pdf.js/${pdfjs.version}/pdf.worker.min.js`; function ResumeNew() { @@ -22,7 +22,7 @@ function ResumeNew() {