Skip to content

Commit

Permalink
Merge pull request #5 from Nyveon/marker-colors
Browse files Browse the repository at this point in the history
Marker colors and persistence
  • Loading branch information
Nyveon authored Jan 24, 2025
2 parents b10b124 + a8e882c commit 7a5f1be
Show file tree
Hide file tree
Showing 14 changed files with 262 additions and 85 deletions.
2 changes: 1 addition & 1 deletion src/css/main.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/css/main.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/data/dcc.json
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,7 @@
"type": "course",
"department": "CC"
},
"XESPE-C": {
"XESPE1-C": {
"name": "Electivos de Especialidad",
"plural": "Electivos de Especialidad",
"shortname": "Electivo Especialidad",
Expand Down Expand Up @@ -977,7 +977,7 @@
"postrequisites": [],
"department": "CC"
},
"XESPE-C": {
"XESPE2-C": {
"name": "Electivos de Especialidad",
"plural": "Electivos de Especialidad",
"shortname": "Electivo Especialidad",
Expand Down
2 changes: 2 additions & 0 deletions src/data/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ def main():
semester_courses[course_code]["type"] = "compactable"
malla[version][phase]["semesters"][
semester]["courses"][f"{code}-C"] = course_data

#todo: deduplicate compacted codes

# Save dict as json file
with open(f"{malla_code}.json", "w", encoding="utf-8") as f:
Expand Down
1 change: 1 addition & 0 deletions src/images/icons/broom-cleaning-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/images/icons/close-round-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 8 additions & 3 deletions src/includes/_malla.njk
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@
'editable': editMode
}"
x-data="{
element: $el,
mark() {
semesterMarked($el, editMode);
semesterMarked(this.$el, editMode, editModeColor);
}
}"
@click="mark();"
Expand All @@ -26,6 +25,7 @@
{% for index, course in semester.courses %}
<div
class="course {{ course.department }}"
:class="courseMark && 'marked'"
id="{{ index }}"
tabindex="0"
role="listitem"
Expand All @@ -46,8 +46,12 @@
select(event) {
courseSelected($data, event, showLines, depthpre, depthpost, editMode);
},
courseMark: $persist(0).as('course-mark-{{ index }}'),
mark() {
courseMarked($el, editMode);
const result = courseMarked($el, editMode, editModeColor, this.courseMark);
if (result != -1) {
this.courseMark = result;
}
}
}"
@focus="select('mouseenter');"
Expand All @@ -58,6 +62,7 @@
x-show="shown();"
data-prereqs="{{ course.prerequisites }}"
data-postreqs="{{ course.postrequisites }}"
:data-mark-color="courseMark"
>
<div class="course-bar" x-show="shown()">
<span class="course-code">{{ course.code }}</span>
Expand Down
Loading

0 comments on commit 7a5f1be

Please sign in to comment.