-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path2.html
More file actions
130 lines (118 loc) · 3.56 KB
/
Copy path2.html
File metadata and controls
130 lines (118 loc) · 3.56 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" rel="stylesheet">
<title>Language Selection</title>
<style>
.flag {
display: flex;
flex-wrap: wrap;
justify-content: center;
margin-top: 50px;
}
.flag div {
text-align: center;
cursor: pointer;
transition: background-color 0.3s, color 0.3s;
margin: 5px;
padding: 2px;
border-radius: 18px;
border: 2px solid rgb(104, 104, 104);
width: 200px; /* Adjust width as needed */
}
.flag div:hover {
background-color: rgb(6, 122, 255);
border: 2px solid rgb(1, 52, 94);
color: white;
}
.flag div.selected {
background-color: rgb(59, 248, 122);
border: 2px solid rgb(1, 95, 24);
color: white;
}
img {
width: 60px;
}
#continueButton {
display: none;
position: fixed;
bottom: 20px;
right: 20px;
padding: 10px 20px;
border: none;
border-radius: 5px;
background-color: blue;
color: white;
cursor: pointer;
}
h1 {
font-family: "Poppins", sans-serif;
font-weight: 00;
font-style: normal;
text-transform: capitalize;
text-align: center;
}
h2 {
font-family: "Poppins", sans-serif;
font-weight: 500;
font-style: normal;
font-size: 16px;
}
</style>
</head>
<body>
<div class="logo">
<img src="unnamed.png" style="width: 120px; height: auto;">
</div>
<h1>Select the Language You Want to Learn
</h1>
<div class="flag">
<div onclick="selectLanguage('German', 'German/german.html')">
<img src="german.png" alt="German Flag">
<h2>German</h2>
</div>
<div onclick="selectLanguage('Japanese', 'japanese/japanese.html')">
<img src="japan.png" alt="Japanese Flag">
<h2> Japanese</h2>
</div>
</div>
<div class="flag">
<div onclick="selectLanguage('French', 'French/french.html')">
<img src="france.png" alt="French Flag">
<h2> French</h2>
</div>
<div onclick="selectLanguage('Spanish', 'Spanish/spanish.html')">
<img src="spain.png" alt="Spanish Flag">
<h2> Spanish
</h2> </div>
</div>
<button id="continueButton" onclick="continueClicked()">Continue</button>
<script>
var selectedFlag = null;
var redirectUrl = null;
function selectLanguage(language, url) {
if (selectedFlag !== null) {
selectedFlag.classList.remove("selected");
}
var flagElement = event.target.closest('.flag div');
flagElement.classList.add("selected");
selectedFlag = flagElement;
redirectUrl = url;
showContinueButton();
}
function showContinueButton() {
var continueButton = document.getElementById("continueButton");
continueButton.style.display = "block";
}
function continueClicked() {
if (redirectUrl) {
window.location.href = redirectUrl;
}
}
</script>
</body>
</html>