-
Notifications
You must be signed in to change notification settings - Fork 73
Expand file tree
/
Copy pathindex.html
More file actions
409 lines (361 loc) · 12.4 KB
/
index.html
File metadata and controls
409 lines (361 loc) · 12.4 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
402
403
404
405
406
407
408
409
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>烁皓的工具箱</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;700&display=swap" rel="stylesheet">
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
min-height: 100vh;
background: #f5f6f8;
font-family: 'Noto Serif SC', serif;
display: flex;
flex-direction: column;
align-items: center;
}
/* ── Header ── */
header {
width: 100%;
background: #fff;
border-bottom: 1px solid #e5e7eb;
padding: 0 32px;
height: 56px;
display: flex;
align-items: center;
justify-content: space-between;
gap: 10px;
}
.logo {
font-size: 15px;
font-weight: 700;
color: #111;
letter-spacing: 0.02em;
}
.github-btn {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 6px 12px;
border: 1px solid #e5e7eb;
border-radius: 8px;
background: #fff;
color: #111;
font-size: 13px;
font-family: sans-serif;
font-weight: 600;
text-decoration: none;
transition: border-color 0.15s, box-shadow 0.15s;
}
.github-btn:hover {
border-color: #111;
box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.github-btn svg { flex: none; }
.github-star {
display: inline-flex;
align-items: center;
gap: 4px;
padding-left: 8px;
border-left: 1px solid #e5e7eb;
color: #6b7280;
font-size: 12px;
}
.github-star.hidden { display: none; }
/* ── Hero ── */
.hero {
padding: 64px 32px 48px;
text-align: center;
max-width: 640px;
}
.hero h1 {
font-size: 28px;
font-weight: 700;
color: #111;
letter-spacing: -0.01em;
margin-bottom: 12px;
}
.hero p {
font-size: 14px;
color: #6b7280;
line-height: 1.8;
font-family: sans-serif;
}
/* ── Grid ── */
.grid {
width: 100%;
max-width: 720px;
padding: 0 32px 64px;
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 16px;
}
@media (max-width: 480px) {
.grid { grid-template-columns: 1fr; }
}
/* ── Card base ── */
.card {
background: #fff;
border: 1.5px solid #e5e7eb;
border-radius: 12px;
padding: 24px;
display: flex;
flex-direction: column;
gap: 14px;
text-decoration: none;
}
a.card {
transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
cursor: pointer;
}
a.card:hover {
border-color: #93c5fd;
box-shadow: 0 4px 16px rgba(37,99,235,0.08);
transform: translateY(-2px);
}
.card.disabled {
opacity: 0.48;
cursor: not-allowed;
}
/* ── Card icon ── */
.card-icon {
width: 44px;
height: 44px;
border-radius: 11px;
display: flex;
align-items: center;
justify-content: center;
flex: none;
}
.icon-blue { background: linear-gradient(135deg, #1e3a8a, #2563eb); }
.icon-violet { background: linear-gradient(135deg, #4c1d95, #7c3aed); }
.icon-slate { background: linear-gradient(135deg, #334155, #64748b); }
/* ── Card body ── */
.card-body { display: flex; flex-direction: column; gap: 5px; }
.card-name {
font-size: 15px;
font-weight: 700;
color: #111;
letter-spacing: 0.01em;
}
.card-desc {
font-size: 12px;
color: #6b7280;
line-height: 1.6;
font-family: sans-serif;
}
/* ── Tag ── */
.card-tag {
display: inline-flex;
align-items: center;
font-size: 10px;
font-family: sans-serif;
font-weight: 600;
letter-spacing: 0.06em;
text-transform: uppercase;
padding: 2px 8px;
border-radius: 20px;
width: fit-content;
}
.tag-live { background: #dcfce7; color: #16a34a; }
.tag-soon { background: #f3f4f6; color: #9ca3af; }
/* ── Support ── */
.support {
width: 100%;
max-width: 880px;
padding: 0 32px 64px;
}
.support-card {
background: linear-gradient(180deg, #fffdf8, #ffffff);
border: 1.5px solid #f3e8d2;
border-radius: 20px;
padding: 28px;
box-shadow: 0 12px 30px rgba(148, 113, 45, 0.08);
}
.support-title {
font-size: 24px;
color: #111;
margin-bottom: 8px;
}
.support-desc {
font-size: 14px;
color: #6b7280;
line-height: 1.8;
font-family: sans-serif;
margin-bottom: 24px;
}
.support-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
gap: 20px;
}
.support-item {
background: #fff;
border: 1px solid #f3eadb;
border-radius: 16px;
padding: 18px;
text-align: center;
}
.support-item h3 {
font-size: 16px;
color: #111;
margin-bottom: 14px;
}
.support-item img {
width: 100%;
max-width: 240px;
border-radius: 12px;
display: block;
margin: 0 auto;
box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}
@media (max-width: 640px) {
header { padding: 0 20px; }
.hero { padding: 48px 20px 36px; }
.grid, .support { padding-left: 20px; padding-right: 20px; }
.support-card { padding: 22px; }
}
/* ── Footer ── */
footer {
margin-top: auto;
padding: 24px 32px;
font-size: 11px;
font-family: sans-serif;
color: #9ca3af;
text-align: center;
letter-spacing: 0.04em;
}
footer a { color: #9ca3af; text-decoration: none; }
footer a:hover { color: #6b7280; }
</style>
</head>
<body>
<header>
<span class="logo">烁皓的工具箱</span>
<a class="github-btn" href="https://github.com/eternityspring/article-tools" target="_blank" rel="noopener">
<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true">
<path d="M8 0C3.58 0 0 3.58 0 8a8 8 0 005.47 7.59c.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82a7.42 7.42 0 014 0c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0016 8c0-4.42-3.58-8-8-8z"/>
</svg>
<span>GitHub</span>
<span class="github-star hidden" id="github-star">
<svg width="12" height="12" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true">
<path d="M8 .25a.75.75 0 01.673.418l1.882 3.815 4.21.612a.75.75 0 01.416 1.279l-3.046 2.97.719 4.192a.75.75 0 01-1.088.791L8 12.347l-3.766 1.98a.75.75 0 01-1.088-.79l.72-4.194L.818 6.374a.75.75 0 01.416-1.28l4.21-.611L7.327.668A.75.75 0 018 .25z"/>
</svg>
<span id="github-star-count">—</span>
</span>
</a>
</header>
<section class="hero">
<h1>只需要一个约定</h1>
<p>按照 <code style="font-family:monospace;font-size:13px;background:#f3f4f6;padding:1px 6px;border-radius:4px;color:#374151;">draft.md</code> 的格式规范写作,其他的交给工具。<br>封面、公众号排版、X 排版——打开即用,点击完成。</p>
</section>
<div class="grid">
<!-- 封面生成器 -->
<a class="card" href="cover.html">
<div class="card-icon icon-blue">
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" stroke="white" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round">
<rect x="2" y="3" width="18" height="14" rx="2"/>
<path d="M2 13.5l4.5-4.5 3.5 3.5 3.5-4.5 6.5 6.5"/>
<line x1="6" y1="20" x2="16" y2="20"/>
<line x1="11" y1="17" x2="11" y2="20"/>
</svg>
</div>
<div class="card-body">
<span class="card-name">封面生成器</span>
<span class="card-desc">快速生成文章封面图,支持多种配色、装饰风格与光影叠加。</span>
</div>
<span class="card-tag tag-live">已上线</span>
</a>
<!-- 二维码工具 -->
<a class="card" href="qrcode.html">
<div class="card-icon icon-violet">
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" stroke="white" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round">
<rect x="2" y="2" width="7" height="7" rx="1"/>
<rect x="3.5" y="3.5" width="4" height="4" rx="0.5" fill="white" stroke="none"/>
<rect x="13" y="2" width="7" height="7" rx="1"/>
<rect x="14.5" y="3.5" width="4" height="4" rx="0.5" fill="white" stroke="none"/>
<rect x="2" y="13" width="7" height="7" rx="1"/>
<rect x="3.5" y="14.5" width="4" height="4" rx="0.5" fill="white" stroke="none"/>
<rect x="13" y="13" width="2" height="2" fill="white" stroke="none"/>
<rect x="17" y="13" width="2" height="2" fill="white" stroke="none"/>
<rect x="13" y="17" width="2" height="2" fill="white" stroke="none"/>
<rect x="17" y="17" width="2" height="2" fill="white" stroke="none"/>
</svg>
</div>
<div class="card-body">
<span class="card-name">二维码工具</span>
<span class="card-desc">生成与解析二维码,支持文本、链接,纯本地处理。</span>
</div>
<span class="card-tag tag-live">已上线</span>
</a>
<!-- MD → 微信 -->
<a class="card" href="md-to-wechat.html">
<div class="card-icon icon-slate">
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" stroke="white" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round">
<path d="M5 3h8l4 4v12H5V3z"/>
<path d="M13 3v4h4"/>
<line x1="8" y1="11" x2="14" y2="11"/>
<line x1="8" y1="14" x2="12" y2="14"/>
</svg>
</div>
<div class="card-body">
<span class="card-name">MD → 微信排版</span>
<span class="card-desc">将 Markdown 转换为微信公众号可用的富文本格式。</span>
</div>
<span class="card-tag tag-live">已上线</span>
</a>
<!-- MD → X -->
<a class="card" href="md-to-x.html">
<div class="card-icon icon-slate">
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" stroke="white" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round">
<path d="M5 3h8l4 4v12H5V3z"/>
<path d="M13 3v4h4"/>
<line x1="8" y1="11" x2="14" y2="11"/>
<line x1="8" y1="14" x2="12" y2="14"/>
</svg>
</div>
<div class="card-body">
<span class="card-name">MD → X 排版</span>
<span class="card-desc">将 Markdown 转换为适合 X(Twitter)发布的格式。</span>
</div>
<span class="card-tag tag-live">已上线</span>
</a>
</div>
<section class="support">
<div class="support-card">
<h2 class="support-title">请我喝咖啡</h2>
<p class="support-desc">如果这些小工具帮你省下了一点时间,欢迎扫一扫,请我喝杯咖啡。</p>
<div class="support-grid">
<div class="support-item">
<h3>支付宝</h3>
<img src="images/pay-alipay.jpg" alt="支付宝收款码">
</div>
<div class="support-item">
<h3>微信</h3>
<img src="images/pay-wechat.jpg" alt="微信收款码">
</div>
</div>
</div>
</section>
<footer>
由 <a href="https://x.com/eternityspring" target="_blank">@eternityspring</a> 构建 · 更多工具持续上线中
</footer>
<script>
(function () {
fetch('https://api.github.com/repos/eternityspring/article-tools')
.then(r => r.ok ? r.json() : null)
.then(data => {
if (!data || typeof data.stargazers_count !== 'number') return;
const wrap = document.getElementById('github-star');
const count = document.getElementById('github-star-count');
const n = data.stargazers_count;
count.textContent = n >= 1000 ? (n / 1000).toFixed(1) + 'k' : n;
wrap.classList.remove('hidden');
})
.catch(() => {});
})();
</script>
</body>
</html>