-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
95 lines (81 loc) · 2.72 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Wi-Fi Login</title>
<style>
body {
font-family: Arial, sans-serif;
background: linear-gradient(to bottom, #1db954, #191414); /* Spotify green to dark */
color: white;
text-align: center;
padding: 50px;
}
h1 {
font-size: 2.5em;
margin-bottom: 20px;
text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.6);
}
input[type="text"], input[type="password"] {
width: 80%;
padding: 10px;
font-size: 1.1em;
margin-bottom: 20px;
border-radius: 10px;
border: 2px solid #1db954;
background-color: #2e2e2e;
color: white;
}
input[type="text"]:focus, input[type="password"]:focus {
outline: none;
border-color: #17a44a;
}
button {
padding: 8px 20px; /* Smaller button */
font-size: 1em; /* Smaller font size */
background-color: #1db954;
color: white;
border: none;
border-radius: 50px;
cursor: pointer;
transition: background-color 0.3s ease, transform 0.2s ease;
}
button:hover {
background-color: #17a44a;
transform: scale(1.05);
}
footer {
margin-top: 30px;
padding: 20px;
background-color: #191414;
color: #B3B3B3;
}
footer p {
font-size: 0.9em;
}
</style>
</head>
<body>
<h1>Wi-Fi Login</h1>
<p>Enter your Wi-Fi credentials to start OTA upload.</p>
<form id="wifiForm">
<input type="text" id="ssid" placeholder="Enter Wi-Fi Name" required><br>
<input type="password" id="password" placeholder="Enter Wi-Fi Password" required><br>
<button type="submit">Connect</button>
</form>
<footer>
<p>© 2024 Desk Control. All rights reserved.</p>
</footer>
<script>
document.getElementById('wifiForm').addEventListener('submit', function(event) {
event.preventDefault(); // Prevent form submission
const ssid = document.getElementById('ssid').value;
const password = document.getElementById('password').value;
// Placeholder for actual Wi-Fi setup functionality
alert(`Wi-Fi Name: ${ssid}\nWi-Fi Password: ${password}`);
// Here you can send the data to your ESP32 through an API or WebSocket to update its Wi-Fi settings for OTA
});
</script>
</body>
</html>