-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
448 lines (439 loc) · 30.5 KB
/
index.html
File metadata and controls
448 lines (439 loc) · 30.5 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
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>逐行粘贴 (Linebyline Paster) - Mac 免费效率工具</title>
<link rel="icon" href="./icon.png">
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.mac-window {
box-shadow: 0 20px 60px -10px rgba(0, 0, 0, 0.3);
}
.gradient-text {
background: linear-gradient(90deg, #3B82F6, #8B5CF6);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
/* 模拟 macOS 窗口控制点 */
.dot {
height: 12px;
width: 12px;
border-radius: 50%;
display: inline-block;
}
.dot-red { background-color: #ff5f56; }
.dot-yellow { background-color: #ffbd2e; }
.dot-green { background-color: #27c93f; }
</style>
</head>
<body class="bg-gray-50 text-slate-800 antialiased selection:bg-blue-100 selection:text-blue-900">
<!-- 导航栏 -->
<nav class="fixed w-full z-50 bg-white/80 backdrop-blur-md border-b border-slate-200">
<div class="max-w-6xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex justify-between items-center h-16">
<div class="flex items-center gap-2 cursor-pointer" onclick="window.scrollTo({top:0, behavior:'smooth'})">
<img src="./icon.png" alt="App Icon" class="w-9 h-9 rounded-lg shadow-sm object-cover">
<span class="font-bold text-xl tracking-tight" data-i18n="appName">逐行粘贴</span>
</div>
<div class="hidden md:flex space-x-8">
<a href="#features" class="text-slate-600 hover:text-blue-600 transition" data-i18n="navFeatures">功能</a>
<a href="#usage" class="text-slate-600 hover:text-blue-600 transition" data-i18n="navTutorial">使用教程</a>
<a href="#faq" class="text-slate-600 hover:text-blue-600 transition" data-i18n="navFaq">安装问题</a>
<a href="#support" class="text-slate-600 hover:text-pink-600 transition" data-i18n="navSupport">支持开发者</a>
</div>
<div class="flex items-center gap-4">
<!-- 语言切换按钮 -->
<button id="lang-toggle" class="text-slate-500 hover:text-slate-800 transition flex items-center gap-1 text-sm font-medium px-2 py-1 rounded hover:bg-slate-100">
<i class="fa-solid fa-globe"></i> <span id="lang-text">En</span>
</button>
<a href="#" onclick="window.scrollTo({top:0, behavior:'smooth'}); return false;" class="bg-slate-900 hover:bg-slate-800 text-white px-4 py-2 rounded-full text-sm font-medium transition shadow-lg shadow-slate-900/20" data-i18n="btnFreeDownload">
免费下载
</a>
</div>
</div>
</div>
</nav>
<!-- Hero 区域 -->
<section class="pt-32 pb-20 overflow-hidden">
<div class="max-w-6xl mx-auto px-4 sm:px-6 lg:px-8 text-center">
<div class="inline-block mb-4 px-3 py-1 rounded-full bg-blue-50 text-blue-600 text-xs font-semibold border border-blue-100">
<span data-i18n="badgeGemini">✨ Gemini 辅助开发 · 完全免费</span>
</div>
<h1 class="text-5xl md:text-6xl font-extrabold tracking-tight mb-6 text-slate-900">
<span data-i18n="heroTitle1">告别重复复制粘贴,</span><br>
<span class="gradient-text" data-i18n="heroTitle2">逐行输入</span> <span data-i18n="heroTitle3">从此简单。</span>
</h1>
<p class="text-xl text-slate-600 mb-10 max-w-2xl mx-auto leading-relaxed" data-i18n="heroDesc">
专为 Mac 用户设计的轻量级工具。复制多行文本,按快捷键逐行粘贴。<br>表单填写、代码录入、数据迁移的神器。
</p>
<div class="flex flex-col sm:flex-row justify-center gap-4 mb-6" id="download">
<a href="./LineByLinePaster.dmg" class="group relative inline-flex items-center justify-center px-8 py-4 text-lg font-bold text-white transition-all duration-200 bg-blue-600 font-pj rounded-xl focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-600 hover:bg-blue-700 shadow-lg shadow-blue-600/30">
<i class="fa-brands fa-apple mr-2 text-2xl"></i>
<span data-i18n="btnDownloadMac">下载 macOS 版本</span>
<span class="absolute -top-2 -right-2 bg-red-500 text-white text-xs px-2 py-0.5 rounded-full transform group-hover:scale-110 transition">v1.0</span>
</a>
<a href="#usage" class="inline-flex items-center justify-center px-8 py-4 text-lg font-bold text-slate-700 transition-all duration-200 bg-white border border-slate-200 rounded-xl focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-slate-200 hover:bg-slate-50 hover:border-slate-300">
<i class="fa-solid fa-play mr-2"></i>
<span data-i18n="btnViewDemo">查看演示</span>
</a>
</div>
<!-- 安装帮助提示 -->
<div class="mb-16">
<a href="#faq" class="inline-flex items-center gap-2 text-slate-500 hover:text-red-500 transition text-sm border-b border-slate-300 hover:border-red-400 pb-0.5">
<i class="fa-solid fa-circle-question"></i>
<span data-i18n="cantOpenHint">⚠️ 无法打开或提示损坏?点击查看解决办法</span>
</a>
</div>
<!-- 软件截图演示 -->
<div class="relative max-w-4xl mx-auto mt-8">
<div class="absolute inset-0 bg-gradient-to-r from-blue-500 to-purple-600 transform blur-2xl opacity-20 rounded-3xl -z-10"></div>
<div class="bg-slate-800 rounded-xl p-2 mac-window border border-slate-700">
<div class="bg-slate-900 rounded-lg overflow-hidden">
<!-- 模拟 Window Header -->
<div class="bg-slate-800 px-4 py-2 flex items-center gap-2 border-b border-slate-700">
<span class="dot dot-red"></span>
<span class="dot dot-yellow"></span>
<span class="dot dot-green"></span>
<div class="ml-4 text-xs text-slate-400 font-mono" data-i18n="demoAppName">逐行粘贴.app</div>
</div>
<!-- 模拟界面内容 -->
<div class="p-8 text-left font-mono text-sm md:text-base">
<div class="text-slate-400 mb-2" data-i18n="demoStep1">// 1. 复制以下多行内容</div>
<div class="bg-slate-800/50 p-4 rounded border border-slate-700 text-blue-300 mb-6">
<span data-i18n="demoLine1">第一行数据:用户ID 1001</span><br>
<span data-i18n="demoLine2">第二行数据:用户名 Alice</span><br>
<span data-i18n="demoLine3">第三行数据:邮箱 alice@example.com</span>
</div>
<div class="text-slate-400 mb-2" data-i18n="demoStep2">// 2. 在目标输入框按下快捷键 (如 Cmd+Shift+V)</div>
<div class="space-y-3">
<div class="flex items-center gap-3">
<span class="text-slate-500 w-20" data-i18n="demoInput1">输入框 1:</span>
<div class="typing-effect bg-white text-slate-900 px-3 py-1 rounded w-full max-w-xs h-8 flex items-center">
<span data-i18n="demoLine1Typed">第一行数据:用户ID 1001</span>
</div>
</div>
<div class="flex items-center gap-3">
<span class="text-slate-500 w-20" data-i18n="demoInput2">输入框 2:</span>
<div class="typing-effect bg-white text-slate-900 px-3 py-1 rounded w-full max-w-xs h-8 flex items-center border-2 border-blue-500 shadow-[0_0_10px_rgba(59,130,246,0.5)]">
<span class="animate-pulse">|</span>
</div>
<span class="text-green-500 text-xs"><i class="fa-solid fa-check"></i> <span data-i18n="demoAutoPaste">粘贴下一行</span></span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- 特性介绍 -->
<section id="features" class="py-20 bg-white">
<div class="max-w-6xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="text-center mb-16">
<h2 class="text-3xl font-bold text-slate-900" data-i18n="featTitle">为什么你需要它?</h2>
<p class="mt-4 text-lg text-slate-600" data-i18n="featSub">简单到极致的功能,解决最烦人的重复劳动</p>
</div>
<div class="grid grid-cols-1 md:grid-cols-3 gap-8">
<div class="p-6 bg-slate-50 rounded-2xl border border-slate-100 hover:shadow-lg transition">
<div class="w-12 h-12 bg-blue-100 rounded-xl flex items-center justify-center text-blue-600 text-xl mb-4">
<i class="fa-solid fa-list-ol"></i>
</div>
<h3 class="text-xl font-bold mb-2 text-slate-900" data-i18n="feat1Title">顺序粘贴</h3>
<p class="text-slate-600" data-i18n="feat1Desc">无论你复制了多少行文本,软件会自动将其分割,每次按下快捷键只粘贴其中的一行,并准备下一行。</p>
</div>
<div class="p-6 bg-slate-50 rounded-2xl border border-slate-100 hover:shadow-lg transition">
<div class="w-12 h-12 bg-purple-100 rounded-xl flex items-center justify-center text-purple-600 text-xl mb-4">
<i class="fa-solid fa-bolt"></i>
</div>
<h3 class="text-xl font-bold mb-2 text-slate-900" data-i18n="feat2Title">全局快捷键</h3>
<p class="text-slate-600" data-i18n="feat2Desc">支持自定义全局快捷键,无论你在浏览器、Excel 还是终端中,都能随时唤起粘贴功能。</p>
</div>
<div class="p-6 bg-slate-50 rounded-2xl border border-slate-100 hover:shadow-lg transition">
<div class="w-12 h-12 bg-green-100 rounded-xl flex items-center justify-center text-green-600 text-xl mb-4">
<i class="fa-solid fa-lock"></i>
</div>
<h3 class="text-xl font-bold mb-2 text-slate-900" data-i18n="feat3Title">安全且本地</h3>
<p class="text-slate-600" data-i18n="feat3Desc">所有剪贴板数据仅在本地内存中处理,不上传任何服务器。代码由 Gemini 协助生成,透明可控。</p>
</div>
</div>
</div>
</section>
<!-- 使用教程 -->
<section id="usage" class="py-20 bg-slate-50 border-t border-slate-200">
<div class="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8">
<h2 class="text-3xl font-bold text-slate-900 mb-8 text-center" data-i18n="usageTitle">简单逻辑,上手即用</h2>
<div class="space-y-8">
<div class="flex gap-6">
<div class="flex-none w-10 h-10 rounded-full bg-slate-900 text-white flex items-center justify-center font-bold text-lg">1</div>
<div>
<h3 class="text-xl font-bold text-slate-900 mb-2" data-i18n="usageStep1Title">设置快捷键</h3>
<p class="text-slate-600" data-i18n="usageStep1Desc">打开软件后点击顶部状态栏图标,在菜单中选择「设置快捷键」。</p>
</div>
</div>
<div class="flex gap-6">
<div class="flex-none w-10 h-10 rounded-full bg-slate-900 text-white flex items-center justify-center font-bold text-lg">2</div>
<div>
<h3 class="text-xl font-bold text-slate-900 mb-2" data-i18n="usageStep2Title">复制内容</h3>
<p class="text-slate-600" data-i18n="usageStep2Desc">像平时一样,选中包含多行文本的内容(Excel 列或文本段落),按下 <kbd class="px-2 py-1 bg-white border border-slate-300 rounded text-sm">Cmd + C</kbd> 复制。</p>
</div>
</div>
<div class="flex gap-6">
<div class="flex-none w-10 h-10 rounded-full bg-slate-900 text-white flex items-center justify-center font-bold text-lg">3</div>
<div>
<h3 class="text-xl font-bold text-slate-900 mb-2" data-i18n="usageStep3Title">逐行粘贴</h3>
<p class="text-slate-600" data-i18n="usageStep3Desc">将光标放置到目标输入框中。按下刚才设置的快捷键,每次会粘贴一行内容。所有行粘贴完毕后,复制新的内容继续粘贴。</p>
</div>
</div>
</div>
</div>
</section>
<!-- FAQ / 安装问题解决 -->
<section id="faq" class="py-16 bg-orange-50 border-t border-orange-100">
<div class="max-w-3xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex items-start gap-4">
<div class="flex-none text-3xl text-orange-500 mt-1">
<i class="fa-solid fa-triangle-exclamation"></i>
</div>
<div class="w-full">
<h2 class="text-2xl font-bold text-slate-900 mb-4" data-i18n="faqTitle">安装时提示“无法打开”或“文件已损坏”?</h2>
<p class="text-slate-700 mb-4 leading-relaxed" data-i18n="faqDesc">
这是因为软件没有购买苹果的付费开发者证书,macOS 会默认拦截。这完全正常,软件是安全的。您可能无法在“系统设置”中找到“仍要打开”的按钮,请直接使用以下方法。
</p>
<!-- 方法 1 -->
<div class="bg-white p-6 rounded-xl shadow-sm border border-orange-100 mb-6">
<h3 class="font-bold text-slate-900 mb-3" data-i18n="faqSolutionTitle">✅ 方法一(推荐):右键打开</h3>
<ol class="list-decimal list-inside space-y-2 text-slate-600 text-sm md:text-base">
<li data-i18n="faqStep1">不要直接双击图标。</li>
<li data-i18n="faqStep2">对着软件图标点击 <strong>鼠标右键</strong>(或按住 Control 键点击)。</li>
<li data-i18n="faqStep3">在弹出的菜单中选择 <strong>“打开”</strong>。</li>
<li data-i18n="faqStep4">在随后的弹窗中再次点击 <strong>“打开”</strong> 即可。</li>
</ol>
</div>
<!-- 方法 2 -->
<div class="bg-white p-6 rounded-xl shadow-sm border border-orange-100">
<h3 class="font-bold text-slate-900 mb-3" data-i18n="faqSolution2Title">🛠 方法二:终端修复</h3>
<p class="text-sm text-slate-600 mb-3" data-i18n="faqSolution2Desc">如果方法一依然提示文件损坏,请将左侧软件图标拖入右侧应用程序文件夹,然后尝试此命令:</p>
<div class="mt-3 bg-slate-900 text-slate-300 p-3 rounded-md font-mono text-xs md:text-sm overflow-x-auto select-all border border-slate-700 shadow-inner">
xattr -cr /Applications/LineByLinePaster.app
</div>
</div>
</div>
</div>
</div>
</section>
<!-- 支持开发区域 -->
<section id="support" class="py-16 bg-white border-t border-slate-200">
<div class="max-w-3xl mx-auto px-4 sm:px-6 lg:px-8 text-center">
<div class="inline-flex items-center justify-center w-12 h-12 rounded-full bg-pink-100 text-pink-500 mb-4">
<i class="fa-solid fa-heart"></i>
</div>
<h2 class="text-2xl font-bold text-slate-900 mb-4" data-i18n="supportTitle">觉得好用?支持开发者</h2>
<p class="text-slate-600 mb-8 max-w-lg mx-auto" data-i18n="supportDesc">
Linebyline Paster 是一个完全免费的工具。如果你喜欢它,可以通过 Ko-fi 或爱发电请我喝杯奶茶,这将鼓励我继续开发更多好用的工具。
</p>
<div class="flex flex-wrap justify-center gap-4">
<!-- Ko-fi 按钮 -->
<a href="https://ko-fi.com/chilllime" target="_blank" class="inline-flex items-center px-6 py-3 bg-[#FF5E5B] hover:bg-[#FF403C] text-white font-bold rounded-full transition transform hover:scale-105 shadow-lg shadow-pink-500/30">
<i class="fa-solid fa-mug-hot mr-2"></i>
<span data-i18n="btnKofi">在 Ko-fi 请我喝奶茶</span>
</a>
<!-- 爱发电 按钮 -->
<a href="https://afdian.com/a/chilllime" target="_blank" class="inline-flex items-center px-6 py-3 bg-[#946ce6] hover:bg-[#805ad5] text-white font-bold rounded-full transition transform hover:scale-105 shadow-lg shadow-purple-500/30">
<i class="fa-solid fa-bolt mr-2"></i>
<span data-i18n="btnAfdian">在爱发电支持我</span>
</a>
</div>
</div>
</section>
<!-- Footer -->
<footer class="bg-slate-900 text-slate-400 py-12">
<div class="max-w-6xl mx-auto px-4 sm:px-6 lg:px-8 flex flex-col md:flex-row justify-between items-start md:items-center">
<div class="mb-6 md:mb-0">
<div class="flex items-center gap-2 text-white mb-2">
<i class="fa-solid fa-paste"></i>
<span class="font-bold text-lg" data-i18n="appName">逐行粘贴</span>
</div>
<p class="text-sm mb-2" data-i18n="footerDesc">由 Gemini 协助构建的效率小工具。</p>
<p class="text-xs text-slate-600" data-i18n="footerCopyright">© 2025 上海闲柠文化发展有限公司</p>
</div>
<div class="flex flex-col items-start md:items-end gap-2 text-sm">
<div class="flex items-center gap-4 mb-1">
<span class="text-slate-500 font-bold" data-i18n="footerFeedback">反馈问题</span>
</div>
<a href="mailto:chilllemon29@gmail.com" class="hover:text-white transition flex items-center gap-2">
<i class="fa-solid fa-envelope"></i> chilllemon29@gmail.com
</a>
<a href="https://github.com/chill-lime/LineByLinePaster/issues" target="_blank" class="hover:text-white transition flex items-center gap-2">
<i class="fa-brands fa-github"></i> <span data-i18n="footerGithub">提交 GitHub Issue</span>
</a>
</div>
</div>
</footer>
<script>
// 平滑滚动
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function (e) {
e.preventDefault();
const targetId = this.getAttribute('href');
if (targetId === '#') return;
const targetElement = document.querySelector(targetId);
if (targetElement) {
targetElement.scrollIntoView({
behavior: 'smooth'
});
}
});
});
// 国际化配置
const i18nData = {
zh: {
appName: "逐行粘贴",
navFeatures: "功能",
navTutorial: "使用教程",
navFaq: "安装问题",
navSupport: "支持开发者",
navDownload: "下载",
btnFreeDownload: "免费下载",
badgeGemini: "✨ Gemini 辅助开发 · 完全免费",
heroTitle1: "告别重复复制粘贴,",
heroTitle2: "逐行输入",
heroTitle3: "从此简单。",
heroDesc: "专为 Mac 用户设计的轻量级工具。复制多行文本,按快捷键逐行粘贴。<br>表单填写、代码录入、数据迁移的神器。",
btnDownloadMac: "下载 macOS 版本",
btnViewDemo: "查看演示",
cantOpenHint: "⚠️ 无法打开或提示损坏?点击查看解决办法",
demoAppName: "逐行粘贴.app",
demoStep1: "// 1. 复制以下多行内容",
demoLine1: "第一行数据:用户ID 1001",
demoLine2: "第二行数据:用户名 Alice",
demoLine3: "第三行数据:邮箱 alice@example.com",
demoStep2: "// 2. 在目标输入框按下快捷键 (如 Cmd+Shift+V)",
demoInput1: "输入框 1:",
demoLine1Typed: "第一行数据:用户ID 1001",
demoInput2: "输入框 2:",
demoAutoPaste: "粘贴下一行",
featTitle: "为什么你需要它?",
featSub: "简单到极致的功能,解决最烦人的重复劳动",
feat1Title: "顺序粘贴",
feat1Desc: "无论你复制了多少行文本,软件会自动将其分割,每次按下快捷键只粘贴其中的一行,并准备下一行。",
feat2Title: "全局快捷键",
feat2Desc: "支持自定义全局快捷键,无论你在浏览器、Excel 还是终端中,都能随时唤起粘贴功能。",
feat3Title: "安全且本地",
feat3Desc: "所有剪贴板数据仅在本地内存中处理,不上传任何服务器。代码由 Gemini 协助生成,透明可控。",
usageTitle: "简单逻辑,上手即用",
usageStep1Title: "设置快捷键",
usageStep1Desc: "打开软件后点击顶部状态栏图标,在菜单中选择「设置快捷键」。",
usageStep2Title: "复制内容",
usageStep2Desc: "像平时一样,选中包含多行文本的内容(Excel 列或文本段落),按下 Cmd + C 复制。",
usageStep3Title: "逐行粘贴",
usageStep3Desc: "将光标放置到目标输入框中。按下刚才设置的快捷键,每次会粘贴一行内容。所有行粘贴完毕后,复制新的内容继续粘贴。",
faqTitle: "安装时提示“无法打开”或“文件已损坏”?",
faqDesc: "这是因为软件没有购买苹果的付费开发者证书,macOS 会默认拦截。这完全正常,软件是安全的。您可能无法在“系统设置”中找到“仍要打开”的按钮,请直接使用以下方法。",
faqSolutionTitle: "✅ 方法一(推荐):右键打开",
faqStep1: "不要直接双击图标。",
faqStep2: "对着软件图标点击 <strong>鼠标右键</strong>(或按住 Control 键点击)。",
faqStep3: "在弹出的菜单中选择 <strong>“打开”</strong>。",
faqStep4: "在随后的弹窗中再次点击 <strong>“打开”</strong> 即可。",
faqSolution2Title: "🛠 方法二:终端修复",
faqSolution2Desc: "如果方法一依然提示文件损坏,请将左侧软件图标拖入右侧应用程序文件夹,然后尝试此命令:",
faq2Step1: "将左侧的软件图标拖入右侧的“应用程序”文件夹。",
faq2Step2: "打开“终端 (Terminal)”应用。",
faq2Step3: "复制下方代码粘贴并回车:",
supportTitle: "觉得好用?支持开发者",
supportDesc: "Linebyline Paster 是一个完全免费的工具。如果你喜欢它,可以通过 Ko-fi 或爱发电请我喝杯奶茶,这将鼓励我继续开发更多好用的工具。",
btnKofi: "在 Ko-fi 请我喝奶茶",
btnAfdian: "在爱发电支持我",
footerDesc: "由 Gemini 协助构建的效率小工具。",
footerCopyright: "© 2025 上海闲柠文化发展有限公司",
footerFeedback: "反馈问题",
footerGithub: "提交 GitHub Issue"
},
en: {
appName: "Linebyline Paster",
navFeatures: "Features",
navTutorial: "Tutorial",
navFaq: "Install Help",
navSupport: "Support",
navDownload: "Download",
btnFreeDownload: "Free Download",
badgeGemini: "✨ Built with Gemini · 100% Free",
heroTitle1: "Stop Copy-Pasting Repeatedly.",
heroTitle2: "Line-by-Line Input",
heroTitle3: "Made Easy.",
heroDesc: "A lightweight tool for Mac. Copy multi-line text, then paste line by line with a shortcut.<br>Perfect for forms, coding, and data entry.",
btnDownloadMac: "Download for macOS",
btnViewDemo: "View Demo",
cantOpenHint: "⚠️ Cannot open app? Click here for help",
demoAppName: "LineByLinePaster.app",
demoStep1: "// 1. Copy multi-line content",
demoLine1: "Line 1: User ID 1001",
demoLine2: "Line 2: Username Alice",
demoLine3: "Line 3: Email alice@example.com",
demoStep2: "// 2. Press shortcut (e.g. Cmd+Shift+V)",
demoInput1: "Input 1:",
demoLine1Typed: "Line 1: User ID 1001",
demoInput2: "Input 2:",
demoAutoPaste: "Paste next line",
featTitle: "Why do you need it?",
featSub: "Simple functionality to solve the most annoying repetitive tasks.",
feat1Title: "Sequential Paste",
feat1Desc: "No matter how many lines you copy, the app splits them. Each shortcut press pastes just one line and prepares the next.",
feat2Title: "Global Shortcuts",
feat2Desc: "Customizable global shortcuts work everywhere: Browsers, Excel, Terminal, or any other app.",
feat3Title: "Secure & Local",
feat3Desc: "Clipboard data stays in local memory. No server uploads. Code generated by Gemini, transparent and safe.",
usageTitle: "Simple Workflow",
usageStep1Title: "Set Shortcut",
usageStep1Desc: "Open the app, click the status bar icon, and select 'Set Shortcut' from the menu.",
usageStep2Title: "Copy Content",
usageStep2Desc: "Select text containing multiple lines (like an Excel column or paragraph) and press Cmd + C as usual.",
usageStep3Title: "Paste Line by Line",
usageStep3Desc: "Place cursor in the target box. Press your set shortcut to paste one line. Repeat until finished. Copy new content to continue pasting.",
faqTitle: "Cannot open app / \"App is damaged\"?",
faqDesc: "Since this app is not signed with a paid Apple Developer Certificate, macOS blocks it. You might not see the \"Open Anyway\" button in System Settings. This is normal. Please use the methods below.",
faqSolutionTitle: "✅ Method 1 (Recommended): Right-click Open",
faqStep1: "Do NOT double-click the icon.",
faqStep2: "<strong>Right-click</strong> (or Control-click) the app icon.",
faqStep3: "Select <strong>Open</strong> from the menu.",
faqStep4: "Click <strong>Open</strong> again in the dialog box.",
faqSolution2Title: "🛠 Method 2: Terminal Fix",
faqSolution2Desc: "If Method 1 fails and it says 'Damaged', drag the app to the Applications folder, then try this:",
faq2Step1: "Drag the app icon into the 'Applications' folder shortcut.",
faq2Step2: "Open the 'Terminal' app.",
faq2Step3: "Paste the code below and press Enter:",
supportTitle: "Enjoying the app?",
supportDesc: "Linebyline Paster is a completely free tool. If you find it useful, you can support my work on Ko-fi or Afdian. This encourages me to build more useful tools.",
btnKofi: "Buy me a milk tea on Ko-fi",
btnAfdian: "Support on Afdian",
footerDesc: "A productivity tool built with the help of Gemini.",
footerCopyright: "© 2025 Shanghai ChillLime Culture Development Co., Ltd.",
footerFeedback: "Feedback",
footerGithub: "Submit GitHub Issue"
}
};
let currentLang = 'zh';
document.getElementById('lang-toggle').addEventListener('click', function() {
currentLang = currentLang === 'zh' ? 'en' : 'zh';
updateLanguage();
});
function updateLanguage() {
// 更新按钮文本
document.getElementById('lang-text').textContent = currentLang === 'zh' ? 'En' : '中文';
// 更新所有带 data-i18n 属性的元素
document.querySelectorAll('[data-i18n]').forEach(el => {
const key = el.getAttribute('data-i18n');
if (i18nData[currentLang][key]) {
el.innerHTML = i18nData[currentLang][key]; // 使用 innerHTML 以支持简单的 HTML 标签
}
});
// 更新 HTML lang 属性
document.documentElement.lang = currentLang === 'zh' ? 'zh-CN' : 'en';
}
</script>
</body>
</html>