-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlanguage.html
More file actions
99 lines (84 loc) · 2.44 KB
/
language.html
File metadata and controls
99 lines (84 loc) · 2.44 KB
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Select Language & Grade</title>
<link href="https://fonts.googleapis.com/css2?family=Rubik&display=swap" rel="stylesheet">
<style>
body {
background-color: #ffe2bd;
font-family: 'Rubik', sans-serif;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100vh;
text-align: center;
position: relative;
}
h1, h2 {
color: #205375;
margin: 10px 0;
}
button {
background-color: #d2f2d2;
border: none;
border-radius: 8px;
font-weight: bold;
transition: background-color 0.3s;
margin: 10px;
padding: 12px 24px;
font-size: 18px;
cursor: pointer;
}
button:hover {
background-color: #b3e6b3;
}
img.logo {
width: 120px;
position: absolute;
bottom: 10px;
right: 10px;
}
</style>
</head>
<body>
<h1>Select Language and Grade</h1>
<section>
<h2>Language</h2>
<button class="language-button">English</button>
<button class="language-button">Portuguese</button>
<button class="language-button">Russian</button>
</section>
<section>
<h2>Grade</h2>
<button class="grade-button" data-grade="10">Grade 10</button>
<button class="grade-button" data-grade="11">Grade 11</button>
<button class="grade-button" data-grade="12">Grade 12</button>
</section>
<img src="MegaPathLogo.jpg" alt="MegaPath Logo" class="logo" />
<script>
document.addEventListener("DOMContentLoaded", () => {
let selectedLanguage = null;
let selectedGrade = null;
document.querySelectorAll('.language-button').forEach(button => {
button.addEventListener('click', () => {
selectedLanguage = button.textContent.toLowerCase();
alert(`Language selected: ${selectedLanguage}`);
});
});
document.querySelectorAll('.grade-button').forEach(button => {
button.addEventListener('click', () => {
selectedGrade = button.dataset.grade;
if (selectedLanguage && selectedGrade) {
window.location.href = `games.html?lang=${selectedLanguage}&grade=${selectedGrade}`;
} else {
alert("Please select both language and grade.");
}
});
});
});
</script>
</body>
</html>