Skip to content

Commit

Permalink
fix: dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
tamalCodes committed Dec 1, 2024
1 parent 407be6c commit e0ba9f7
Show file tree
Hide file tree
Showing 4 changed files with 294 additions and 79 deletions.
42 changes: 41 additions & 1 deletion src/components/private/dashboard/TrackSection.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,45 @@
/* eslint-disable react/no-unknown-property */
import { TbExternalLink } from "react-icons/tb";
import { Link } from "react-router-dom";
import "../../../../src/styles/TrackSection.scss";

const TrackSection = () => {
return <div>TrackSection</div>;
return (
<div className="trackSection_parent">
<div className="trackSection_header">
<p className="trackSection_title">Analytics</p>

<div className="tracker_calendar">
<p className="active_calendar">7D</p>
<p>14D</p>
<p>28D</p>
</div>
</div>

<div className="tracker_container">
<div className="tracker_box">
<p className="tracker_header">Impressions</p>

<div className="tracker_footer">
<p className="tracker_number">6,025</p>
</div>
</div>

<div className="tracker_box">
<p className="tracker_header">Click Rate</p>

<div className="tracker_footer">
<p className="tracker_number">43% </p>
{/* <GrFormNext className="tracker_icon" /> */}
</div>
</div>
</div>

<Link to={"/"} className="">
See detailed analytics <TbExternalLink />
</Link>
</div>
);
};

export default TrackSection;
66 changes: 38 additions & 28 deletions src/pages/dashboard/Dashboard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,37 +20,47 @@ const Dashboard = () => {
return (
<>
<Navbar />

<div className="dashboard_parent">
<div className="profileSection_container">
<img
src="https://images.pexels.com/photos/7130555/pexels-photo-7130555.jpeg?cs=srgb&dl=pexels-codioful-7130555.jpg&fm=jpg"
alt=""
srcSet=""
className="profile_Coverpicture"
/>

<img
src="https://t3.ftcdn.net/jpg/04/56/00/16/360_F_456001627_vYt7ZFjxEQ1sshme67JAXorKRPo8gsfN.jpg"
alt=""
className="profile_picture"
/>

<div className="profile_numbers">
<p className="counts followersCount">
<span>1.25k</span> Followers
</p>

<p className="counts EventsCount">
<span>231</span> Hosted Events
</p>
</div>
<div className="profile_header">
<div className="profileSection_container">
<img
src="https://images.pexels.com/photos/7130555/pexels-photo-7130555.jpeg?cs=srgb&dl=pexels-codioful-7130555.jpg&fm=jpg"
alt=""
srcSet=""
className="profile_Coverpicture"
/>

<button>Edit Profile</button>
</div>
<img
src="https://t3.ftcdn.net/jpg/04/56/00/16/360_F_456001627_vYt7ZFjxEQ1sshme67JAXorKRPo8gsfN.jpg"
alt=""
className="profile_picture"
/>

<div className="profile_numbers">
<p className="counts followersCount">
<span>1.25k</span> Followers
</p>

<p className="counts EventsCount">
<span>231</span> Hosted Events
</p>
</div>

<div>
<TrackSection />
<button>Edit Profile</button>

<div className="profile_details">
<h2>The Monk community</h2>
<p>
Organizing @Hack4Bengal, Engineering @Edilitics • Worked w/ 5+
startups • Building OSS product with 200+ users • Open to
Frontend Roles
</p>
</div>
</div>

<div className="dashboard_track">
<TrackSection />
</div>
</div>
</div>
</>
Expand Down
134 changes: 84 additions & 50 deletions src/pages/dashboard/Dashboard.scss
Original file line number Diff line number Diff line change
@@ -1,66 +1,100 @@
.dashboard_parent {
display: flex;
align-items: start;
padding: 3rem;
gap: 2rem;
.profile_header {
display: flex;
align-items: start;
padding: 2rem 7rem;
gap: 1.2rem;
height: 100%;

.profileSection_container {
width: 70%;
position: relative;

.profile_Coverpicture {
width: 100%;
height: 200px;
object-fit: cover;
.profileSection_container {
width: 70%;
flex-grow: 1;
position: relative;
border-radius: 12px;
}

.profile_picture {
width: 100px;
height: 100px;
object-fit: cover;
border-radius: 50%;
border: 2px solid #fff;
position: absolute;
top: 197px;
left: 8%;
transform: translate(-50%, -50%);
}
.profile_Coverpicture {
width: 100%;
height: 200px;
object-fit: cover;
border-radius: 12px;
}

.profile_numbers {
font-family: var(--outfit);
display: flex;
align-items: center;
gap: 2rem;
.profile_picture {
width: 100px;
height: 100px;
object-fit: cover;
border-radius: 50%;
border: 2px solid #fff;
position: absolute;
top: 197px;
left: 64px;
transform: translate(-50%, -50%);
}

position: absolute;
top: 225px;
left: 269px;
transform: translate(-50%, -50%);
.profile_numbers {
font-family: var(--outfit);
display: flex;
align-items: center;
gap: 2rem;

.counts {
font-size: 16px;
line-height: 1;
margin: 0;
span {
font-weight: 600;
position: absolute;
top: 225px;
left: 269px;
transform: translate(-50%, -50%);

.counts {
font-size: 15px;
line-height: 1;
margin: 0;
span {
font-weight: 600;
}
}
}

button {
transition: all 0.2s ease-in-out;
border: 1.2px solid #ff5b31;
background-color: transparent;
padding: 0.3rem 1.5rem;
border-radius: 5px;
font-family: var(--outfit);
font-size: 16px;
cursor: pointer;
position: absolute;
top: 225px;
right: -63px;
transform: translate(-50%, -50%);
}
}

.dashboard_track {
width: 30%;
border-radius: 12px;
height: 100%;
}
}

.profile_details {
display: flex;
align-items: start;
flex-direction: column;
margin-top: 4rem;
left: 18px;
position: relative;

h2 {
font-family: var(--outfit);
font-size: 24px;
font-weight: 600;
margin: 0;
}

button {
transition: all 0.2s ease-in-out;
border: 1.2px solid #ff5b31;
background-color: transparent;
padding: 0.3rem 1.5rem;
border-radius: 5px;
p {
font-family: var(--outfit);
font-size: 16px;
cursor: pointer;
position: absolute;
top: 225px;
right: -63px;
transform: translate(-50%, -50%);
margin: 0;
margin-top: 0.5rem;
}
}
}
Loading

0 comments on commit e0ba9f7

Please sign in to comment.