Skip to content

Commit

Permalink
Fix website (#768)
Browse files Browse the repository at this point in the history
* revert

* Revert "revert"

This reverts commit 0fbd166.

* Revert "beep boop Github Action Master Branch CI Prettier hard at work"

This reverts commit a43c612.

* Revert "718 finals schedule days don't line up (#737)"

This reverts commit cde1586.

* Revert "beep boop Github Action Master Branch CI Prettier hard at work"

This reverts commit 946354a.

* Revert "723 more detailed explore page with sorting options (#753)"

This reverts commit 10bca13.
  • Loading branch information
jonha1 authored Aug 9, 2023
1 parent a43c612 commit f7ea6aa
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 117 deletions.
2 changes: 1 addition & 1 deletion rpi_data/school-department-mapping.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ schools:
- shortname: GSAS
longname: Games and Simulations Arts and Sciences
- shortname: IHSS
longname: Interdisciplinary HASS
longname: Interdisciplinary H&SS
- shortname: LANG
longname: Languages
- shortname: LITR
Expand Down
2 changes: 1 addition & 1 deletion src/web/src/pages/Calendar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ $hourFontSize: 0.5em;
margin: 0 auto;
margin-bottom: 3px;
text-align: center;
font-size: 0.85vw;
font-size: 0.8em;
font-variant: small-caps;
}
Expand Down
112 changes: 0 additions & 112 deletions src/web/src/pages/CourseExplorer.vue
Original file line number Diff line number Diff line change
@@ -1,44 +1,13 @@
<template>
<b-container fluid>
<b-breadcrumb :items="breadcrumbNav"></b-breadcrumb>

<!-- button to switch between alphabet order and department order -->
<div style="float: left;" class="w-10">
<b-button
class="button"
@click="listAlphabet()"
style="
margin-top: 10px;
color: #007bff;
border: solid #007bff;
background-color: transparent;
"
>
List by Alphabet
</b-button>
<br />
<b-button
class="button"
@click="listDept()"
style="
margin-top: 10px;
color: #007bff;
border: solid #007bff;
background-color: transparent;
"
>
List by Department
</b-button>
</div>

<div v-if="!isLoadingCourses && courses.length > 0" class="mx-auto w-75">
<b-row>
<!-- 2 arrays in schoolDepartmentObjects, so 2 columns -->
<b-col
v-for="(deptCol, index) in schoolDepartmentObjects"
:key="`deptCol-${index}`"
md="6"
v-show="cateShow"
>
<b-row
v-for="deptObj in deptCol"
Expand All @@ -63,37 +32,6 @@
</b-col>
</b-row>
</b-col>

<!-- splitted Departments in alphabet order -->
<b-col
v-for="(deptCol, index) in alphDepartmentObjects"
:key="`deptCol-${index}`"
md="6"
v-show="alphShow"
>
<b-row
v-for="deptObj in deptCol"
:key="deptObj.letter"
class="departmentBox border m-2 mb-4"
>
<b-col>
<!-- Alphabet Title -->
<b-row class="school-name">
<h3 class="m-1 ml-2">
{{ deptObj.letter }}
</h3>
</b-row>
<!-- Subject Title -->
<b-row>
<DepartmentList
:majors="deptObj.departments"
:deptClassDict="deptClassDict"
v-on:showCourseInfo="showCourseInfo($event)"
></DepartmentList>
</b-row>
</b-col>
</b-row>
</b-col>
</b-row>
</div>
<CenterSpinner
Expand Down Expand Up @@ -130,19 +68,9 @@ export default {
text: "Explore",
},
],
cateShow: true,
alphShow: false,
};
},
methods: {
listAlphabet() {
this.cateShow = false;
this.alphShow = true;
},
listDept() {
this.cateShow = true;
this.alphShow = false;
},
generateRequirementsText,
},
computed: {
Expand All @@ -166,28 +94,6 @@ export default {
}
return columnArr;
},
// similar to schoolDepartmentObjects() but creating two columns
// of departments separated by alphabetical letters
alphDepartmentObjects() {
let keyArr = Object.entries(this.alphDeptDict).map(
(alphDepartmentMapping) => ({
letter: alphDepartmentMapping[0],
departments: alphDepartmentMapping[1],
})
);
let columnArr = [[], []];
// separates into two columns based on number of letters
for (let i = 0; i < keyArr.length; i++) {
if (i < keyArr.length / 2) {
columnArr[0].push(keyArr[i]);
} else {
columnArr[1].push(keyArr[i]);
}
}
return columnArr;
},
schoolsMajorDict() {
let schoolsMajorDict = {};
for (const c of this.courses) {
Expand All @@ -198,7 +104,6 @@ export default {
}
return schoolsMajorDict;
},
deptClassDict() {
let deptClassDict = {};
for (const c of this.courses) {
Expand All @@ -210,19 +115,6 @@ export default {
}
return deptClassDict;
},
// similar to schoolsMajorDict() and deptClassDict()
// map/set with a set of departments for each alphabetical letter
alphDeptDict() {
let alphDeptDict = {};
for (const c of this.courses) {
if (!alphDeptDict[c.department[0]]) {
alphDeptDict[c.department[0]] = new Set();
}
alphDeptDict[c.department[0]].add(c.department);
}
return alphDeptDict;
},
},
metaInfo() {
return {
Expand Down Expand Up @@ -265,8 +157,4 @@ export default {
background: rgba(108, 90, 90, 0.15);
border-bottom: rgba(108, 90, 90, 0.1), solid, 1px;
}
.button:hover {
background: rgba(108, 90, 90, 0.15) !important;
}
</style>
4 changes: 1 addition & 3 deletions src/web/src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -387,12 +387,10 @@ export const getLongName = (department) => {
COGS: "Cognitive Science",
STSH: "Science and Technology Studies - Humanities",
STSS: "Science and Technology Studies - Social Sciences",
STSO: "Science, Technology, and Society",
COMM: "Communication",
ECON: "Economics",
GSAS: "Games and Simulations Arts and Sciences",
IHSS: "Interdisciplinary HASS",
INQR: "HASS Inquiry",
IHSS: "Interdisciplinary H&SS",
LANG: "Languages",
LITR: "Literature",
PHIL: "Philosophy",
Expand Down

0 comments on commit f7ea6aa

Please sign in to comment.