forked from klovaaxel/schedule
-
Notifications
You must be signed in to change notification settings - Fork 3
/
schedule.html
66 lines (60 loc) · 1.91 KB
/
schedule.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="#4789c6" />
<title>TC-stenungsund</title>
<link rel="stylesheet" href="./css/variables.css" />
<link rel="stylesheet" href="./css/typography.css" />
<link rel="stylesheet" href="./css/styles.css" />
<link rel="stylesheet" href="./css/pages/schedule.css" />
<link
rel="apple-touch-icon"
sizes="180x180"
href="/resources/favicon/apple-touch-icon.png"
/>
<link
rel="icon"
type="image/png"
sizes="32x32"
href="/resources/favicon/favicon-32x32.png"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="/resources/favicon/favicon-16x16.png"
/>
<link rel="manifest" href="./resources/favicon/site.webmanifest" />
<!-- Custom Lit components -->
<script type="module" src="./components/dist/index.js"></script>
</head>
<body>
<header>
<navbar-component></navbar-component>
</header>
<main id="main">
<schedule-component></schedule-component>
</main>
<aside>
<h2>Aktuella uppgifter</h2>
<active-assignments-component
hideScheeduleTitle="true"
></active-assignments-component>
</aside>
<script>
const urlParams = new URLSearchParams(window.location.search);
const schedule = document.querySelector("schedule-component");
schedule.setAttribute("scheduleName", urlParams.get("course") ?? "");
schedule.setAttribute("week", window.location.hash.slice(6) ?? "");
const assignments = document.querySelector(
"active-assignments-component"
);
assignments.setAttribute(
"courses",
`["${urlParams.get("course").toString()}"]` ?? ""
);
</script>
</body>
</html>