-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from YaleComputerSociety/dev
Dev
- Loading branch information
Showing
56 changed files
with
15,873 additions
and
6,710 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
|
||
.row { | ||
display: flex; | ||
flex-direction: row; | ||
} | ||
|
||
.NavBar { | ||
position: fixed; | ||
|
||
top: 0; | ||
left: 0; | ||
|
||
width: 100%; | ||
height: 75px; | ||
|
||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
|
||
background-color: #ffffff; | ||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); | ||
} | ||
|
||
.activePage { | ||
color: #598ff4; | ||
font-size: 20px; | ||
text-decoration: none; | ||
margin-right: 10px; | ||
margin-left: 10px; | ||
transition: color 0.3s; | ||
background-color: white; | ||
border: none; | ||
} | ||
|
||
.dormantPage { | ||
color: #000000; | ||
font-size: 20px; /* Increase font size */ | ||
text-decoration: none; | ||
margin-right: 10px; | ||
margin-left: 10px; | ||
transition: color 0.3s; | ||
background-color: white; | ||
border: none; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default function Providers({ children }: { children: React.ReactNode }) { | ||
return <>{children}</>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
|
||
import { createBrowserRouter, RouterProvider } from "react-router-dom"; | ||
import "./index.css"; | ||
import Courses from "./pages/Courses"; | ||
import Majors from "./pages/Majors"; | ||
import Graduation from "./pages/Graduation"; | ||
|
||
const router = createBrowserRouter([ | ||
{ | ||
path: "", | ||
element: <Graduation />, | ||
}, | ||
{ | ||
path: "/courses", | ||
element: <Courses />, | ||
}, | ||
{ | ||
path: "/majors", | ||
element: <Majors />, | ||
}, | ||
|
||
]); | ||
|
||
function Router() { | ||
return <RouterProvider router={router} />; | ||
} | ||
|
||
export default Router; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
import React from "react"; | ||
import { GoInfo } from "react-icons/go"; | ||
import "react-tooltip/dist/react-tooltip.css"; | ||
import { Tooltip } from "react-tooltip"; | ||
|
||
export default function InfoButton(props: { text: string, size?: number}) { | ||
return ( | ||
<div style={{ display: "flex", marginLeft: "3px", marginTop: "0px"}}> | ||
<div | ||
data-tooltip-id="info-tooltip" | ||
data-tooltip-content={props.text} | ||
data-tooltip-place="top" | ||
> | ||
<GoInfo style={{ fontSize: props.size ? props.size : 16 }}/> | ||
</div> | ||
<Tooltip id="info-tooltip" style={{ | ||
backgroundColor: "#444444", | ||
borderRadius: "3px"}}/> | ||
</div> | ||
); | ||
} |
14 changes: 14 additions & 0 deletions
14
frontend/src/commons/components/courses/CourseBoxSmall.module.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
.CourseBox { | ||
display: flex; | ||
flex-direction: row; | ||
align-items: center; | ||
|
||
border-radius: 15px; | ||
|
||
width: max-content; | ||
padding: 2px 4px; | ||
|
||
font-size: 14px; | ||
font-weight: bold; | ||
} |
89 changes: 89 additions & 0 deletions
89
frontend/src/commons/components/courses/CourseBoxSmall.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
import React from "react"; | ||
import styles from "./CourseBoxSmall.module.css"; | ||
|
||
import "react-tooltip/dist/react-tooltip.css"; | ||
import { Tooltip } from "react-tooltip"; | ||
import { Season, StudentCourse, Course, Distribution } from "../../types/TypeCourse"; | ||
|
||
import img_fall from "./../../images/fall.png"; | ||
import img_spring from "./../../images/spring.png"; | ||
|
||
import DistributionCircle from "./DistributionsCircle"; | ||
|
||
function CourseSeasonIcon(props: { seasons: Array<Season> }) { | ||
const seasonImageMap = { | ||
FALL: img_fall, | ||
SPRING: img_spring, | ||
SUMMER: "summer.png", | ||
}; | ||
|
||
return ( | ||
<div style={{ display: "flex", marginRight: "2px", marginTop: "3px" }}> | ||
{props.seasons.map((szn, index) => ( | ||
<div key={index} style={{ marginLeft: index > 0 ? "-7.5px" : 0 }}> | ||
{seasonImageMap[szn] && ( | ||
<img | ||
style={{ width: "15px", height: "15px" }} | ||
src={seasonImageMap[szn]} | ||
alt={szn} | ||
/> | ||
)} | ||
</div> | ||
))} | ||
</div> | ||
); | ||
} | ||
|
||
function DistCircDiv(props: { dist: Array<Distribution> }){ | ||
return( | ||
<div style={{ marginLeft: "2px", marginTop: "2px" }}> | ||
<DistributionCircle distributions={props.dist}/> | ||
</div> | ||
); | ||
} | ||
|
||
function CheckMark(props: { studentCourse: StudentCourse }){ | ||
return( | ||
<div> | ||
{props.studentCourse.enrollmentStatus === "COMPLETED" ? ( | ||
<div style={{ paddingLeft: "1px", paddingRight: "3px" }}> | ||
<div data-tooltip-id="check-tooltip" data-tooltip-content="Credit Confirmed by Yale" data-tooltip-place="top"> | ||
✓ | ||
</div> | ||
<Tooltip id="check-tooltip" style={{ backgroundColor: "#444444", borderRadius: "3px"}}/> | ||
</div> | ||
) : ( | ||
"" | ||
)} | ||
</div> | ||
); | ||
} | ||
|
||
function CourseBoxSmall(props: { studentCourse?: StudentCourse, course?: Course } ) { | ||
|
||
if(props.course && props.studentCourse == null) | ||
{ | ||
return( | ||
<div className={styles.CourseBox} style={{ backgroundColor: "#F5F5F5" }}> | ||
<CourseSeasonIcon seasons={props.course.seasons}/> | ||
{props.course.code} | ||
{props.course.distribution.length > 0 ? (<DistCircDiv dist={props.course.distribution}/>) : ("")} | ||
</div> | ||
); | ||
} | ||
else | ||
if(props.course == null && props.studentCourse) | ||
{ | ||
return ( | ||
<div className={styles.CourseBox} style={{ backgroundColor: "#F5F5F5" }}> | ||
<CheckMark studentCourse={props.studentCourse}/> | ||
<CourseSeasonIcon seasons={[props.studentCourse.season]} /> | ||
{props.studentCourse.course.code} | ||
{props.studentCourse.course.distribution.length > 0 ? (<DistCircDiv dist={props.studentCourse.course.distribution}/>) : ("")} | ||
</div> | ||
); | ||
} | ||
return <div/> | ||
} | ||
|
||
export default CourseBoxSmall; |
26 changes: 26 additions & 0 deletions
26
frontend/src/commons/components/courses/DistributionBoxLarge.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
|
||
import React from "react"; | ||
import chroma from "chroma-js" | ||
import { skillsAreasColors } from '../../utilities/constants'; | ||
|
||
type Props = { | ||
readonly text: string; | ||
}; | ||
|
||
export default function DistributionBox({ text }: Props) { | ||
const textColor = skillsAreasColors[text]; | ||
return ( | ||
<div | ||
style={{ | ||
borderRadius: "5px", | ||
color: textColor, | ||
backgroundColor: chroma(textColor).alpha(0.16).css(), | ||
width: "max-content", | ||
padding: "2px 4px", | ||
fontWeight: "bold" | ||
}} | ||
> | ||
{text} | ||
</div> | ||
); | ||
} |
15 changes: 15 additions & 0 deletions
15
frontend/src/commons/components/courses/DistributionBoxSmall.module.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
.overviewDistBox { | ||
display: inline-flex; | ||
align-items: center; | ||
justify-content: center; | ||
|
||
width: max-content; | ||
height: 20px; | ||
margin-bottom: 4px; | ||
padding: 0 6px; | ||
|
||
font-size: 12px; | ||
font-weight: 550; | ||
|
||
border-radius: 8px; | ||
} |
20 changes: 20 additions & 0 deletions
20
frontend/src/commons/components/courses/DistributionBoxSmall.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import React from "react"; | ||
import chroma from "chroma-js" | ||
import styles from "./DistributionBoxSmall.module.css"; | ||
import { skillsAreasColors } from '../../utilities/constants'; | ||
|
||
type Props = { | ||
readonly text: string; | ||
}; | ||
|
||
export default function DistributionBox({ text }: Props) { | ||
const textColor = skillsAreasColors[text]; | ||
return ( | ||
<div className={styles.overviewDistBox} style={{ | ||
backgroundColor: chroma(textColor).alpha(0.16).css(), | ||
color: textColor, | ||
fontWeight: "bold" | ||
}}>{text}</div> | ||
); | ||
} | ||
|
Oops, something went wrong.