diff --git a/my-app/src/pages/App.jsx b/my-app/src/pages/App.jsx index 6ea5b13b..b48a5ec3 100644 --- a/my-app/src/pages/App.jsx +++ b/my-app/src/pages/App.jsx @@ -1,3 +1,4 @@ + import React from 'react'; import { SidebarPresenter } from "../presenters/SidebarPresenter.jsx" import { SearchbarPresenter } from "../presenters/SearchbarPresenter.jsx" @@ -6,20 +7,51 @@ import { ListViewPresenter } from '../presenters/ListViewPresenter.jsx'; function App(props) { return (
+
- +
+ + - + {/* Popup only overlays the black container */} + {isPopupOpen && ( +
setIsPopupOpen(false)} + > + {/* Wider modal container */} +
e.stopPropagation()} + > + {/* Container for CourseView which fills available space */} +
+ +
+ +
+
+ )}
); diff --git a/my-app/src/presenters/AddToDB.jsx b/my-app/src/presenters/AddToDB.jsx new file mode 100644 index 00000000..43d196b0 --- /dev/null +++ b/my-app/src/presenters/AddToDB.jsx @@ -0,0 +1,18 @@ +import { observer } from "mobx-react-lite"; +import { useState } from "react"; +import SearchbarView from "../views/SearchbarView.jsx"; + +// A dummy presenter, which adds the course supplied in the text field to the db. +export const AddToDB = observer(function AddToDB({ model }) { + const [text, setText] = useState(""); + return ; + + function onTextChanged(e){ + setText(e.target.value); + } + + function onSubmit(){ + const course = {courseCode : text, data : "A course"}; + model.addCourse(course); + } +}); diff --git a/my-app/src/views/Components/CourseViewComponents/ModalComponent.jsx b/my-app/src/views/Components/CourseViewComponents/ModalComponent.jsx new file mode 100644 index 00000000..e5f50f2b --- /dev/null +++ b/my-app/src/views/Components/CourseViewComponents/ModalComponent.jsx @@ -0,0 +1,30 @@ +// Modal.jsx +import React from 'react'; +import ReactDOM from 'react-dom'; + +const Modal = ({ isOpen, onClose, children }) => { + if (!isOpen) return null; + + return ReactDOM.createPortal( +
+
e.stopPropagation()} + > + {children} + +
+
, + document.getElementById('modal-root') + ); +}; + +export default Modal; diff --git a/my-app/src/views/CourseView.jsx b/my-app/src/views/CourseView.jsx index 942e995b..9debafb5 100644 --- a/my-app/src/views/CourseView.jsx +++ b/my-app/src/views/CourseView.jsx @@ -1,8 +1,61 @@ import React from 'react'; export default function CourseView(props) { + return ( +
+ {/* Course Title Section */} +
+

ID1203 - Best course in the Universe

+
- return - (
-
); -} \ No newline at end of file + {/* Description Section */} +
+

+ The course is an introduction to networking, protocols and communication. + + We study how large international networks are constructed from the individual computers, via local area, city and national networks. We use the Internet as or working example of such a network. The aim of the course is to give insights into both the theory and practice of the area. + We study how large international networks are constructed from the individual computers, via local area, city and national networks. We use the Internet as or working example of such a network. The aim of the course is to give insights into both the theory and practice of the area. + We study how large international networks are constructed from the individual computers, via local area, city and national networks. We use the Internet as or working example of such a network. The aim of the course is to give insights into both the theory and practice of the area. + We study how large international networks are constructed from the individual computers, via local area, city and national networks. We use the Internet as or working example of such a network. The aim of the course is to give insights into both the theory and practice of the area. + We study how large international networks are constructed from the individual computers, via local area, city and national networks. We use the Internet as or working example of such a network. The aim of the course is to give insights into both the theory and practice of the area. + We study how large international networks are constructed from the individual computers, via local area, city and national networks. We use the Internet as or working example of such a network. The aim of the course is to give insights into both the theory and practice of the area. + We study how large international networks are constructed from the individual computers, via local area, city and national networks. We use the Internet as or working example of such a network. The aim of the course is to give insights into both the theory and practice of the area. + We study how large international networks are constructed from the individual computers, via local area, city and national networks. We use the Internet as or working example of such a network. The aim of the course is to give insights into both the theory and practice of the area. + We study how large international networks are constructed from the individual computers, via local area, city and national networks. We use the Internet as or working example of such a network. The aim of the course is to give insights into both the theory and practice of the area. + We study how large international networks are constructed from the individual computers, via local area, city and national networks. We use the Internet as or working example of such a network. The aim of the course is to give insights into both the theory and practice of the area. + We study how large international networks are constructed from the individual computers, via local area, city and national networks. We use the Internet as or working example of such a network. The aim of the course is to give insights into both the theory and practice of the area. + We study how large international networks are constructed from the individual computers, via local area, city and national networks. We use the Internet as or working example of such a network. The aim of the course is to give insights into both the theory and practice of the area. + We study how large international networks are constructed from the individual computers, via local area, city and national networks. We use the Internet as or working example of such a network. The aim of the course is to give insights into both the theory and practice of the area. + We study how large international networks are constructed from the individual computers, via local area, city and national networks. We use the Internet as or working example of such a network. The aim of the course is to give insights into both the theory and practice of the area. + We study how large international networks are constructed from the individual computers, via local area, city and national networks. We use the Internet as or working example of such a network. The aim of the course is to give insights into both the theory and practice of the area. + We study how large international networks are constructed from the individual computers, via local area, city and national networks. We use the Internet as or working example of such a network. The aim of the course is to give insights into both the theory and practice of the area. + We study how large international networks are constructed from the individual computers, via local area, city and national networks. We use the Internet as or working example of such a network. The aim of the course is to give insights into both the theory and practice of the area. + We study how large international networks are constructed from the individual computers, via local area, city and national networks. We use the Internet as or working example of such a network. The aim of the course is to give insights into both the theory and practice of the area. + We study how large international networks are constructed from the individual computers, via local area, city and national networks. We use the Internet as or working example of such a network. The aim of the course is to give insights into both the theory and practice of the area. + We study how large international networks are constructed from the individual computers, via local area, city and national networks. We use the Internet as or working example of such a network. The aim of the course is to give insights into both the theory and practice of the area. + We study how large international networks are constructed from the individual computers, via local area, city and national networks. We use the Internet as or working example of such a network. The aim of the course is to give insights into both the theory and practice of the area. + We study how large international networks are constructed from the individual computers, via local area, city and national networks. We use the Internet as or working example of such a network. The aim of the course is to give insights into both the theory and practice of the area. + We study how large international networks are constructed from the individual computers, via local area, city and national networks. We use the Internet as or working example of such a network. The aim of the course is to give insights into both the theory and practice of the area. + We study how large international networks are constructed from the individual computers, via local area, city and national networks. We use the Internet as or working example of such a network. The aim of the course is to give insights into both the theory and practice of the area. + We study how large international networks are constructed from the individual computers, via local area, city and national networks. We use the Internet as or working example of such a network. The aim of the course is to give insights into both the theory and practice of the area. + We study how large international networks are constructed from the individual computers, via local area, city and national networks. We use the Internet as or working example of such a network. The aim of the course is to give insights into both the theory and practice of the area. + +The focus of the course is on the protocols and algorithms used, and we will follow how they are used and implemented into the TCP/IP-stack - the basis of the Internet.

+
+ + {/* Reviews Section */} +
+

Reviews

+ {/* Placeholder for reviews */} +

Here would be some reviews of the course...

+
+ + {/* Prerequisite Graph Tree Section */} +
+

Prerequisite Graph Tree

+ {/* Placeholder for graph tree */} +

Graph tree or prerequisite info will go here...

+
+
+ ); +} diff --git a/my-app/src/views/ListView.jsx b/my-app/src/views/ListView.jsx index 9acbeaec..f184f12a 100644 --- a/my-app/src/views/ListView.jsx +++ b/my-app/src/views/ListView.jsx @@ -65,4 +65,4 @@ function ListView(props) { ); } -export default ListView; \ No newline at end of file +export default ListView;