-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathguide.html
More file actions
383 lines (357 loc) · 15.1 KB
/
guide.html
File metadata and controls
383 lines (357 loc) · 15.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
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>使用指导 | MarkNice</title>
<link rel="stylesheet" href="./src/styles.css" />
<style>
.guide-section {
padding: 100px 0 60px;
background: var(--bg);
}
.guide-content {
max-width: 780px;
margin: 0 auto;
padding: 0 24px;
}
.guide-content h1 {
font-size: 32px;
font-weight: 800;
color: var(--text);
margin-bottom: 8px;
text-align: center;
}
.guide-subtitle {
text-align: center;
color: var(--text-secondary);
font-size: 15px;
margin-bottom: 40px;
}
.guide-content h2 {
font-size: 22px;
font-weight: 700;
color: var(--text);
margin: 48px 0 16px;
padding-bottom: 8px;
border-bottom: 2px solid var(--accent-light);
}
.guide-content h3 {
font-size: 17px;
font-weight: 700;
color: var(--text);
margin: 32px 0 12px;
}
.guide-content p {
font-size: 15px;
line-height: 1.9;
color: var(--text-secondary);
margin: 10px 0;
}
.guide-content ul, .guide-content ol {
padding-left: 24px;
margin: 10px 0;
}
.guide-content li {
font-size: 15px;
line-height: 1.9;
color: var(--text-secondary);
margin: 6px 0;
}
.guide-content strong {
color: var(--text);
font-weight: 600;
}
.guide-content code {
background: var(--bg-muted);
padding: 2px 6px;
border-radius: 4px;
font-size: 13px;
font-family: Menlo, Consolas, monospace;
}
.guide-content hr {
border: none;
border-top: 1px solid var(--card-border);
margin: 40px 0;
}
.guide-content blockquote {
margin: 14px 0;
padding: 12px 16px;
border-left: 4px solid var(--accent);
background: var(--accent-light);
border-radius: 0 8px 8px 0;
color: var(--text-secondary);
font-size: 14px;
line-height: 1.8;
}
.guide-content blockquote p { margin: 0; }
.guide-table {
width: 100%;
border-collapse: collapse;
margin: 16px 0;
font-size: 14px;
}
.guide-table th, .guide-table td {
border: 1px solid var(--card-border);
padding: 10px 14px;
text-align: left;
}
.guide-table th {
background: var(--bg-soft);
font-weight: 600;
color: var(--text);
}
.guide-table td {
color: var(--text-secondary);
}
.step-card {
background: var(--card);
border: 1px solid var(--card-border);
border-radius: var(--radius);
padding: 24px;
margin: 16px 0;
box-shadow: var(--shadow-sm);
}
.step-num {
display: inline-flex;
align-items: center;
justify-content: center;
width: 32px;
height: 32px;
background: linear-gradient(135deg, var(--gradient-from), var(--gradient-to));
color: #fff;
font-size: 15px;
font-weight: 700;
border-radius: 50%;
margin-right: 10px;
vertical-align: middle;
}
.step-title {
font-size: 17px;
font-weight: 700;
color: var(--text);
vertical-align: middle;
}
.faq-item { margin: 24px 0; }
.faq-q {
font-size: 15px;
font-weight: 700;
color: var(--text);
margin-bottom: 6px;
}
.faq-a {
font-size: 14px;
line-height: 1.85;
color: var(--text-secondary);
}
.back-link {
display: inline-flex;
align-items: center;
gap: 6px;
color: var(--accent);
text-decoration: none;
font-size: 14px;
font-weight: 500;
margin-top: 40px;
transition: opacity 0.2s;
}
.back-link:hover { opacity: 0.8; }
@media (max-width: 768px) {
.guide-section { padding: 80px 0 40px; }
.guide-content h1 { font-size: 24px; }
.guide-content h2 { font-size: 19px; margin-top: 36px; }
.guide-content { padding: 0 16px; }
.step-card { padding: 18px; }
}
</style>
</head>
<body>
<!-- Navbar -->
<nav id="navbar" class="navbar">
<div class="nav-inner">
<a href="./index.html" class="logo">
<div class="logo-icon">
<svg viewBox="0 0 24 24" width="18" height="18" fill="currentColor">
<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6z"/>
<polyline points="14 2 14 8 20 8" fill="none" stroke="currentColor" stroke-width="1.5"/>
</svg>
</div>
<span class="logo-text">MarkNice</span>
</a>
<div class="nav-actions">
<button id="modeToggleBtn" class="nav-btn" title="切换主题">
<svg id="sunIcon" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2">
<circle cx="12" cy="12" r="5"/><line x1="12" y1="1" x2="12" y2="3"/><line x1="12" y1="21" x2="12" y2="23"/><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"/><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"/><line x1="1" y1="12" x2="3" y2="12"/><line x1="21" y1="12" x2="23" y2="12"/><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"/><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"/>
</svg>
<svg id="moonIcon" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2" style="display:none">
<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"/>
</svg>
</button>
</div>
</div>
</nav>
<section class="guide-section">
<div class="guide-content">
<h1>使用指导</h1>
<p class="guide-subtitle">几分钟学会用 MarkNice 排版你的公众号文章 | 进行Markdown/Word/PDF等<span class="gradient-text">排版格式转换</span></p>
<hr />
<h2>快速上手</h2>
<div class="step-card">
<span class="step-num">1</span>
<span class="step-title">输入内容</span>
<p>打开页面后向下滚动到编辑器区域,你有三种方式输入内容:</p>
<ul>
<li><strong>直接粘贴</strong>:在左侧「Markdown 输入」文本框中粘贴你的 Markdown 文本</li>
<li><strong>导入 MD 文件</strong>:点击「导入 MD」按钮,选择本地的 <code>.md</code> 或 <code>.txt</code> 文件</li>
<li><strong>导入 Word 文档</strong>:点击「导入 Word」按钮,选择本地的 <code>.docx</code> 文件</li>
</ul>
<blockquote><p>💡 不熟悉 Markdown?可以点击「示例」按钮查看效果,或者直接导入你的 Word 文档。<br/> Markdown语法教程:<a href="https://kenhuang.com/zh/markdown/">https://kenhuang.com/zh/markdown/ </a></p></blockquote>
</div>
<div class="step-card">
<span class="step-num">2</span>
<span class="step-title">选择样式</span>
<p>在右侧「公众号预览」面板的工具栏中:</p>
<ul>
<li><strong>模板</strong>:从下拉菜单选择喜欢的排版风格(共 11 种)</li>
<li><strong>字号</strong>:点击 <code>−</code> / <code>+</code> 调小或调大全文字号</li>
<li><strong>段距</strong>:点击 <code>−</code> / <code>+</code> 调整段落之间的间距</li>
</ul>
<p>右侧预览区会实时显示最终效果。</p>
</div>
<div class="step-card">
<span class="step-num">3</span>
<span class="step-title">复制到公众号</span>
<p>点击「复制到公众号」按钮,然后打开微信公众号后台的图文编辑器,直接 <code>Ctrl+V</code>(Mac 为 <code>Cmd+V</code>)粘贴即可。也可以点击「存为 PDF/Word/HTML」保存为文字可复制的 PDF 文件 或 Word 及 HTML 文件。</p>
</div>
<hr />
<h2>功能详解</h2>
<h3>导入 Word 文档</h3>
<p>点击「导入 Word」选择 <code>.docx</code> 文件,工具会自动识别并转换:</p>
<ul>
<li>各级标题及自动编号(如 1、1.1、1.1.1)</li>
<li>有序列表和无序列表</li>
<li>加粗、斜体、下划线、删除线等文字格式</li>
<li>表格(包括合并单元格)</li>
<li>数学公式(Word 中的公式编辑器内容)</li>
<li>文档中的图片</li>
</ul>
<p>转换后的内容会自动填入左侧编辑框,你可以在此基础上继续修改。</p>
<h3>11 种排版主题</h3>
<table class="guide-table">
<thead>
<tr><th>主题</th><th>风格特点</th></tr>
</thead>
<tbody>
<tr><td>简洁</td><td>清爽干净,适合大多数场景</td></tr>
<tr><td>雅致</td><td>居中标题,蓝色强调,适合品质内容</td></tr>
<tr><td>科技</td><td>蓝色调,适合技术、产品类文章</td></tr>
<tr><td>教育</td><td>绿色调,适合教学、知识分享</td></tr>
<tr><td>新闻</td><td>衬线字体,适合新闻、评论类</td></tr>
<tr><td>杂志</td><td>红色调居中标题,适合专题、深度文章</td></tr>
<tr><td>琥珀橙</td><td>暖色调,适合生活、美食类</td></tr>
<tr><td>活力紫</td><td>渐变标题,适合创意、潮流类</td></tr>
<tr><td>极简留白</td><td>大量留白,适合文艺、随笔</td></tr>
<tr><td>复古专栏</td><td>棕色衬线,适合历史、文化类</td></tr>
<tr><td>暗夜霓虹</td><td>深色背景,适合科技、夜间阅读</td></tr>
</tbody>
</table>
<h3>字号与段距调节</h3>
<ul>
<li><strong>字号</strong>:默认值为 0,范围 −6 到 +6,每次调整 1px</li>
<li><strong>段距</strong>:默认值为 0,范围 −16 到 +24,每次调整 2px</li>
</ul>
<p>建议先选好模板,再微调字号和段距。</p>
<h3>预览模式</h3>
<p>工具栏中的电脑 / 手机图标可切换预览模式:</p>
<ul>
<li><strong>桌面模式</strong>:全宽预览,适合查看整体排版</li>
<li><strong>手机模式</strong>:模拟手机屏幕宽度,更接近读者实际阅读效果</li>
</ul>
<h3>另存为 HTML</h3>
<p>点击「存为 HTML」按钮,会将当前预览内容下载为一个完整的 HTML 文件,可用浏览器打开查看,也可用于其他用途。</p>
<h3>保存为 PDF</h3>
<p>点击「存为 PDF」按钮,会弹出浏览器打印对话框。在对话框中将目标打印机选择为「另存为 PDF」(或 Microsoft Print to PDF),然后点击保存即可。生成的 PDF 文件中文字可以选中和复制。</p>
<h3>保存为 Word</h3>
<p>点击「存为 Word」按钮,会自动下载一个 <code>.docx</code> 格式的 Word 文档。文档中会保留文本格式、标题层级、列表、表格等内容,可以在 Microsoft Word、WPS 等软件中打开和编辑。</p>
<p>注意:复杂样式(如渐变背景、特殊字体效果等)可能无法完全还原,建议导出后检查格式。</p>
<h3>深色模式</h3>
<p>点击页面右上角的太阳 / 月亮图标切换深色 / 浅色模式。右键点击该图标可恢复为跟随系统设置。</p>
<blockquote><p>注意:深色模式只影响编辑器界面,不影响公众号排版的输出效果。</p></blockquote>
<hr />
<h2>常见问题</h2>
<div class="faq-item">
<p class="faq-q">Q:粘贴到公众号后格式丢失?</p>
<p class="faq-a">公众号编辑器对超长内容的粘贴支持有限。如果文章很长,建议分段复制粘贴。</p>
</div>
<div class="faq-item">
<p class="faq-q">Q:Word 导入后部分内容缺失?</p>
<p class="faq-a">目前支持 <code>.docx</code> 格式(Word 2007 及以上版本)。旧版 <code>.doc</code> 格式不支持,请先在 Word 中另存为 <code>.docx</code>。部分复杂排版(如文本框、艺术字、SmartArt)暂不支持。</p>
</div>
<div class="faq-item">
<p class="faq-q">Q:数学公式显示不正常?</p>
<p class="faq-a">公式渲染依赖网络加载 KaTeX 库。请确保网络连接正常。公式在预览区正常显示即可,复制到公众号后会以图片或文本形式呈现。</p>
</div>
<div class="faq-item">
<p class="faq-q">Q:手机上能用吗?</p>
<p class="faq-a">可以。页面已针对手机浏览器做了适配优化,所有功能均可在手机上正常使用。</p>
</div>
<div class="faq-item">
<p class="faq-q">Q:我的数据安全吗?</p>
<p class="faq-a">所有操作都在你的浏览器本地完成,文档内容不会上传到任何服务器。</p>
</div>
<a href="./index.html" class="back-link">
<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2"><line x1="19" y1="12" x2="5" y2="12"/><polyline points="12 19 5 12 12 5"/></svg>
返回编辑器
</a>
</div>
</section>
<!-- Footer -->
<footer class="footer">
<div class="container">
<div class="footer-inner">
<div class="footer-logo">
<div class="logo-icon">
<svg viewBox="0 0 24 24" width="18" height="18" fill="currentColor">
<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6z"/>
<polyline points="14 2 14 8 20 8" fill="none" stroke="currentColor" stroke-width="1.5"/>
</svg>
</div>
<span class="logo-text">MarkNice</span>
</div>
<p class="footer-copy">开源工具 · Markdown/Word 转微信公众号格式及排版转换</p>
</div>
</div>
</footer>
<script>
// Dark mode toggle (same logic as main page)
const modeToggleBtn = document.getElementById('modeToggleBtn');
const sunIcon = document.getElementById('sunIcon');
const moonIcon = document.getElementById('moonIcon');
function systemMode() { return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'; }
function updateModeUi(mode) {
document.body.setAttribute('data-mode', mode);
sunIcon.style.display = mode === 'dark' ? 'none' : 'block';
moonIcon.style.display = mode === 'dark' ? 'block' : 'none';
}
const savedMode = localStorage.getItem('ui-mode');
if (savedMode) updateModeUi(savedMode); else updateModeUi(systemMode());
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', () => {
if (!localStorage.getItem('ui-mode')) updateModeUi(systemMode());
});
modeToggleBtn.addEventListener('click', () => {
const cur = document.body.getAttribute('data-mode') || systemMode();
const next = cur === 'light' ? 'dark' : 'light';
updateModeUi(next);
localStorage.setItem('ui-mode', next);
});
modeToggleBtn.addEventListener('contextmenu', (e) => {
e.preventDefault();
localStorage.removeItem('ui-mode');
updateModeUi(systemMode());
});
// Navbar scroll
const navbar = document.getElementById('navbar');
window.addEventListener('scroll', () => { navbar.classList.toggle('scrolled', window.scrollY > 10); });
</script>
</body>
</html>