Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #217 : Added a Profile Page #286

Merged
merged 2 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@
"last 1 safari version"
]
}
}
}
2 changes: 2 additions & 0 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import Pricing from "./Components/footer_section/Pricing/pricing";
import MyProjects from "./Components/menu_section/my_projects/MyProjects";
import NewProject from "./Components/menu_section/new_project/NewProject";
import Error from "./Components/404_page/Error";
import Profile from "./Components/Profile/profile";
import Licensing from "./Components/footer_section/Legal/Licensing";
import TermsConditions from "./Components/footer_section/Legal/TermsandConditions";
import PrivacyPolicy from "./Components/footer_section/Legal/PrivacyPolicy";
Expand Down Expand Up @@ -46,6 +47,7 @@ function App() {
<Route path="/pricing" element={<Pricing />} />
<Route path="/projects" element={<MyProjects />} />
<Route path="/new/project" element={<NewProject />} />
<Route path="/profile" element={<Profile />} />

</Routes>
<Footer />
Expand Down
Binary file added src/Components/Profile/Avatar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Components/Profile/instagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Components/Profile/linkedin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Components/Profile/location.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
263 changes: 263 additions & 0 deletions src/Components/Profile/profile.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,263 @@
/* Keyframes for fade-in effect */
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}

/* Keyframes for slide-in effect */
@keyframes slideIn {
from {
transform: translateX(-100%);
opacity: 0;
}
to {
transform: translateX(0);
opacity: 1;
}
}

@keyframes slideInRight {
from {
transform: translateX(100%);
opacity: 0;
}
to {
transform: translateX(0);
opacity: 1;
}
}

/* Apply slide-in animation to .first section */
.first {
animation: slideIn 0.8s ease forwards;
}

/* Apply slide-in-from-right animation to .second section */
.second {
animation: slideInRight 0.8s ease forwards;
}

/* Apply fade-in animation to .aboutPageProfile */
.aboutPageProfile {
animation: fadeIn 1s ease forwards;
}

/* Ensuring that aboutPageProfile hides and shows smoothly */
.aboutPageProfile {
transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
opacity: 0;
visibility: hidden;
}

.aboutPageProfile.visible {
opacity: 1;
visibility: visible;
}

/* Other existing styles */
.boxProfile {
margin: 50px 25px;
display: flex;
gap: 40px;
}

.first {
width: 400px;
outline: 3px solid #ff21bc;
height: 100vh;
padding: 40px 40px;
border-radius: 30px;
}

.profilephoto {
width: 250px;
height: 250px;
margin: auto;
border-radius: 50%;
outline: 3px solid #ff21bc;
background-image: url(./Avatar.png);
background-size: 100%;
margin-bottom: 40px;
}

.Name {
font-size: 25px;
font-weight: bold;
}

.usernameProfile {
font-size: larger;
color: #8d96a0;
margin-bottom: 24px;
cursor: pointer;
}

.usernameProfile:hover {
text-decoration: underline;
}

.descriptionProfile {
font-size: larger;
margin-bottom: 6px;
}

.editProfile {
width: 100%;
font-size: large;
margin-bottom: 50px;
}

.locationProfile {
display: flex;
gap: 10px;
margin-bottom: 25px
}

.locationIcon {
background-image: url(location.png);
height: 24px;
width: 24px;
background-size: 100%;
}

.linkedinProfile,
.instaProfile {
display: flex;
gap: 10px;
}

.linkedinIcon {
width: 24px;
height: 24px;
background-image: url(linkedin.png);
background-size: 100%;
}

.instaIcon {
width: 24px;
height: 24px;
background-image: url(instagram.png);
background-size: 100%;
}

.socialProfile {
display: flex;
flex-direction: column;
gap: 5px;
margin-bottom: 30px;
}

.memberProfile {
font-weight: bold;
font-size: large;
text-align: center
}

.second {
width: 70%;
outline: 3px solid #ff21bc;
border-radius: 30px;
}

.navProfile {
width: 100%;
height: auto;
padding: 20px;
background-color: #140043;
}

.navProfile ul {
display: flex;
gap: 40px;
font-weight: bold;
cursor: pointer;
}

.navProfile ul li {
width: 90px;
height: 40px;
display: flex;
justify-content: center;
align-items: center;
border-radius: 20px;
transition: background-color 0.3s ease;
}

.navProfile ul li:hover {
background-color: #e55347;
transform: scale(1.05);
transition: background-color 0.3s ease, transform 0.3s ease;
}

.active {
background-color: #e55347;
}

.aboutProfile {
width: 100%;
height: 100%;
}

.aboutPageProfile {
height: 100%;
padding: 30px;
display: none;
}

.aboutPageProfile h1 {
font-size: 30px;
text-align: left;
margin-bottom: 30px;
font-weight: bold;
text-decoration: underline;
}

.aboutDetails li {
list-style: disc;
font-size: 22px;
list-style-position: inside;
}

.aboutDetails ol{
list-style-position: inside;
margin-left: 15px;
margin-bottom: 25px;
}

.aboutDetails ol li{
list-style-type:lower-roman;
font-size: 18px;
}

.headingAbout{
margin-bottom: 15px;
font-weight: bold;
text-decoration: underline;
}

#name{
color: #ff21bc;
}

.descriptionProfileabout{
margin-bottom: 45px;
font-size: 20px;
}

.headAbout{
font-weight: 700;
color: white;
}

.projectsPageProfile{
height: 100%;
display: none;
}

.visible{
display: block;
}
99 changes: 99 additions & 0 deletions src/Components/Profile/profile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
import React from 'react'
import MyProjects from '../menu_section/my_projects/MyProjects'
import './profile.css'

const profile = () => {
const handleClick = (event) => {
const buttons = document.getElementsByClassName('btnProfile');
for (const button of buttons) {
button.classList.remove('active');
}
event.target.classList.add('active');
if (document.querySelector(".visible")) {
document.querySelector(".visible").classList.remove('visible');
}
if (document.querySelector(".active").innerHTML === "ABOUT") {
document.querySelector(".aboutPageProfile").classList.add('visible');
}
if (document.querySelector(".active").innerHTML === "PROJECTS") {
document.querySelector(".projectsPageProfile").classList.add('visible');
}
};

return (
<div className='boxProfile'>
<div className="first">
<div className="profilephoto"></div>
<div className="Name">SUGAM ARORA</div>
<div className="usernameProfile">@sugamarora</div>
<div className="descriptionProfile">Pre-Final Year @PEC, Chandigarh</div>
<div className="locationProfile">
<div className="locationIcon"></div>
<div className="locationActual">India</div>
</div>
<div className="socialProfile">
<div className="linkedinProfile">
<div className="linkedinIcon"></div>
<a href="https://www.linkedin.com/in/sugamarora23/">Sugam Arora</a>
</div>
<div className="instaProfile">
<div className="instaIcon"></div>
<a href="https://github.com/SUGAM-ARORA">SUGAM-ARORA</a>
</div>
</div>
<button className='editProfile'>Edit Profile</button>
<div className="memberProfile">MEMBER SINCE: AUGUST 5, 2023</div>
</div>
<div className="second">
<div className="navProfile">
<ul>
<li className='btnProfile aboutProfile active' onClick={handleClick}>ABOUT</li>
<li className='btnProfile projectsProfile' onClick={handleClick}>PROJECTS</li>
<li className="btnProfile cartProfile" onClick={handleClick}>CART</li>
<li className="btnProfile walletProfile" onClick={handleClick}>WALLET</li>
</ul>
</div>
<div className="aboutPageProfile visible">
<h1>Hi there, I'm <span id='name'>SUGAM ARORA</span></h1>
<h1> Know more about me: </h1>
<div className="descriptionProfileabout">
Lorem ipsum dolor sit, amet consectetur adipisicing elit. Deleniti, deserunt ipsum perferendis laboriosam molestias possimus nisi dolor fugiat magnam aspernatur reiciendis tenetur sapiente itaque impedit non optio? Deserunt, delectus exercitationem?
</div>
<ul className='aboutDetails'>
<li className='headingAbout'>Educational Details</li>
<ol>
<li><span className='headAbout'>Heading: </span>Enter your university Educational details</li>
<li><span className='headAbout'>Heading: </span>Enter your High School Educational details</li>
</ol>
<li className='headingAbout'>Skills</li>
<ol>
<li>Skill 1</li>
<li>Skill 2</li>
</ol>
<li className='headingAbout'>Projects</li>
<ol>
<li><span className='headAbout'>Heading: </span>Enter details of Project 1</li>
<li><span className='headAbout'>Heading: </span>Enter details of Project 2</li>
</ol>
<li className='headingAbout'>UniCollab Stats</li>
<ol>
<li><span className='headAbout'>Total Active Days :</span> X days</li>
<li><span className='headAbout'>Current Streak : </span>X days</li>
<li><span className='headAbout'>Longest Streak : </span>X days</li>
</ol>
<li className='headingAbout'>Achievements</li>
<ol>
<li><span className='headAbout'>Heading: </span>Enter your achievement 1</li>
<li><span className='headAbout'>Heading: </span>Enter your achievement 2</li>
</ol>
</ul>
</div>
<div className="projectsPageProfile">
<MyProjects showMenu={false} />
</div>
</div>
</div>
)
}

export default profile
Loading
Loading