Skip to content

Commit

Permalink
Add Dashboard Grid
Browse files Browse the repository at this point in the history
  • Loading branch information
tuduun committed Aug 9, 2023
1 parent 9c886f6 commit ab89377
Show file tree
Hide file tree
Showing 11 changed files with 444 additions and 110 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
repos:
- repo: https://github.com/psf/black
rev: 21.9b0
rev: 23.7.0
hooks:
- id: black
args: [--safe]

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.3.0
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-json
- id: check-added-large-files

- repo: https://github.com/pre-commit/mirrors-prettier
rev: main
rev: v3.0.1
hooks:
- id: prettier
262 changes: 252 additions & 10 deletions package-lock.json

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@
"version": "1.0.0",
"private": false,
"dependencies": {
"bootstrap": "^5.3.1",
"react": "^18.2.0",
"react-bootstrap": "^2.8.0",
"react-dom": "^18.2.0",
"react-helmet": "^6.1.0",
"react-scripts": "5.0.1",
"react-transition-group": "^4.4.2"
},
Expand Down
2 changes: 2 additions & 0 deletions src/MyRouter.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import DsMajor from "./pages/DsMajor";
import InfMajor from "./pages/InfMajor";
import Software from "./pages/Software";
import Home from "./pages/Home";
import Courses from "./pages/Courses";

import App from "./App";

Expand All @@ -18,6 +19,7 @@ export default function MyRouter() {
<Route path="datasciencemajor" element={<DsMajor />} />
<Route path="softwaremajor" element={<Software />} />
<Route path="informaticsmajor" element={<InfMajor />} />
<Route path="courses" element={<Courses />} />
</Route>
</Routes>
);
Expand Down
2 changes: 2 additions & 0 deletions src/components/Cards.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from "react";
import { Outlet, Link } from "react-router-dom";
import Button from "react-bootstrap/Button";

const cardContainer = {
display: "flex",
Expand Down Expand Up @@ -212,4 +213,5 @@ export {
MinorCard8,
cardContainer,
cardStyle,
pageContainer,
};
8 changes: 4 additions & 4 deletions src/components/Roadmap/components/boxes/BoxSwitch.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import SecondaryBox from "./SecondaryBox";

const BoxSwitch = (props) => {
const { box, absoluteX, absoluteY } = props;
if (box.type == "primaryBox") {
if (box.type === "primaryBox") {
return (
<PrimaryBox
x={box.x + absoluteX}
Expand All @@ -17,7 +17,7 @@ const BoxSwitch = (props) => {
/>
);
}
if (box.type == "multiBox") {
if (box.type === "multiBox") {
return (
<MultiBox
x={box.x + absoluteX}
Expand All @@ -29,7 +29,7 @@ const BoxSwitch = (props) => {
/>
);
}
if (box.type == "tertiaryBox") {
if (box.type === "tertiaryBox") {
return (
<TertiaryBox
x={box.x + absoluteX}
Expand All @@ -43,7 +43,7 @@ const BoxSwitch = (props) => {
/>
);
}
if (box.type == "secondaryBox") {
if (box.type === "secondaryBox") {
return (
<SecondaryBox
x={box.x + absoluteX}
Expand Down
40 changes: 20 additions & 20 deletions src/curriculumData/dsMajor.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
"CMPSC 100": {
title: "Computational Expression",
title: "Computational Expression hahhahahahahahaa",
description:
"An introduction to the principles of computer science with an emphasis on creative expression through the medium of a programming language. Participating in hands-on activities that often require teamwork, students learn the computational structures needed to solve problems and produce computational artifacts which address these problems in real-world contexts. Students also learn how to organize and document a program's source code so that it effectively communicates with the intended users and maintainers. Additionally, the introduction includes an overview of the discipline of computer science and computational thinking. During a weekly laboratory session students use industry-grade technology to complete projects, reporting on their results through both written documents and oral presentations. Students are invited to use their own departmentally approved laptop in this course; a limited number of laptops are available for use during class and lab sessions.",
distributionRequirements: ["ME", "SP"],
Expand Down Expand Up @@ -384,6 +384,25 @@ module.exports = {
learningObjectives: [],
learningOutcomes: [],
},
"PHIL 130": {
title: "Values and Knowledge",
description:
"An introduction to the connections between the values and the ways of knowing that are characteristic of modern western culture. The course focuses upon the pursuit and justification of knowledge and scientific understanding and the ethical and political values that are implicit in those endeavors.",
distributionRequirements: ["CL", "SP"],
credits: "4",
prerequisites: {
anyof: [],
allof: [],
},
unlocks: [],
topics: [],
technicalTopics: [],
professionalTopics: [],
tools: [],
lab: [],
learningObjectives: [],
learningOutcomes: [],
},
"PHIL 140": {
title: "Ethics and Community",
description:
Expand Down Expand Up @@ -460,25 +479,6 @@ module.exports = {
learningObjectives: [],
learningOutcomes: [],
},
"PHIL 130": {
title: "Values and Knowledge",
description:
"An introduction to the connections between the values and the ways of knowing that are characteristic of modern western culture. The course focuses upon the pursuit and justification of knowledge and scientific understanding and the ethical and political values that are implicit in those endeavors.",
distributionRequirements: ["CL", "SP"],
credits: "4",
prerequisites: {
anyof: [],
allof: [],
},
unlocks: [],
topics: [],
technicalTopics: [],
professionalTopics: [],
tools: [],
lab: [],
learningObjectives: [],
learningOutcomes: [],
},
"POLSC 140": {
title: "Introduction to Political Theory",
description:
Expand Down
2 changes: 1 addition & 1 deletion src/curriculumData/seMajor.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
"CMPSC 100": {
title: "Computational Expression",
title: "Computational Expression hahhahahahahahaa",
description:
"An introduction to the principles of computer science with an emphasis on creative expression through the medium of a programming language. Participating in hands-on activities that often require teamwork, students learn the computational structures needed to solve problems and produce computational artifacts which address these problems in real-world contexts. Students also learn how to organize and document a program's source code so that it effectively communicates with the intended users and maintainers. Additionally, the introduction includes an overview of the discipline of computer science and computational thinking. During a weekly laboratory session students use industry-grade technology to complete projects, reporting on their results through both written documents and oral presentations. Students are invited to use their own departmentally approved laptop in this course; a limited number of laptops are available for use during class and lab sessions.",
distributionRequirements: ["ME", "SP"],
Expand Down
83 changes: 83 additions & 0 deletions src/pages/Courses.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
import React from "react";
import data from "../curriculumData/current_data.json";
import * as Card from "../components/Cards";

function filterCourses(data, field) {
const filteredCourses = data.courses.filter((course) => {
return course.Major.includes(field);
});

const listOfCourses = [];
listOfCourses.push(filterCourses);

return filteredCourses;
}

const csMajor = filterCourses(data, "Computer Science Major");
const dsMajor = filterCourses(data, "Data Science Major");
const infMajor = filterCourses(data, "Informatics Major");
const seMajor = filterCourses(data, "Software Engineering Major");

const CScourseCards = () => {
return (
<main>
<div style={Card.pageContainer}>
<h1>COMPUTER SCIENCE MAJOR COURSES</h1>
<div style={Card.cardContainer}>
{csMajor.map((course, index) => (
<Card.CourseCard
courseNumber={csMajor[index].courseNumber}
courseName={csMajor[index].courseName}
distros={csMajor[index].distributionRequirements}
prereqs={csMajor[index].prerequisites}
unlocks={csMajor[index].unlocks}
description={csMajor[index].courseDescription}
cslevel={csMajor[index].cslevel}
dslevel={csMajor[index].dslevel}
dsSub={csMajor[index].dsSub}
inflevel={csMajor[index].inflevel}
infSub={csMajor[index].infSub}
selevel={csMajor[index].selevel}
topics={csMajor[index].topics}
tools={csMajor[index].tools}
lab={csMajor[index].lab}
learningObjectives={csMajor[index].learningObjectives}
learningOutcomes={csMajor[index].learningOutcomes}
/>
))}
{/* <CourseCard
courseNumber={csMajor[1].courseNumber}
courseName={csMajor[1].courseName}
distros={csMajor[1].distributionRequirements}
prereqs={csMajor[1].prerequisites}
unlocks={csMajor[1].unlocks}
description={csMajor[1].courseDescription}
cslevel={csMajor[1].cslevel}
dslevel={csMajor[1].dslevel}
dsSub={csMajor[1].dsSub}
inflevel={csMajor[1].inflevel}
infSub={csMajor[1].infSub}
selevel={csMajor[1].selevel}
topics={csMajor[1].topics}
tools={csMajor[1].tools}
lab={csMajor[1].lab}
learningObjectives={csMajor[1].learningObjectives}
learningOutcomes={csMajor[1].learningOutcomes}
/> */}
</div>
</div>
</main>
);
};

const CoursesPage = () => {
return (
<main>
<div style={Card.cardContainer}>
<CScourseCards />
</div>
</main>
);
};

export default CoursesPage;
8 changes: 4 additions & 4 deletions src/pages/CsMajor.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import ComputerScienceMajorBlock from "../components/Roadmap/components/Computer
const Lines = () => {
return (
<React.Fragment>
{/* <svg
<svg
width="1280"
height="3452"
viewBox="0 0 1280 3452"
Expand Down Expand Up @@ -44,7 +44,7 @@ const Lines = () => {
strokeWidth="2.5"
strokeLinecap="round"
/>
</svg> */}
</svg>
</React.Fragment>
);
};
Expand All @@ -53,12 +53,12 @@ const ComputerScienceMajorContainer = () => {
return (
<div className={classes["main-container"]}>
<svg
viewBox="0 0 1280 800"
viewBox="0 0 1280 1200"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<ComputerScienceMajorBlock boxData={boxesData["csMajor"]} />
<Lines />
{/* <Lines /> */}
</svg>
</div>
);
Expand Down
Loading

0 comments on commit ab89377

Please sign in to comment.