@@ -15,6 +15,7 @@ type Server struct {
15
15
func loginRedirectHTMLDoc (message string ,status string )string {
16
16
htmlTemplate := `<html>
17
17
<head>
18
+ <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
18
19
<meta name="viewport" content="width=device-width, initial-scale=1" />
19
20
<link
20
21
rel="icon"
@@ -67,18 +68,28 @@ func loginRedirectHTMLDoc(message string, status string) string {
67
68
top: -100px;
68
69
opacity: 0;
69
70
}
71
+ #power svg {
72
+ width: 80px;
73
+ height: 80px;
74
+ }
70
75
.power-on {
71
76
color: #519a54;
72
77
background-color: #a2e0a5;
73
78
align-items: center;
74
79
animation: glow-green 1s alternate infinite ease-in-out,
75
80
slide-down-fade-in 1s normal forwards ease-in-out;
76
81
}
82
+ .power-on svg {
83
+ fill: #519a54;
84
+ }
77
85
.power-off {
78
86
background-color: #dd47641a;
79
87
color: #dd4764;
80
88
animation: slide-down-fade-in 1s normal forwards ease-in-out;
81
89
}
90
+ .power-off svg {
91
+ fill: #dd4764;
92
+ }
82
93
#instruction {
83
94
position: relative;
84
95
top: -100px;
@@ -155,7 +166,14 @@ func loginRedirectHTMLDoc(message string, status string) string {
155
166
></path>
156
167
</svg>
157
168
<div class="power-{{.Status}}" id="power">
158
- <span>⏻</span>
169
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 310 310">
170
+ <path
171
+ d="M221.742,46.906c-7.28-3.954-16.387-1.259-20.341,6.021c-3.955,7.279-1.259,16.386,6.02,20.341 C242.937,92.561,265,129.626,265,170c0,60.654-49.346,110-110,110S45,230.654,45,170c0-40.198,21.921-77.186,57.208-96.531 c7.265-3.982,9.925-13.1,5.943-20.364c-3.983-7.264-13.101-9.925-20.364-5.943C42.891,71.775,15,118.844,15,170 c0,77.196,62.804,140,140,140s140-62.804,140-140C295,118.62,266.929,71.453,221.742,46.906z"
172
+ ></path>
173
+ <path
174
+ d="M155,130c8.284,0,15-6.716,15-15V15c0-8.284-6.716-15-15-15c-8.284,0-15,6.716-15,15v100 C140,123.284,146.716,130,155,130z"
175
+ ></path>
176
+ </svg>
159
177
</div>
160
178
<p id="instruction">{{.Message}}</p>
161
179
</div>
@@ -191,7 +209,7 @@ func (srv *Server) ServeHTTP(w http.ResponseWriter, req *http.Request) {
191
209
case <- ctx .Done ():
192
210
// Client disconnect. Nothing to do.
193
211
case srv .TokenChan <- token :
194
- w .Header ().Set ("Content-Type" ,"text/html" )
212
+ w .Header ().Set ("Content-Type" ,"text/html; charset=UTF-8 " )
195
213
w .WriteHeader (http .StatusOK )
196
214
_ ,_ = fmt .Fprint (w ,loginRedirectHTMLDoc ("You are logged in, you may close this window now." ,"on" ))
197
215
}