Skip to content

Commit

Permalink
right side bar made
Browse files Browse the repository at this point in the history
  • Loading branch information
thoughtlessnerd committed May 8, 2023
1 parent 09ee761 commit 62f6c8b
Show file tree
Hide file tree
Showing 7 changed files with 182 additions and 0 deletions.
2 changes: 2 additions & 0 deletions client/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import Tooltip from "./components/Tooltip";
import SideNav from "./ui/SideNav";
import ProfileHeader from "./ui/ProfileHeader";
import ProfileInfo from "./ui/ProfileInfo";
import ControlButtons from "./ui/ControlButtons";

function App() {
const [user, setUser] = useState<any>({
Expand Down Expand Up @@ -176,6 +177,7 @@ function App() {
<ProfileHeader user={user} />
<div className="mainContent-content-body">
<ProfileInfo user={user} />
<ControlButtons />
</div>
</div>
</div>
Expand Down
11 changes: 11 additions & 0 deletions client/src/components/CipherMap.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from "react";

const CipherMap = () => {
return (
<div>
<h1>CipherMap</h1>
</div>
);
};

export default CipherMap;
12 changes: 12 additions & 0 deletions client/src/components/Icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,18 @@ const icons: any = {
fill="currentColor"
></path>
),
book: (
<path
d="M3.58136 21.2876C3.7613 21.2461 3.94562 21.2267 4.13026 21.2298C5.91039 21.2298 7.69051 21.2298 9.47063 21.2298H23.7125C23.7737 21.2298 23.8353 21.2298 23.8966 21.2298V2.4046C23.8835 2.38445 23.8737 2.36236 23.8674 2.33916C23.8173 1.8629 23.6312 1.41114 23.3312 1.03784C22.906 0.494854 22.3449 0.174803 21.6672 0.0557344C21.5895 0.0422231 21.5097 0.0396897 21.4316 0.0287117C21.3934 0.0212359 21.3556 0.0116506 21.3184 0H3.92252C3.88558 0.0127039 3.84757 0.0220311 3.80894 0.0278671C3.19881 0.0635963 2.60292 0.2267 2.05964 0.506677C1.32918 0.886684 0.76846 1.43558 0.412942 2.18293C0.252887 2.51867 0.145779 2.87717 0.0954241 3.24569C0.0722015 3.41669 0.0624902 3.58981 0.0464454 3.76165C0.0418009 3.81105 0.049401 3.8651 0 3.8993V22.6611C0.0570011 22.7067 0.0451787 22.7722 0.0468676 22.83C0.0547089 23.1441 0.10079 23.456 0.184093 23.7589C0.44672 24.725 1.01589 25.458 1.87766 25.9651C2.35344 26.2397 2.8767 26.4222 3.42007 26.503C3.52267 26.5195 3.62781 26.5212 3.73167 26.5326C3.78108 26.538 3.82921 26.5507 3.87819 26.56H23.8961V23.9177C23.8569 23.9206 23.8176 23.9265 23.7783 23.9265H4.00992C3.80759 23.9274 3.60666 23.8929 3.41627 23.8244C2.99699 23.6732 2.76054 23.3667 2.68243 22.9377C2.63533 22.6851 2.6392 22.4257 2.69383 22.1747C2.80108 21.6887 3.10762 21.405 3.58136 21.2876ZM16.1241 2.65203C16.4733 2.65246 16.815 2.75343 17.1084 2.94286C17.4018 3.13229 17.6344 3.40218 17.7784 3.72027C17.8881 3.47811 18.0496 3.26298 18.2515 3.09009C18.4535 2.91719 18.6909 2.79075 18.9471 2.71969C19.2032 2.64864 19.4719 2.6347 19.734 2.67887C19.9962 2.72303 20.2454 2.82423 20.4641 2.9753C20.6829 3.12637 20.8658 3.32364 20.9999 3.55315C21.134 3.78267 21.2161 4.03884 21.2404 4.30357C21.2646 4.5683 21.2305 4.83512 21.1403 5.08519C21.0501 5.33526 20.9061 5.56248 20.7184 5.75078L17.8452 8.60548C17.8286 8.62173 17.8063 8.63083 17.7831 8.63083C17.7599 8.63083 17.7376 8.62173 17.721 8.60548L14.9503 5.85296C14.8775 5.79119 14.8098 5.7237 14.7477 5.65114C14.5212 5.38768 14.3751 5.06478 14.3266 4.72076C14.2782 4.37673 14.3295 4.02604 14.4744 3.71029C14.6193 3.39455 14.8518 3.127 15.1442 2.93942C15.4366 2.75184 15.7767 2.6521 16.1241 2.65203Z"
fill="var(--black)"
></path>
),
like: (
<path
d="M2.10526 20H3.15789V6.31579H2.10526C1.54691 6.31579 1.01143 6.53759 0.616617 6.93241C0.221804 7.32722 0 7.8627 0 8.42105V17.8947C0 18.4531 0.221804 18.9886 0.616617 19.3834C1.01143 19.7782 1.54691 20 2.10526 20ZM18.9474 6.31579H11.5789L12.76 2.77053C12.8654 2.45412 12.8941 2.11721 12.8438 1.78753C12.7934 1.45786 12.6655 1.14486 12.4705 0.87431C12.2755 0.603764 12.019 0.383413 11.7222 0.231406C11.4254 0.0793993 11.0967 8.64345e-05 10.7632 0H10.5263L5.26316 5.72421V20H16.8421L20.96 10.9516L21.0526 10.5263V8.42105C21.0526 7.8627 20.8308 7.32722 20.436 6.93241C20.0412 6.53759 19.5057 6.31579 18.9474 6.31579Z"
fill="var(--black)"
></path>
),
};

function Icon(props: IconProps): React.ReactElement {
Expand Down
39 changes: 39 additions & 0 deletions client/src/css/ControlButtons.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
.controlButtons {
position: fixed;
display: flex;
justify-content: center;
width: 15rem;
height: 100%;
background-color: var(--white);
margin: 0.5rem 0;
right: 0;
gap: 1rem;
box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.1);
}

.controlButtons-actions {
display: flex;
flex-direction: column;
gap: 0.5rem;
padding: 0.4rem 0.8rem;
}

.controlButtons-action {
width: 100%;
padding: 0.4rem 1.5rem;
border-radius: 0.5rem;
}

.controlButtons-action:hover {
background-color: var(--primary-hover);
cursor: pointer;
}

.controlButtons-action-label {
font-size: 1rem;
text-align: center;
}

.controlButtons-action-label-active {
color: var(--white);
}
2 changes: 2 additions & 0 deletions client/src/css/MainContent.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@
.mainContent-content-body {
padding-top: 7rem;
background-color: var(--secondary);
display: flex;
flex-direction: row;
}
2 changes: 2 additions & 0 deletions client/src/css/ProfileInfo.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
flex-direction: column;
gap: 1rem;
padding: 1rem 2rem;
padding-right: 16rem;
width: 100%;
}

.profileInfo-section {
Expand Down
114 changes: 114 additions & 0 deletions client/src/ui/ControlButtons.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
import React from "react";
import Nav from "../components/Nav";
import "../css/ControlButtons.css";
import LabeledLogo from "../components/LabeledLogo";
import Icon from "../components/Icon";
import Colors from "../constants/Colors";

interface ControlButtonsProps {
open?: boolean;
setOpen?: React.Dispatch<React.SetStateAction<boolean>>;
}

const ControlButtons = (props: ControlButtonsProps) => {
return (
<Nav
className="controlButtons"
start={
<div className="controlButtons-actions">
<LabeledLogo
className="controlButtons-action"
direction="row"
style={{
justifyContent: "flex-start",
gap: "0.5rem",
}}
logo={
<Icon
icon="dashboard"
style={{ width: 28, height: 28 }}
viewBox="-4 -4 36 36"
/>
}
label="Dashboard"
labelClass="controlButtons-action-label"
/>
<LabeledLogo
className="controlButtons-action"
direction="row"
style={{
justifyContent: "flex-start",
gap: "0.5rem",
backgroundColor: Colors.primary,
}}
logo={
<Icon
icon="defaultUser"
fill={Colors.white}
style={{ width: 28, height: 28 }}
viewBox="-2 -2 28 28"
/>
}
label="Profile"
labelClass="controlButtons-action-label-active"
/>
<LabeledLogo
className="controlButtons-action"
direction="row"
style={{
justifyContent: "flex-start",
gap: "0.5rem",
}}
logo={
<Icon
icon="books"
style={{ width: 28, height: 28 }}
viewBox="-4 -4 36 36"
/>
}
label="Enrolled Courses"
labelClass="controlButtons-action-label"
/>
<LabeledLogo
className="controlButtons-action"
direction="row"
style={{
justifyContent: "flex-start",
gap: "0.5rem",
}}
logo={
<Icon
icon="book"
style={{ width: 28, height: 28 }}
viewBox="-4 -4 36 36"
/>
}
label="Wishlist"
labelClass="controlButtons-action-label"
/>
<LabeledLogo
className="controlButtons-action"
direction="row"
style={{
justifyContent: "flex-start",
gap: "0.5rem",
}}
logo={
<Icon
icon="like"
style={{ width: 28, height: 28 }}
viewBox="-4 -4 36 36"
/>
}
label="Liked Videos"
labelClass="controlButtons-action-label"
/>
</div>
}
direction="column"
end={<></>}
/>
);
};

export default ControlButtons;

0 comments on commit 62f6c8b

Please sign in to comment.