File tree 2 files changed +62
-1
lines changed
2 files changed +62
-1
lines changed Original file line number Diff line number Diff line change 1
1
<!DOCTYPE html>
2
2
< html >
3
+ < head >
4
+ < meta charset ="UTF-8 ">
5
+ < meta http-equiv ="X-UA-Compatible " content ="IE=edge ">
6
+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
7
+ < style >
8
+ * {
9
+ box-sizing : border-box;
10
+ }
11
+
12
+ h1 ,
13
+ legend {
14
+ text-align : center;
15
+ }
16
+
17
+ form {
18
+ max-width : 250px ;
19
+ margin : 10px auto 0 auto;
20
+ }
21
+
22
+ fieldset {
23
+ border-radius : 5px ;
24
+ box-shadow : 3px 3px 15px hsl (0 , 0% , 90% );
25
+ font-size : large;
26
+ }
27
+
28
+ input {
29
+ width : 100% ;
30
+ padding : 4px ;
31
+ margin-bottom : 8px ;
32
+ border : 1px solid hsl (0 , 0% , 50% );
33
+ border-radius : 3px ;
34
+ font-size : medium;
35
+ }
36
+
37
+ input [type = submit ]: hover {
38
+ cursor : pointer;
39
+ background-color : hsl (0 , 0% , 90% );
40
+ transition : 0.5s ;
41
+ }
42
+
43
+ @media only screen and (max-width : 768px ) {
44
+ form {
45
+ max-width : 100% ;
46
+ }
47
+ }
48
+ </ style >
49
+ < title > NanoFramework</ title >
50
+ </ head >
3
51
< body >
4
52
< h1 > NanoFramework</ h1 >
5
53
< form method ='POST '>
Original file line number Diff line number Diff line change @@ -153,7 +153,7 @@ static Hashtable ParseParams(string rawParams)
153
153
static string CreateMainPage ( string message )
154
154
{
155
155
156
- return "<!DOCTYPE html><html><body>" +
156
+ return $ "<!DOCTYPE html><html>{ GetCss ( ) } <body>" +
157
157
"<h1>NanoFramework</h1>" +
158
158
"<form method='POST'>" +
159
159
"<fieldset><legend>Wireless configuration</legend>" +
@@ -165,5 +165,18 @@ static string CreateMainPage(string message)
165
165
"<b>" + message + "</b>" +
166
166
"</form></body></html>" ;
167
167
}
168
+
169
+ static string GetCss ( )
170
+ {
171
+ return "<head><meta charset=\" UTF-8\" ><meta name=\" viewport\" content=\" width=device-width, initial-scale=1.0\" ><style>" +
172
+ "*{box-sizing: border-box}" +
173
+ "h1,legend {text-align:center;}" +
174
+ "form {max-width: 250px;margin: 10px auto 0 auto;}" +
175
+ "fieldset {border-radius: 5px;box-shadow: 3px 3px 15px hsl(0, 0%, 90%);font-size: large;}" +
176
+ "input {width: 100%;padding: 4px;margin-bottom: 8px;border: 1px solid hsl(0, 0%, 50%);border-radius: 3px;font-size: medium;}" +
177
+ "input[type=submit]:hover {cursor: pointer;background-color: hsl(0, 0%, 90%);transition: 0.5s;}" +
178
+ " @media only screen and (max-width: 768px) { form {max-width: 100%;}} " +
179
+ "</style><title>NanoFramework</title></head>" ;
180
+ }
168
181
}
169
182
}
You can’t perform that action at this time.
0 commit comments