-
Notifications
You must be signed in to change notification settings - Fork 8
/
popup.html
229 lines (195 loc) · 4.82 KB
/
popup.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
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
<!DOCTYPE html>
<html lang="en" id="htmlbg">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>drinknow</title>
</head>
<body>
<input id="toggle" class="switch" type="checkbox">
<div id="wrapper">
<div class="toplayer">
<div id="sun" class="sun"></div>
<div id="clock" class="clock"></div>
<img src="./img/refresh.png" alt="imok" id="refresh">
</div>
<div class="imgWrap">
<img src="./img/imok.png" alt="imok" id="img">
<div class="progressbar" id="progressbar">
<span class="bar"></span>
</div>
</div>
</div>
</body>
<style scoped>
*,
:after,
:before {
box-sizing: border-box;
}
#htmlbg {
width: 400px;
height: 150px;
margin: 0;
background-color: #fffce6c7;
}
#htmlbg2 {
width: 400px;
height: 150px;
margin: 0;
background-color: #333e7d;
}
.switch {
display: none;
}
body {
margin: 0;
width: 100%;
height: 100%;
position: relative;
/* background-color: rgb(54, 106, 211); */
}
#wrapper {
display: flex;
flex-direction: column;
justify-content: space-around;
margin-left: 5%;
width: 90%;
height: 100%;
margin-top: 1%;
/* background-color: rgb(54, 106, 211); */
}
.progressbar {
height: 80%;
position: relative;
left: -10%;
width: 120%;
background-color: #a4cfe8;
border-radius: 20px;
transition: all .4s ease-in-out 0s;
}
.bar {
display: block;
width: 0%;
height: 100%;
background-color: rgb(54, 106, 211);
border-radius: 20px;
transition: width 1s linear, background-color .4s ease-in-out 0s;
}
#img {
width: 15%;
position: relative;
animation: duck 0.5s linear infinite alternate;
transition: left 1s linear;
}
.toplayer {
width: 100%;
height: 20%;
display: flex;
justify-content: space-between;
align-items: center;
}
.clock {
position: relative;
left: -15%;
}
.imgWrap {
width: 100%;
height: 20%;
}
.sun {
width: 50px;
height: 50px;
background-color: #ff3f2b;
border-radius: 50%;
cursor: pointer;
transition: all .4s ease-in-out 0s;
}
#refresh {
position: absolute;
top: 1%;
right: 2%;
width: 8%;
cursor: pointer;
}
@keyframes duck {
from {
transform: rotate(-10deg);
}
to {
transform: rotate(10deg);
}
}
#progressbar:before {
z-index: -2;
border: 60px solid transparent;
border-bottom: 100px solid rgba(0, 0, 0, .25);
border-left-width: 75px;
border-right-width: 65px;
width: 0;
height: 0;
bottom: 0;
transition: all .4s ease-in-out 0s;
content: '';
position: absolute;
}
#progressbar:after {
z-index: -2;
right: 0;
border: 60px solid transparent;
border-bottom: 140px solid rgba(0, 0, 0, .35);
border-left-width: 100px;
border-right-width: 100px;
width: 0;
height: 0;
bottom: 0;
transition: all .4s ease-in-out 0s;
content: '';
position: absolute;
}
#progressbar2:before {
z-index: -2;
left: 50%;
border: 60px solid transparent;
border-bottom: 100px solid rgba(255, 255, 255, .15);
border-left-width: 75px;
border-right-width: 65px;
width: 0;
height: 0;
bottom: 0;
transition: all .4s ease-in-out 0s;
content: '';
position: absolute;
}
#progressbar2:after {
z-index: -2;
right: 30%;
border: 60px solid transparent;
border-bottom: 140px solid rgba(255, 255, 255, .2);
border-left-width: 100px;
border-right-width: 100px;
width: 0;
height: 0;
bottom: 0;
transition: all .4s ease-in-out 0s;
content: '';
position: absolute;
}
#toggle:checked+#wrapper .sun {
transform: scale(0.8);
background-color: #fff;
transition: all .4s ease-in-out 0s;
}
#toggle:checked+#wrapper .clock {
color: #fff
}
#toggle:checked+#wrapper .bar {
background-color: rgb(53, 79, 132);
}
#toggle:checked+#wrapper .progressbar {
background-color: #99c0d6;
}
</style>
<script src="js/popup.js"></script>
</html>