-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
53 lines (49 loc) · 1.56 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CS1010E Tutorial</title>
<style>
body {
margin: 0;
padding: 0;
background-color: #fff;
height: 100vh;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
font-family: Consolas, monospace;
}
h1 {
font-size: 24px;
text-align: center;
}
.start-link {
cursor: pointer;
text-decoration: underline;
transition: background-color 0.3s ease; /* Add hover effect */
}
.start-link:hover {
color: #2ecc71; /* White text color on hover */
}
</style>
</head>
<body>
<h1 id="welcome"></h1>
<a href="button.html">let's go!</a>
<script>
// Calculate the number of weeks since August 9, 2023 (replace with the current date)
const currentDate = new Date();
const startDate = new Date('2023-08-09');
let weeksSinceStartDate = Math.floor((currentDate - startDate) / (7 * 24 * 60 * 60 * 1000));
if (weeksSinceStartDate > 6) {
weeksSinceStartDate--;
}
// Display the calculated number of weeks in the page title
const pageTitle = document.getElementById('welcome');
pageTitle.textContent = `welcome to CS1010E tutorial week ${weeksSinceStartDate}`;
</script>
</body>
</html>