-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
108 lines (101 loc) · 4.96 KB
/
Copy pathindex.html
File metadata and controls
108 lines (101 loc) · 4.96 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
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="将 Git 变更文案一键整理为标题、问题和处理的统一格式。" />
<title>Git 文案格式助手</title>
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<a class="skip-link" href="#workspace">跳到文案编辑区</a>
<header class="page-header">
<div class="brand-mark" aria-hidden="true">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
<path d="M6 3.75h9l3 3V20.25H6z" />
<path d="M15 3.75v3h3M9 11h6M9 15h6" />
</svg>
</div>
<div>
<p class="eyebrow">LOCAL TEXT TOOL</p>
<h1>Git 文案格式助手</h1>
<p class="subtitle">粘贴原文,一键整理成清晰、统一、可直接提交的格式。</p>
</div>
</header>
<main id="workspace" class="workspace">
<section class="toolbar" aria-label="文案操作">
<div class="privacy-note">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M7 10V8a5 5 0 0 1 10 0v2" />
<rect x="4" y="10" width="16" height="10" rx="2" />
<path d="M12 14v2" />
</svg>
<span>仅在本机处理,文案不会上传</span>
</div>
<div class="toolbar-actions">
<button id="clear-button" class="button button-secondary" type="button">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M3 6h18M8 6V4h8v2M19 6l-1 14H6L5 6M10 10v6M14 10v6" />
</svg>
清空
</button>
<button id="format-button" class="button button-primary" type="button">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="m15 4 5 5L9 20H4v-5zM13 6l5 5M4 4h6M4 8h4" />
</svg>
立即格式化
</button>
</div>
</section>
<div class="editor-grid">
<section class="editor-panel" aria-labelledby="input-heading">
<div class="panel-header">
<div>
<span class="step-number" aria-hidden="true">01</span>
<h2 id="input-heading">粘贴原始文案</h2>
</div>
<span id="input-count" class="character-count">0 字</span>
</div>
<label class="sr-only" for="source-text">原始 Git 文案</label>
<textarea id="source-text" spellcheck="false" aria-describedby="input-help input-error" placeholder="在这里粘贴包含标题、问题和处理内容的文案……"></textarea>
<div class="panel-footer">
<p id="input-help" class="helper-text">支持内容中间断行,工具会自动合并同一条目。</p>
<p id="input-error" class="error-text" role="alert"></p>
</div>
</section>
<section class="editor-panel result-panel" aria-labelledby="output-heading">
<div class="panel-header">
<div>
<span class="step-number" aria-hidden="true">02</span>
<h2 id="output-heading">获取规范结果</h2>
</div>
<span id="result-status" class="status-badge">等待格式化</span>
</div>
<label class="sr-only" for="result-text">格式化后的 Git 文案</label>
<textarea id="result-text" readonly aria-describedby="output-help" placeholder="格式化后的结果会显示在这里。"></textarea>
<div class="panel-footer result-footer">
<p id="output-help" class="helper-text">标题和分区顶格,条目各占一行。</p>
<button id="copy-button" class="button button-copy" type="button" disabled>
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<rect x="8" y="8" width="12" height="12" rx="2" />
<path d="M16 8V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h2" />
</svg>
复制结果
</button>
</div>
</section>
</div>
<aside class="format-guide" aria-label="格式说明">
<span>固定格式</span>
<p>标题顶格</p>
<i aria-hidden="true"></i>
<p>分区前留空行</p>
<i aria-hidden="true"></i>
<p>每条内容独占一行</p>
</aside>
</main>
<div id="toast" class="toast" role="status" aria-live="polite" aria-atomic="true"></div>
<script src="formatter.js"></script>
<script src="app.js"></script>
</body>
</html>