Skip to content

Commit 46da67d

Browse files
committed
Added wifi manager html files. need to add code to main.ino
1 parent 284af7c commit 46da67d

File tree

5 files changed

+173
-1
lines changed

5 files changed

+173
-1
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v5.2.3
1+
v5.3.0

src/main/data/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
https://github.com/RuiSantosdotme/Random-Nerd-Tutorials/tree/master/Projects/ESP32/ESP32_WiFi_Manager/data
2+
3+
https://randomnerdtutorials.com/esp32-wi-fi-manager-asyncwebserver/

src/main/data/index.html

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>ESP WEB SERVER</title>
5+
<meta name="viewport" content="width=device-width, initial-scale=1">
6+
<link rel="stylesheet" type="text/css" href="style.css">
7+
<link rel="icon" type="image/png" href="favicon.png">
8+
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.2/css/all.css" integrity="sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr" crossorigin="anonymous">
9+
</head>
10+
<body>
11+
<div class="topnav">
12+
<h1>ESP WEB SERVER</h1>
13+
</div>
14+
<div class="content">
15+
<div class="card-grid">
16+
<div class="card">
17+
<p class="card-title"><i class="fas fa-lightbulb"></i> GPIO 2</p>
18+
<p>
19+
<a href="on"><button class="button-on">ON</button></a>
20+
<a href="off"><button class="button-off">OFF</button></a>
21+
</p>
22+
<p class="state">State: %STATE%</p>
23+
</div>
24+
</div>
25+
</div>
26+
</body>
27+
</html>

src/main/data/style.css

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
html {
2+
font-family: Arial, Helvetica, sans-serif;
3+
display: inline-block;
4+
text-align: center;
5+
}
6+
7+
h1 {
8+
font-size: 1.8rem;
9+
color: white;
10+
}
11+
12+
p {
13+
font-size: 1.4rem;
14+
}
15+
16+
.topnav {
17+
overflow: hidden;
18+
background-color: #0A1128;
19+
}
20+
21+
body {
22+
margin: 0;
23+
}
24+
25+
.content {
26+
padding: 5%;
27+
}
28+
29+
.card-grid {
30+
max-width: 800px;
31+
margin: 0 auto;
32+
display: grid;
33+
grid-gap: 2rem;
34+
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
35+
}
36+
37+
.card {
38+
background-color: white;
39+
box-shadow: 2px 2px 12px 1px rgba(140,140,140,.5);
40+
}
41+
42+
.card-title {
43+
font-size: 1.2rem;
44+
font-weight: bold;
45+
color: #034078
46+
}
47+
48+
input[type=submit] {
49+
border: none;
50+
color: #FEFCFB;
51+
background-color: #034078;
52+
padding: 15px 15px;
53+
text-align: center;
54+
text-decoration: none;
55+
display: inline-block;
56+
font-size: 16px;
57+
width: 100px;
58+
margin-right: 10px;
59+
border-radius: 4px;
60+
transition-duration: 0.4s;
61+
}
62+
63+
input[type=submit]:hover {
64+
background-color: #1282A2;
65+
}
66+
67+
input[type=text], input[type=number], select {
68+
width: 50%;
69+
padding: 12px 20px;
70+
margin: 18px;
71+
display: inline-block;
72+
border: 1px solid #ccc;
73+
border-radius: 4px;
74+
box-sizing: border-box;
75+
}
76+
77+
label {
78+
font-size: 1.2rem;
79+
}
80+
.value{
81+
font-size: 1.2rem;
82+
color: #1282A2;
83+
}
84+
.state {
85+
font-size: 1.2rem;
86+
color: #1282A2;
87+
}
88+
button {
89+
border: none;
90+
color: #FEFCFB;
91+
padding: 15px 32px;
92+
text-align: center;
93+
font-size: 16px;
94+
width: 100px;
95+
border-radius: 4px;
96+
transition-duration: 0.4s;
97+
}
98+
.button-on {
99+
background-color: #034078;
100+
}
101+
.button-on:hover {
102+
background-color: #1282A2;
103+
}
104+
.button-off {
105+
background-color: #858585;
106+
}
107+
.button-off:hover {
108+
background-color: #252524;
109+
}

src/main/data/wifimanager.html

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>ESP Wi-Fi Manager</title>
5+
<meta name="viewport" content="width=device-width, initial-scale=1">
6+
<link rel="icon" href="data:,">
7+
<link rel="stylesheet" type="text/css" href="style.css">
8+
</head>
9+
<body>
10+
<div class="topnav">
11+
<h1>ESP Wi-Fi Manager</h1>
12+
</div>
13+
<div class="content">
14+
<div class="card-grid">
15+
<div class="card">
16+
<form action="/" method="POST">
17+
<p>
18+
<label for="ssid">SSID</label>
19+
<input type="text" id ="ssid" name="ssid"><br>
20+
<label for="pass">Password</label>
21+
<input type="text" id ="pass" name="pass"><br>
22+
<label for="ip">IP Address</label>
23+
<input type="text" id ="ip" name="ip" value="192.168.1.200"><br>
24+
<label for="gateway">Gateway Address</label>
25+
<input type="text" id ="gateway" name="gateway" value="192.168.1.1"><br>
26+
<input type ="submit" value ="Submit">
27+
</p>
28+
</form>
29+
</div>
30+
</div>
31+
</div>
32+
</body>
33+
</html>

0 commit comments

Comments
 (0)