-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpopup.html
249 lines (217 loc) · 5.31 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
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>PTA复习助手</title>
<style>
:root {
--primary-color: #2563eb;
--success-color: #52c41a;
--warning-color: #faad14;
--error-color: #f5222d;
--font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
--border-radius-base: 8px;
--box-shadow-base: 0 2px 8px rgba(0, 0, 0, 0.15);
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
width: 320px;
font-family: var(--font-family);
}
.card {
/* background-color: #fff; */
border-radius: var(--border-radius-base);
/* box-shadow: var(--box-shadow-base); */
padding: 16px;
margin: 16px;
}
.card-header {
border-bottom: 1px solid #e5e7eb;
padding-bottom: 12px;
margin-bottom: 16px;
text-align: center;
}
h1 {
font-size: 18px;
font-weight: 900;
text-align: center;
font-style: italic;
text-shadow: 0 0 8px #9ca3af;
}
.divider {
height: 1px;
margin: 16px 0;
}
.control-group {
margin-bottom: 16px;
display: flex;
align-items: center;
padding: 8px;
border-radius: var(--border-radius-base);
transition: background-color 0.3s;
}
.control-group:hover {
background-color: rgba(0, 0, 0, 0.05);
}
label {
display: flex;
align-items: center;
cursor: pointer;
width: 100%;
}
.control-text {
flex: 1;
font-size: 14px;
color: #374151;
}
.switch {
position: relative;
display: inline-block;
width: 40px;
height: 20px;
margin-right: 12px;
}
.switch input {
opacity: 0;
width: 0;
height: 0;
}
.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #d1d5db;
transition: 0.4s;
border-radius: 10px;
}
.slider:before {
position: absolute;
content: "";
height: 16px;
width: 16px;
left: 2px;
bottom: 2px;
background-color: white;
transition: 0.4s;
border-radius: 50%;
box-shadow: var(--box-shadow-base);
}
input:checked + .slider {
background-color: var(--primary-color);
}
input:checked + .slider:before {
transform: translateX(20px);
}
.button {
width: 100%;
padding: 10px 16px;
background-color: var(--primary-color);
color: white;
border: none;
border-radius: var(--border-radius-base);
cursor: pointer;
font-size: 14px;
margin-bottom: 16px;
transition: background-color 0.3s, transform 0.1s;
}
.button:hover {
background-color: #1d4ed8;
}
.button:active {
transform: translateY(1px);
}
.footer {
font-size: 12px;
color: #6b7280;
text-align: center;
margin-top: 16px;
}
.footer a {
color: var(--primary-color);
text-decoration: none;
}
.counter-container {
display: flex;
justify-content: center;
margin-top: 16px;
}
.counter-container img {
height: 40px;
width: auto;
}
</style>
</head>
<body>
<div class="card">
<div class="card-header">
<h1>PTA复习助手</h1>
</div>
<div class="control-group">
<label>
<span class="switch">
<input type="checkbox" id="toggleRadio">
<span class="slider"></span>
</span>
<span class="control-text">隐藏单选按钮</span>
</label>
</div>
<div class="control-group">
<label>
<span class="switch">
<input type="checkbox" id="toggleCheckbox">
<span class="slider"></span>
</span>
<span class="control-text">隐藏多选按钮</span>
</label>
</div>
<div class="control-group">
<label>
<span class="switch">
<input type="checkbox" id="toggleResults">
<span class="slider"></span>
</span>
<span class="control-text">隐藏结果区域</span>
</label>
</div>
<div class="control-group">
<label>
<span class="switch">
<input type="checkbox" id="toggleInputs">
<span class="slider"></span>
</span>
<span class="control-text">隐藏填空答案</span>
</label>
</div>
<div class="control-group">
<label>
<span class="switch">
<input type="checkbox" id="toggleRight">
<span class="slider"></span>
</span>
<span class="control-text">只显示错误题目</span>
</label>
</div>
<button id="exportButton" class="button">
导出答题答案
</button>
<button id="importButton" class="button" style="background-color: #4f46e5;">
导入答题答案
</button>
<div class="footer">
刷新页面后设置将自动应用
<div>反馈:<a href="https://github.com/Dawson-web" target="_blank">GitHub Issues</a></div>
</div>
<div class="counter-container">
<img src="https://count.getloli.com/get/@pta-review-plugin" alt="访问次数" />
</div>
</div>
<script src="popup.js"></script>
</body>
</html>