-
Notifications
You must be signed in to change notification settings - Fork 8
/
options.html
274 lines (248 loc) · 6.59 KB
/
options.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
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>知乎选项设置</title>
<style>
* {
margin: 0;
padding: 0
}
body {
font-family: "Microsoft JhengHei";
color: #34495e;
font-size: 20px;
}
li {
list-style: none;
}
.imac {
background: url(img/imac.png) no-repeat;
width: 500px;
height: 444px;
background-size: 544px;
margin: 10px auto;
padding: 22px;
}
.screen {
height: 275px;
background-color: #1ABC9C;
color: #FFF;
position: relative;
}
h1 {
position: absolute;
left: 50px;
top: 107px;
width: 100px;
text-align: center;
font-weight: normal;
font-size: 18px;
}
.logo {
width: 70px;
display: block;
margin: 0 auto 10px
}
.options {
position: absolute;
left: 180px;
top: 45px;
background-color: #EDEFF1;
padding: 20px 20px 10px;
border-radius: 10px;
color: #34495e;
text-align: right;;
}
.options:after {
content: "";
border-width: 10px;
border-style: dashed solid dashed dashed;
border-color: transparent #EDEFF1 transparent transparent;
position: absolute;
left: -20px;
top: 140px;
}
/* ============================================================
* bootstrapSwitch v1.3 by Larentis Mattia @spiritualGuru
* http://www.larentis.eu/switch/
* ============================================================
* Licensed under the Apache License, Version 2.0
* http://www.apache.org/licenses/LICENSE-2.0
* ============================================================ */
.has-switch {
border-radius: 30px;
display: inline-block;
cursor: pointer;
line-height: 1.231;
overflow: hidden;
position: relative;
text-align: left;
width: 80px;
-webkit-mask: url('img/switch/mask.png') 0 0 no-repeat;
mask: url('img/switch/mask.png') 0 0 no-repeat;
-webkit-user-select: none;
user-select: none;
vertical-align: -16px;
margin-bottom: 10px;
}
.has-switch.deactivate {
opacity: 0.5;
cursor: default !important;
}
.has-switch.deactivate label,
.has-switch.deactivate span {
cursor: default !important;
}
.has-switch > div {
width: 162%;
position: relative;
top: 0;
}
.has-switch > div.switch-animate {
-webkit-transition: left 0.25s ease-out;
transition: left 0.25s ease-out;
-webkit-backface-visibility: hidden;
}
.has-switch > div.switch-off {
left: -63%;
}
.has-switch > div.switch-off label {
background-color: #7f8c9a;
border-color: #bdc3c7;
-webkit-box-shadow: -1px 0 0 rgba(255, 255, 255, 0.5);
box-shadow: -1px 0 0 rgba(255, 255, 255, 0.5);
}
.has-switch > div.switch-on {
left: 0%;
}
.has-switch > div.switch-on label {
background-color: #1abc9c;
}
.has-switch input[type=checkbox] {
display: none;
}
.has-switch span {
cursor: pointer;
font-size: 15px;
font-weight: 700;
float: left;
height: 29px;
line-height: 19px;
margin: 0;
padding-bottom: 6px;
padding-top: 5px;
position: relative;
text-align: center;
width: 50%;
z-index: 1;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
-webkit-transition: 0.25s ease-out;
transition: 0.25s ease-out;
-webkit-backface-visibility: hidden;
}
.has-switch span.switch-left {
border-radius: 30px 0 0 30px;
background-color: #34495e;
color: #1abc9c;
border-left: 1px solid transparent;
}
.has-switch span.switch-right {
border-radius: 0 30px 30px 0;
background-color: #bdc3c7;
color: #ffffff;
text-indent: 7px;
}
.has-switch span.switch-right [class*="fui-"] {
text-indent: 0;
}
.has-switch label {
border: 4px solid #34495e;
border-radius: 50%;
float: left;
height: 21px;
margin: 0 -15px 0 -14px;
padding: 0;
position: relative;
vertical-align: middle;
width: 21px;
z-index: 100;
-webkit-transition: 0.25s ease-out;
transition: 0.25s ease-out;
-webkit-backface-visibility: hidden;
}
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
/* display: none; <- Crashes Chrome on hover */
-webkit-appearance: none;
margin: 0; /* <-- Apparently some margin are still there even though it's hidden */
}
.input-text {
color: #34495e;
font-family: "Lato", sans-serif;
height: 21px;
-webkit-appearance: none;
border-radius: 15px;
outline: none;
-webkit-transition: border .25s linear, color .25s linear;
transition: border .25s linear, color .25s linear;
border-width: 2px;
border-color: transparent;
border-style: solid;
font-size: 17px;
text-indent: 3px;
width: 30px;
text-align: center;;
}
.input-text:focus {
border-color: #1abc9c;
box-shadow: none;
}
</style>
</head>
<body>
<div class="imac">
<div class="screen">
<h1>
<img src="img/zhihu-logo_96.png" class="logo"/>提醒设置 </h1>
<ul class="options">
<li>动态
<div class="switch has-switch">
<div id="option0" class="switch-on switch-animate">
<input type="checkbox" data-toggle="switch"><span class="switch-left">ON</span><label>
</label><span class="switch-right">OFF</span>
</div>
</div>
</li>
<li>好友
<div class="switch has-switch">
<div id="option1" class="switch-on switch-animate">
<input type="checkbox" data-toggle="switch"><span class="switch-left">ON</span><label>
</label><span class="switch-right">OFF</span>
</div>
</div>
</li>
<li>赞同
<div class="switch has-switch">
<div id="option2" class="switch-on switch-animate">
<input type="checkbox" data-toggle="switch"><span class="switch-left">ON</span><label>
</label><span class="switch-right">OFF</span>
</div>
</div>
</li>
<li>桌面通知(<input type="number" class="input-text" id="notificationCloseTimeout"/>秒)
<div class="switch has-switch">
<div id="option3" class="switch-on switch-animate">
<input type="checkbox" data-toggle="switch"><span class="switch-left">ON</span><label>
</label><span class="switch-right">OFF</span>
</div>
</div>
</li>
</ul>
</div>
</div>
<script src="options.js"></script>
</body>
</html>