diff --git a/class_registration_app/src/assets/main.css b/class_registration_app/src/assets/main.css index 07b5eca..1fe30cc 100644 --- a/class_registration_app/src/assets/main.css +++ b/class_registration_app/src/assets/main.css @@ -137,6 +137,7 @@ a, border-radius: 10px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); transition: transform 1s, box-shadow 1s; + color:#000; } .course-list-item:hover{ @@ -172,10 +173,6 @@ a, margin-left: 2vh; } -.test{ - background-color: #ccc; -} - .test2{ box-shadow: 5px black; } @@ -195,3 +192,20 @@ a, overflow-y: auto; } +.enrolled-class-item{ + padding: 20px; + display: block; + margin: 20px auto; + min-width: 80vw; + background-color: #ffffff; + border-radius: 10px; + box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); + transition: transform 1s, box-shadow 1s; + color:#000; +} + +.enrolled-class-item:hover{ + transform: scale(1.005); /* Scale to 1.2 times the original size */ + box-shadow: 0 0 15px rgba(0, 0, 0, 0.8); /* Shadow with increased blur and opacity */ + height: 200px; +} diff --git a/class_registration_app/src/components/CourseSearch.vue b/class_registration_app/src/components/CourseSearch.vue index 011b200..5b49dd3 100644 --- a/class_registration_app/src/components/CourseSearch.vue +++ b/class_registration_app/src/components/CourseSearch.vue @@ -6,7 +6,8 @@ const AsyncComponent = defineAsyncComponent(() => import('./CourseSearch.vue') ); -interface CourseInfo { + +interface CourseInfo { //enter all course info parameters here to prevent TypeScript errors CourseId: string; CourseLocation: string; OpenStatus: boolean; @@ -14,7 +15,7 @@ interface CourseInfo { MaxStudents: number; StudentsEnrolled: number; Prerequisites: string[]; - Section: string; // added for section + Section: string; CourseScheduledDays: string[]; Level: string; } @@ -97,12 +98,11 @@ function handleSearch() { test.remove() } - - console.log("button clicked"); //arn:aws:execute-api:us-east-1:671289147354:5prodolbi7/*/GET/courses + //API Gateway link const apiUrl = 'https://5prodolbi7.execute-api.us-east-1.amazonaws.com/Beta'; - + //using fetch instead of axios let courseJson = fetch(`${apiUrl}/courses`) .then(response => { if (response.ok) { @@ -119,8 +119,10 @@ function handleSearch() { console.log(response.Items); + //must include type of element with typescript let searchbar = document.getElementById("search"); - + + //filter all courses retrieved from API with user input console.log(response); let filteredCourses = response.Items.filter(function (course: CourseInfo) { return course.CourseId.includes(searchbar.value.toUpperCase())} ); @@ -161,7 +163,7 @@ function handleSearch() { course_location.textContent = Course.CourseLocation; course_status.className = "course-status"; - if(Course.OpenStatus){ + if(Course.OpenStatus){ //course_status returns a bool course_status.textContent = "Enroll Status: Open"; }else{ course_status.textContent = "Enroll Status: Closed"; @@ -178,9 +180,10 @@ function handleSearch() { course_section.className = "course-section"; course_section.textContent = "Section: " + Course.Section; + //*****IMPORTANT - all classes are found in main.css under "assets" + //classes under style scoped are not reactive for some reason - - // Append the div to the container + // Append the divs to the container if (container != null){ container.appendChild(div); div.appendChild(course_name); diff --git a/class_registration_app/src/components/DashBoard.vue b/class_registration_app/src/components/DashBoard.vue index e71cfab..7477a9a 100644 --- a/class_registration_app/src/components/DashBoard.vue +++ b/class_registration_app/src/components/DashBoard.vue @@ -2,6 +2,7 @@