Repository navigation
Expand file tree
/
Copy pathdesign-preview.html
More file actions
401 lines (383 loc) · 20.1 KB
/
Copy pathdesign-preview.html
File metadata and controls
401 lines (383 loc) · 20.1 KB
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
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>连点器 · 现代极简设计系统预览</title>
<style>
:root {
--primary: #2563EB;
--primary-dark: #1D4ED8;
--primary-light: #3B82F6;
--primary-container: #DBEAFE;
--background: #F5F7FA;
--surface: #FFFFFF;
--input-bg: #F1F5F9;
--stroke: #E2E8F0;
--text-primary: #1F2937;
--text-secondary: #6B7280;
--text-hint: #9CA3AF;
--success: #22C55E;
--danger: #EF4444;
--disabled: #D1D5DB;
--radius: 12px;
--font: -apple-system, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
font-family: var(--font);
background: var(--background);
color: var(--text-primary);
padding: 48px 24px 64px;
}
.wrap { max-width: 1240px; margin: 0 auto; }
/* ===== 页头 ===== */
.page-head { text-align: center; margin-bottom: 40px; }
.page-head h1 { font-size: 28px; font-weight: 700; letter-spacing: .5px; }
.page-head p { color: var(--text-secondary); font-size: 15px; margin-top: 8px; }
.chips { display: flex; gap: 8px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.chip {
background: var(--surface); border: 1px solid var(--stroke);
border-radius: 999px; padding: 6px 14px; font-size: 13px; color: var(--text-secondary);
}
.chip b { color: var(--primary); font-weight: 600; }
/* ===== 设计 token 区 ===== */
.tokens {
background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--radius);
padding: 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
gap: 24px; margin-bottom: 48px;
}
.token-group h3 { font-size: 14px; color: var(--text-secondary); margin-bottom: 12px; font-weight: 600; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { width: 44px; }
.swatch i { display: block; height: 32px; border-radius: 8px; border: 1px solid var(--stroke); }
.swatch span { display: block; font-size: 10px; color: var(--text-hint); margin-top: 4px; text-align: center; }
.type-row { display: flex; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.type-row small { color: var(--text-hint); font-size: 11px; width: 72px; flex: none; }
.demo-btn {
display: inline-flex; align-items: center; justify-content: center;
height: 48px; padding: 0 20px; border-radius: var(--radius);
font-size: 16px; font-weight: 600; border: none; cursor: pointer;
font-family: inherit; transition: background .15s, box-shadow .15s;
}
.demo-btn.primary { background: var(--primary); color: #fff; }
.demo-btn.primary:hover { background: var(--primary-dark); }
.demo-btn.outline { background: var(--surface); color: var(--primary); border: 1px solid var(--primary); }
.demo-btn.outline:hover { background: var(--primary-container); }
.demo-btn.disabled { background: var(--disabled); color: var(--text-secondary); cursor: not-allowed; }
.demo-input {
width: 100%; height: 48px; border-radius: var(--radius);
background: var(--input-bg); border: 1px solid var(--stroke);
padding: 0 14px; font-size: 16px; font-family: inherit; color: var(--text-primary);
outline: none; transition: border-color .15s;
}
.demo-input::placeholder { color: var(--text-hint); }
.demo-input:focus { border-color: var(--primary); background: var(--surface); }
/* ===== 页面栅格 ===== */
.pages {
display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 40px; justify-items: center;
}
.page-card { text-align: center; }
.page-card > p { margin-top: 16px; font-size: 14px; color: var(--text-secondary); }
.page-card > p b { color: var(--text-primary); }
/* ===== 手机框 ===== */
.phone {
width: 320px; height: 660px; background: #0F172A; border-radius: 40px;
padding: 10px; box-shadow: 0 24px 48px rgba(15, 23, 42, .18);
margin: 0 auto; position: relative;
}
.screen {
width: 100%; height: 100%; border-radius: 32px; overflow: hidden;
background: var(--background); position: relative; display: flex; flex-direction: column;
}
.statusbar {
height: 28px; flex: none; display: flex; align-items: center; justify-content: space-between;
padding: 0 18px; font-size: 11px; color: var(--text-secondary); font-weight: 600;
}
.statusbar.dark { color: rgba(255,255,255,.85); }
/* 主页深蓝渐变背景(与 bg_main_gradient.xml 对应) */
.screen-gradient {
background:
radial-gradient(circle 150px at 92% -8%, rgba(255,255,255,.10), transparent 70%),
radial-gradient(circle 130px at -8% 96%, rgba(255,255,255,.08), transparent 70%),
linear-gradient(135deg, #1E3A8A 0%, #2563EB 55%, #4338CA 100%);
}
.icon-tile {
background: #fff; border-radius: var(--radius); padding: 14px;
box-shadow: 0 8px 20px rgba(15, 23, 42, .35);
}
.m-btn.white { background: #fff; color: var(--primary); }
/* ===== 组件(与 Android 端一一对应) ===== */
.app-icon {
width: 64px; height: 64px; border-radius: 16px; background: var(--primary);
display: flex; align-items: center; justify-content: center; margin: 28px auto 0;
box-shadow: 0 8px 20px rgba(37, 99, 235, .35);
}
.app-title { text-align: center; font-size: 22px; font-weight: 700; margin-top: 14px; }
.app-sub { text-align: center; font-size: 14px; color: var(--text-secondary); margin-top: 4px; }
.state-card {
margin: 24px 20px 0; background: var(--surface); border-radius: var(--radius);
padding: 18px 20px; text-align: center;
}
.state-card .label { font-size: 14px; color: var(--text-secondary); }
.state-card .value { font-size: 16px; color: var(--text-primary); margin-top: 6px; font-weight: 500; }
.btn-col { display: flex; flex-direction: column; gap: 12px; padding: 0 20px; margin-top: 24px; }
.m-btn {
height: 48px; border-radius: var(--radius); border: none; width: 100%;
font-size: 16px; font-weight: 600; font-family: inherit; cursor: pointer;
display: flex; align-items: center; justify-content: center; gap: 8px;
transition: background .15s;
}
.m-btn.primary { background: var(--primary); color: #fff; }
.m-btn.primary:active { background: var(--primary-dark); }
.m-btn.outline { background: var(--surface); color: var(--primary); border: 1px solid var(--primary); }
.m-btn.outline:active { background: var(--primary-container); }
.m-btn.danger { background: var(--danger); color: #fff; }
.m-btn.disabled { background: var(--disabled); color: var(--text-secondary); cursor: not-allowed; }
/* 悬浮窗面板 */
.wall {
flex: 1; position: relative; overflow: hidden;
background: linear-gradient(160deg, #312E81 0%, #1E3A8A 45%, #0EA5E9 120%);
}
.wall::after {
content: ""; position: absolute; inset: 0;
background: radial-gradient(circle at 70% 25%, rgba(255,255,255,.14), transparent 45%);
}
.fw-panel {
position: absolute; right: 16px; top: 56px; width: 96px;
display: flex; flex-direction: column; gap: 6px; padding: 8px; z-index: 2;
}
.fw-main {
width: 40px; height: 40px; border-radius: var(--radius); background: var(--primary);
display: flex; align-items: center; justify-content: center; margin: 0 auto;
box-shadow: 0 6px 16px rgba(37, 99, 235, .45); cursor: pointer;
}
.fw-btn {
height: 32px; border-radius: var(--radius); background: var(--primary);
display: flex; align-items: center; justify-content: center; cursor: pointer;
transition: background .15s;
}
.fw-btn:active, .fw-main:active { background: var(--primary-dark); }
/* 弹窗页面 */
.overlay-page { flex: 1; position: relative; overflow: hidden; background: linear-gradient(160deg, #64748B, #334155); }
.overlay-page::before {
content: ""; position: absolute; inset: 0; backdrop-filter: blur(2px);
background: rgba(15, 23, 42, .45);
}
.dialog {
position: absolute; left: 14px; right: 14px; bottom: 14px; top: 40px;
background: var(--surface); border-radius: var(--radius); padding: 22px;
overflow-y: auto; z-index: 2;
}
.dialog::-webkit-scrollbar { width: 0; }
.d-title { font-size: 20px; font-weight: 700; }
.field { margin-top: 18px; }
.field label { display: block; font-size: 14px; color: var(--text-secondary); margin-bottom: 8px; }
.field .demo-input { height: 48px; }
.radio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px 6px; margin-top: 4px; }
.radio-grid.two { grid-template-columns: repeat(2, 1fr); }
.radio {
display: flex; align-items: center; gap: 8px; min-height: 40px;
font-size: 16px; color: var(--text-primary); cursor: pointer;
}
.radio .dot {
width: 20px; height: 20px; flex: none; border-radius: 50%;
border: 2px solid var(--text-hint); position: relative; transition: border-color .15s;
}
.radio.checked .dot { border-color: var(--primary); }
.radio.checked .dot::after {
content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--primary);
}
.d-actions { display: flex; gap: 8px; margin-top: 24px; }
.d-actions .m-btn { flex: 1; }
svg { flex: none; }
@media (prefers-reduced-motion: reduce) {
* { transition: none !important; }
}
</style>
</head>
<body>
<div class="wrap">
<header class="page-head">
<h1>连点器 · 设计系统预览</h1>
<p>现代极简风格 — 与 Android 端(Material3 主题 + XML 布局)逐像素对应的视觉规范</p>
<div class="chips">
<span class="chip">主色 <b>#2563EB</b></span>
<span class="chip">圆角 <b>12dp</b></span>
<span class="chip">按钮高度 <b>48dp</b></span>
<span class="chip">文字 <b>22 / 20 / 16 / 14sp</b></span>
<span class="chip">深色模式 <b>适配</b></span>
</div>
</header>
<!-- 设计 Token -->
<section class="tokens">
<div class="token-group">
<h3>色彩 Color</h3>
<div class="swatches">
<div class="swatch"><i style="background:#2563EB"></i><span>Primary</span></div>
<div class="swatch"><i style="background:#1D4ED8"></i><span>Dark</span></div>
<div class="swatch"><i style="background:#DBEAFE"></i><span>Container</span></div>
<div class="swatch"><i style="background:#F5F7FA"></i><span>BG</span></div>
<div class="swatch"><i style="background:#F1F5F9"></i><span>Input</span></div>
<div class="swatch"><i style="background:#22C55E"></i><span>Success</span></div>
<div class="swatch"><i style="background:#EF4444"></i><span>Danger</span></div>
<div class="swatch"><i style="background:#D1D5DB"></i><span>Disabled</span></div>
</div>
</div>
<div class="token-group">
<h3>字体 Typography</h3>
<div class="type-row"><small>Title 22sp</small><b style="font-size:22px">连点器</b></div>
<div class="type-row"><small>Dialog 20sp</small><b style="font-size:20px">悬浮窗设置</b></div>
<div class="type-row"><small>Body 16sp</small><span style="font-size:16px">当前状态:悬浮窗未启动</span></div>
<div class="type-row"><small>Label 14sp</small><span style="font-size:14px;color:var(--text-secondary)">延迟(毫秒)</span></div>
</div>
<div class="token-group">
<h3>按钮 Button(12dp 圆角 · 48dp 高)</h3>
<div style="display:flex;gap:8px;flex-wrap:wrap">
<button class="demo-btn primary">主按钮</button>
<button class="demo-btn outline">描边按钮</button>
<button class="demo-btn disabled">禁用</button>
</div>
</div>
<div class="token-group">
<h3>输入框 Input(聚焦蓝描边)</h3>
<input class="demo-input" placeholder="0 表示无限循环">
</div>
</section>
<!-- 四个页面 -->
<section class="pages">
<!-- 1 主界面 -->
<div class="page-card">
<div class="phone"><div class="screen">
<div class="statusbar dark"><span>9:41</span><span>▲ ● ▮</span></div>
<div style="flex:1;display:flex;flex-direction:column" class="screen-gradient">
<div class="icon-tile" style="margin:28px auto 0">
<svg width="36" height="36" viewBox="0 0 24 24" fill="none" stroke="#2563EB" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M9 11.5V4.8a1.8 1.8 0 0 1 3.6 0v5.2"/>
<path d="M12.6 10a1.8 1.8 0 0 1 3.6 0v1.4a1.8 1.8 0 0 1 3.6 0v3.4A6.2 6.2 0 0 1 13.6 21h-.9a6.3 6.3 0 0 1-5.4-3L4.6 13a1.7 1.7 0 0 1 2.8-1.9L9 13"/>
</svg>
</div>
<div class="app-title" style="color:#fff">连点器</div>
<div class="app-sub" style="color:rgba(255,255,255,.72)">轻触悬浮窗即可自动点击</div>
<div class="state-card">
<div class="label">当前状态</div>
<div class="value">请先获取所有权限</div>
</div>
<div class="btn-col">
<button class="m-btn danger">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="#fff" stroke-width="2" stroke-linecap="round"><path d="M12 9v4m0 4h.01"/><circle cx="12" cy="12" r="9"/></svg>
获取权限
</button>
<button class="m-btn outline">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="#2563EB" stroke-width="2" stroke-linecap="round"><path d="M21 12a9 9 0 1 1-2.6-6.4M21 4v5h-5"/></svg>
刷新状态
</button>
<button class="m-btn white">启动悬浮窗</button>
</div>
</div>
</div></div>
<p><b>① 主界面</b> · 权限引导与悬浮窗启停<br>图标 + 标题 + 状态卡片 + 主/描边/禁用三态按钮</p>
</div>
<!-- 2 悬浮窗控制面板 -->
<div class="page-card">
<div class="phone"><div class="screen">
<div class="statusbar dark"><span>9:41</span><span>▲ ● ▮</span></div>
<div class="wall">
<div class="fw-panel">
<div class="fw-main">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="#fff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M9 11.5V4.8a1.8 1.8 0 0 1 3.6 0v5.2"/><path d="M12.6 10a1.8 1.8 0 0 1 3.6 0v1.4a1.8 1.8 0 0 1 3.6 0v3.4A6.2 6.2 0 0 1 13.6 21h-.9a6.3 6.3 0 0 1-5.4-3L4.6 13a1.7 1.7 0 0 1 2.8-1.9L9 13"/>
</svg>
</div>
<div class="fw-btn"><svg width="16" height="16" viewBox="0 0 24 24" fill="#fff"><path d="M8 5v14l11-7z"/></svg></div>
<div class="fw-btn"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#fff" stroke-width="2.2" stroke-linecap="round"><path d="M12 5v14M5 12h14"/></svg></div>
<div class="fw-btn"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#fff" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 12h13m0 0-4-4m4 4-4 4M20 5v14"/></svg></div>
<div class="fw-btn"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#fff" stroke-width="2.2" stroke-linecap="round"><path d="M5 12h14"/></svg></div>
<div class="fw-btn"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#fff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.7 1.7 0 0 0 .3 1.9l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.9-.3 1.7 1.7 0 0 0-1 1.5V21a2 2 0 1 1-4 0v-.1a1.7 1.7 0 0 0-1-1.6 1.7 1.7 0 0 0-1.9.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.9 1.7 1.7 0 0 0-1.5-1H3a2 2 0 1 1 0-4h.1a1.7 1.7 0 0 0 1.6-1 1.7 1.7 0 0 0-.3-1.9l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.9.3h.1a1.7 1.7 0 0 0 1-1.5V3a2 2 0 1 1 4 0v.1a1.7 1.7 0 0 0 1 1.5h.1a1.7 1.7 0 0 0 1.9-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.9v.1a1.7 1.7 0 0 0 1.5 1H21a2 2 0 1 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1z"/></svg></div>
<div class="fw-btn"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#fff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M17.9 17.9A10.4 10.4 0 0 1 12 20C7 20 2.7 16.6 1 12a11.6 11.6 0 0 1 4.1-5.4M9.9 4.2A10.4 10.4 0 0 1 12 4c5 0 9.3 3.4 11 8a11.6 11.6 0 0 1-1.9 3.1M9.9 9.9a3 3 0 0 0 4.2 4.2"/><path d="m2 2 20 20"/></svg></div>
<div class="fw-btn"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#fff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4M16 17l5-5-5-5M21 12H9"/></svg></div>
</div>
</div>
</div></div>
<p><b>② 悬浮窗控制面板</b> · 蓝色 12dp 圆角 + 按压变深<br>主按钮 + 启动/添加/滑动/减少/设置/隐藏/退出</p>
</div>
<!-- 3 全局设置弹窗 -->
<div class="page-card">
<div class="phone"><div class="screen">
<div class="statusbar dark"><span>9:41</span><span>▲ ● ▮</span></div>
<div class="overlay-page">
<div class="dialog">
<div class="d-title">悬浮窗设置</div>
<div class="field">
<label>总循环次数</label>
<input class="demo-input" placeholder="0 表示无限循环">
</div>
<div class="btn-col" style="padding:0;margin-top:22px">
<button class="m-btn outline">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="#2563EB" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"/><path d="M17 21v-8H7v8M7 3v5h8"/></svg>
保存当前点击位置
</button>
<button class="m-btn outline">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="#2563EB" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><path d="M14 2v6h6M9 15h6"/></svg>
打开点击文件
</button>
</div>
<div class="d-actions">
<button class="m-btn outline">取消</button>
<button class="m-btn primary">确定</button>
</div>
</div>
</div>
</div></div>
<p><b>③ 全局设置弹窗</b> · 白卡片 12dp 圆角<br>循环次数输入 + 文件操作 + 取消/确定</p>
</div>
<!-- 4 单点设置弹窗 -->
<div class="page-card">
<div class="phone"><div class="screen">
<div class="statusbar dark"><span>9:41</span><span>▲ ● ▮</span></div>
<div class="overlay-page">
<div class="dialog">
<div class="d-title">点击点设置</div>
<div class="field">
<label>点击名称</label>
<input class="demo-input" value="点 1">
</div>
<div class="field">
<label>点击类型</label>
<div class="radio-grid">
<div class="radio checked"><span class="dot"></span>点击</div>
<div class="radio"><span class="dot"></span>双击</div>
<div class="radio"><span class="dot"></span>返回键</div>
<div class="radio"><span class="dot"></span>主页键</div>
<div class="radio"><span class="dot"></span>打开通知栏</div>
</div>
</div>
<div class="field">
<label>点击位置</label>
<div class="radio-grid two">
<div class="radio checked"><span class="dot"></span>中间</div>
<div class="radio"><span class="dot"></span>随机</div>
</div>
</div>
<div class="field">
<label>延迟(毫秒)</label>
<input class="demo-input" value="100">
</div>
<div class="field">
<label>触摸时长(毫秒)</label>
<input class="demo-input" value="100">
</div>
<div class="d-actions">
<button class="m-btn outline">取消</button>
<button class="m-btn primary">保存</button>
</div>
</div>
</div>
</div></div>
<p><b>④ 单点设置弹窗</b> · 与全局设置同构<br>名称 + 类型/位置单选(蓝色选中态)+ 数值输入</p>
</div>
</section>
</div>
</body>
</html>