|
1 | 1 | import React from 'react'; |
| 2 | +// import {model} from '/src/model.js'; |
2 | 3 |
|
3 | | -export default function CourseView(props) { |
| 4 | +export default function CourseView({ course }) { |
| 5 | + if (!course) return null; |
| 6 | + |
| 7 | + |
4 | 8 | return ( |
5 | | - <div style={{ margin: '20px' }}> |
| 9 | + <div className="px-10 py-10 md:px-20 md:py-16 text-slate-900 space-y-12 font-sans"> |
6 | 10 | {/* Course Title Section */} |
7 | | - <div style={{ display: 'flex', flexDirection: 'column', marginBottom: '20px' }}> |
8 | | - <h2 style={{ fontSize: '36px', fontWeight: 'bold' }}>ID1203 - Best course in the Universe</h2> |
| 11 | + <div> |
| 12 | + <h2 className="text-5xl font-extrabold text-[#2e2e4f]"> |
| 13 | + {course.code} - {course.name} |
| 14 | + <span className="ml-4 text-lg text-violet-900">({course.credits} Credits)</span> {/* Display Credits */} |
| 15 | + </h2> |
| 16 | + </div> |
| 17 | + <div> |
| 18 | + <button |
| 19 | + className="text-yellow-500 cursor-pointer" |
| 20 | + onClick={(e) => { |
| 21 | + e.stopPropagation(); // prevent popup from opening |
| 22 | + handleFavouriteClick(course.code); |
| 23 | + }} |
| 24 | + > |
| 25 | + {/* {model.favouriteCourses.includes(course.code) |
| 26 | + ? 'Remove from Favourites' |
| 27 | + : 'Add to Favourites'} */} |
| 28 | + </button> |
9 | 29 | </div> |
10 | 30 |
|
11 | 31 | {/* Description Section */} |
12 | | - <div style={{ display: 'flex', flexDirection: 'column', marginBottom: '20px', color: 'white' }}> |
13 | | - <h3 style={{ fontSize: '24px', fontWeight: 'bold' }}> |
14 | | - The course is an introduction to networking, protocols and communication. |
15 | | - |
16 | | - 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. |
17 | | - 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. |
18 | | - 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. |
19 | | - 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. |
20 | | - 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. |
21 | | - 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. |
22 | | - 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. |
23 | | - 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. |
24 | | - 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. |
25 | | - 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. |
26 | | - 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. |
27 | | - 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. |
28 | | - 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. |
29 | | - 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. |
30 | | - 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. |
31 | | - 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. |
32 | | - 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. |
33 | | - 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. |
34 | | - 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. |
35 | | - 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. |
36 | | - 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. |
37 | | - 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. |
38 | | - 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. |
39 | | - 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. |
40 | | - 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. |
41 | | - 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. |
42 | | - |
43 | | - 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. </h3> |
| 32 | + <div> |
| 33 | + <h3 className="text-2xl font-bold text-[#3d3d68] mb-4">Course Description</h3> |
| 34 | + <div |
| 35 | + className="text-lg leading-8 text-[#2c2c2c] tracking-wide prose prose-slate max-w-full" |
| 36 | + dangerouslySetInnerHTML={{ __html: course.description }} |
| 37 | + /> |
44 | 38 | </div> |
45 | 39 |
|
| 40 | + {/* Prerequisite Graph Tree Section */} |
| 41 | + <div> |
| 42 | + <h3 className="text-2xl font-semibold text-[#2e2e4f]">Prerequisite Graph Tree</h3> |
| 43 | + <p className="text-lg text-slate-700 leading-7">Graph tree or prerequisite info will go here...</p> |
| 44 | + </div> |
46 | 45 | {/* Reviews Section */} |
47 | | - <div style={{ display: 'flex', flexDirection: 'column', marginBottom: '20px' }}> |
48 | | - <h3 style={{ fontFamily: 'Georgia, serif', fontSize: '24px' }}>Reviews</h3> |
49 | | - {/* Placeholder for reviews */} |
50 | | - <p style={{ fontSize: '16px' }}>Here would be some reviews of the course...</p> |
| 46 | + <div> |
| 47 | + <h3 className="text-2xl font-semibold text-[#2e2e4f]">Reviews</h3> |
| 48 | + <p className="text-lg text-slate-700 leading-7">Here would be some reviews of the course...</p> |
51 | 49 | </div> |
52 | 50 |
|
53 | | - {/* Prerequisite Graph Tree Section */} |
54 | | - <div style={{ display: 'flex', flexDirection: 'column', marginBottom: '20px' }}> |
55 | | - <h3 style={{ fontFamily: 'Courier New, monospace', fontSize: '24px' }}>Prerequisite Graph Tree</h3> |
56 | | - {/* Placeholder for graph tree */} |
57 | | - <p style={{ fontSize: '16px' }}>Graph tree or prerequisite info will go here...</p> |
58 | | - </div> |
59 | 51 | </div> |
60 | 52 | ); |
61 | 53 | } |
0 commit comments