Created
November 14, 2019 10:41
-
-
Save flexchar/334b2c28571a70f5b3a5dbdd937cf414 to your computer and use it in GitHub Desktop.
List of courses for my exchange at EUC :)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge" /> | |
<title>Courses for exchange at EUC</title> | |
</head> | |
<body> | |
<div data-courses> | |
<h2>Courses for exchange at EUC</h2> | |
</div> | |
<script> | |
// Courses for EUC | |
const courses = { | |
'Data mining and web mining': 'CSW431', | |
'Web Engineering': 'CSW441', | |
'Web Technologies': 'CSC133', | |
'Public Speaking': 'COM101', | |
'Web Programming': 'CSC209', | |
'Software Engineering I': 'CSC411', | |
'Software Engineering II': 'CSC412', | |
'Search Engine Optimization and Internet Marketing': 'CSC233', | |
'Introduction to Financial Accounting': 'ACC112', | |
'Advanced Web Applications': 'CSW361', | |
'Developing Web Applications': 'CSW251', | |
'Production and Operations Management': 'MGT203', | |
'Emergency Response & CSR': 'AVM411', | |
}; | |
const getCoursePDF = id => `https://syllabus.euc.ac.cy/en/${id}.pdf`; | |
function showCourses() { | |
const placeholder = document.querySelector('[data-courses]'); | |
const ul = document.createElement('ul'); | |
Object.keys(courses).map(title => { | |
const id = courses[title]; | |
const li = document.createElement('li'); | |
const a = document.createElement('a'); | |
a.href = getCoursePDF(id); | |
a.innerText = `${title} Course ${id}`; | |
a.target = '_blank'; | |
li.appendChild(a); | |
ul.appendChild(li); | |
}); | |
placeholder.appendChild(ul); | |
} | |
showCourses(); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment