Skip to content

Commit

Permalink
Added routine:
Browse files Browse the repository at this point in the history
  • Loading branch information
joonshakya committed Jan 26, 2024
1 parent 2ab1ed8 commit 04a958b
Show file tree
Hide file tree
Showing 3 changed files with 141 additions and 74 deletions.
125 changes: 59 additions & 66 deletions components/Materials.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,72 +96,65 @@ const Materials = ({ sem }) => {
<FormControlLabel value="sem2" control={<Radio />} label="2nd" />
</RadioGroup>
</FormControl>

<Typography variant="h5" component="div">
Books
</Typography>
<Box
sx={{
my: 1,
display: "flex",
alignItems: "center",
justifyContent: "center",
flexWrap: "wrap",
textAlign: "center",
}}
>
{materials[sem].books.length === 0 ? (
<p>
No books yet.
<br />
If you have any books, do let me know.
</p>
) : null}
{materials[sem].books.map(
({ name, link, bgColor, bgImage }, index) => (
<GradientButton
key={index}
name={name}
link={link}
bgColor={bgColor}
bgImage={bgImage}
/>
)
)}
</Box>
<Typography variant="h5" component="div">
Materials
</Typography>
<Box
sx={{
mt: 1,
display: "flex",
alignItems: "center",
justifyContent: "center",
flexWrap: "wrap",
textAlign: "center",
}}
>
{materials[sem].materials.length === 0 ? (
<p>
No materials yet.
<br />
If you have any materials, do let me know.
</p>
) : null}
{materials[sem].materials.map(
({ name, link, onClick, bgColor, bgImage }, index) => (
<GradientButton
key={index}
name={name}
link={link}
onClick={onClick}
bgColor={bgColor}
bgImage={bgImage}
/>
)
)}
</Box>
{materials[sem].books.length !== 0 ? (
<>
<Typography variant="h5" component="div">
Books
</Typography>
<Box
sx={{
my: 1,
display: "flex",
alignItems: "center",
justifyContent: "center",
flexWrap: "wrap",
textAlign: "center",
}}
>
{materials[sem].books.map(
({ name, link, bgColor, bgImage }, index) => (
<GradientButton
key={index}
name={name}
link={link}
bgColor={bgColor}
bgImage={bgImage}
/>
)
)}
</Box>
</>
) : null}
{materials[sem].materials.length !== 0 ? (
<>
<Typography variant="h5" component="div">
Materials
</Typography>
<Box
sx={{
mt: 1,
display: "flex",
alignItems: "center",
justifyContent: "center",
flexWrap: "wrap",
textAlign: "center",
}}
>
{materials[sem].materials.map(
({ name, link, onClick, bgColor, bgImage }, index) => (
<GradientButton
key={index}
name={name}
link={link}
onClick={onClick}
bgColor={bgColor}
bgImage={bgImage}
/>
)
)}
</Box>
</>
) : null}
</CardContent>
</Box>
</Card>
Expand Down
16 changes: 8 additions & 8 deletions pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,18 +97,18 @@ export default function Index() {
<Materials sem={sem || currentJoonSem} />
{sem === "" || sem === currentJoonSem ? (
<>
{/* <ExamRoutine
examType={examTypes.pre}
sem="sem3"
title="Pre Board Exam Routine"
<ExamRoutine
examType={examTypes.mid}
sem={sem || currentJoonSem}
title="Mid Term Exam Routine"
subtitle={
<>
Exam time: 6:15 AM - 9:15 AM
<br />
Section A: Room 103, Section B: Room 104
Exam time: 6:15 AM - 8:15 AM
{/* <br />
Section A: Room 103, Section B: Room 104 */}
</>
}
/> */}
/>
<ClassRoutine sem={sem || currentJoonSem} />
{/* <ExamRoutine
examType={examTypes.board}
Expand Down
74 changes: 74 additions & 0 deletions utils/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -256,22 +256,32 @@ export const subjects = {
AI: {
name: "Artificial Intelligence",
shortName: "AI",
microSyllabus:
"https://drive.google.com/file/d/19W3nTSHSFZtkN-huTJpQ_W-2Y0X9yOMX/view?usp=drive_link",
},
OS: {
name: "Operating System",
shortName: "OS",
microSyllabus:
"https://drive.google.com/file/d/1b0hVeMa3S29B3wp19_uBn1TtE4-inoVD/view?usp=drive_link",
},
DBMS: {
name: "Database Management System",
shortName: "DBMS",
microSyllabus:
"https://drive.google.com/file/d/10H8sfraUMAiRm8woBK_wmAOmbqk2P55U/view?usp=drive_link",
},
CN: {
name: "Computer Networking",
shortName: "CN",
microSyllabus:
"https://drive.google.com/file/d/1NRtBfwS80guHtUYhSgVp0eji2xHtyvDi/view?usp=drive_link",
},
TOC: {
name: "Theory of Computation",
shortName: "TOC",
microSyllabus:
"https://drive.google.com/file/d/1oUfjVtS8V-JdwLvwdYtEsfmXnaN5yCEF/view?usp=drive_link",
},
},
sem3: {
Expand Down Expand Up @@ -1265,6 +1275,70 @@ export const examRoutine = {
},
],
},
sem4: {
[examTypes.mid]: [
{
day: "Tue",
subject: subjects.sem4.TOC,
date: "2024/01/30",
friendlyDate: (
<>
30<sup>th</sup> January
<br />
16<sup>th</sup> Magh
</>
),
},
{
day: "Wed",
subject: subjects.sem4.CN,
date: "2024/01/31",
friendlyDate: (
<>
31<sup>st</sup> January
<br />
17<sup>th</sup> Magh
</>
),
},
{
day: "Thu",
subject: subjects.sem4.OS,
date: "2024/02/01",
friendlyDate: (
<>
1<sup>st</sup> February
<br />
18<sup>th</sup> Magh
</>
),
},
{
day: "Fri",
subject: subjects.sem4.DBMS,
date: "2024/02/02",
friendlyDate: (
<>
2<sup>nd</sup> February
<br />
19<sup>th</sup> Magh
</>
),
},
{
day: "Sun",
subject: subjects.sem4.AI,
date: "2024/02/04",
friendlyDate: (
<>
4<sup>th</sup> February
<br />
21<sup>st</sup> Magh
</>
),
},
],
},
};

export const currentJoonSem = "sem4";
Expand Down

0 comments on commit 04a958b

Please sign in to comment.