This repository was archived by the owner on Aug 9, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
283 lines (270 loc) · 13.5 KB
/
Copy pathindex.html
File metadata and controls
283 lines (270 loc) · 13.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
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<title>AI 有声小说</title>
<link rel="icon" href="data:,">
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/themes.css">
</head>
<body>
<div id="view-bookshelf" class="view active">
<header class="bookshelf-header">
<h1 class="app-title">AI 有声小说</h1>
<div class="header-actions">
<button class="icon-btn" id="btn-search" aria-label="搜索">⌕</button>
<button class="icon-btn" id="btn-menu" aria-label="菜单">⋯</button>
</div>
</header>
<div class="bookshelf-tabs">
<span class="tab active" data-tab="all">全部</span>
<span class="tab" data-tab="reading">正在阅读</span>
<span class="tab" data-tab="done">已完成</span>
</div>
<div class="bookshelf-grid" id="bookshelf-grid"></div>
<div class="bookshelf-actions">
<a class="web-link-btn" href="https://www.xbiquge.la" target="_blank" title="打开小说网站 - 点击选择来源">源</a>
<button class="fab-btn" id="btn-import" title="导入小说">+</button>
</div>
</div>
<div id="view-reader" class="view">
<header class="reader-header">
<button class="icon-btn" id="btn-back" aria-label="返回">‹</button>
<span class="header-status" id="header-status">已在书架</span>
<button class="icon-btn" id="btn-more" aria-label="更多">⋯</button>
</header>
<main class="reader-content" id="reader-content">
<h2 class="chapter-title" id="chapter-title"></h2>
<div class="chapter-text" id="chapter-text"></div>
</main>
<footer class="reader-footer">
<div class="progress-bar-container">
<span class="prev-link" id="prev-chapter">上一章</span>
<div class="progress-slider-wrap">
<input type="range" class="progress-slider" id="progress-slider" min="0" max="100" value="0">
</div>
<span class="next-link" id="next-chapter">下一章</span>
</div>
<nav class="reader-nav">
<button class="nav-btn" id="nav-toc" aria-label="目录">☰<span>目录</span></button>
<button class="nav-btn" id="nav-night" aria-label="夜间">☾<span>夜间</span></button>
<button class="nav-btn" id="nav-settings" aria-label="设置">文<span>设置</span></button>
<button class="nav-btn" id="nav-voices" aria-label="语音">听<span>语音</span></button>
<button class="nav-btn" id="nav-translate" aria-label="翻译">译<span>翻译</span></button>
</nav>
</footer>
<button class="float-listen-btn" id="float-listen-btn">听</button>
</div>
<div class="audio-bar" id="audio-bar">
<div class="audio-bar-inner">
<button class="audio-play-btn" id="audio-play-btn" aria-label="播放或暂停">
<span class="play-indicator"></span>
</button>
<button class="audio-pause-icon" id="audio-pause-icon" aria-label="暂停">Ⅱ</button>
<div class="audio-info" id="audio-info">暂停中</div>
<button class="audio-close" id="audio-close" aria-label="关闭">×</button>
</div>
</div>
<div class="modal-overlay sheet-overlay" id="settings-modal">
<div class="settings-panel">
<div class="settings-header">
<h3>阅读设置</h3>
<button class="icon-btn close-btn" id="settings-close">×</button>
</div>
<div class="settings-body">
<div class="setting-row">
<span class="setting-label">☼</span>
<input type="range" class="setting-slider" id="brightness-slider" min="30" max="120" value="100">
<span class="setting-label">☀</span>
</div>
<div class="setting-row">
<span class="setting-label">A-</span>
<input type="range" class="setting-slider" id="fontsize-slider" min="14" max="34" value="20">
<span class="setting-bubble" id="fontsize-display">20</span>
<span class="setting-label">A+</span>
<span class="setting-link">系统字体 ›</span>
</div>
<div class="setting-row setting-row-wrap">
<div class="color-palette" id="color-palette">
<button class="color-swatch" data-color="#F6F3EC" style="background:#F6F3EC"></button>
<button class="color-swatch" data-color="#E4D8B6" style="background:#E4D8B6"></button>
<button class="color-swatch" data-color="#C5CCAD" style="background:#C5CCAD"></button>
<button class="color-swatch" data-color="#D6D8D1" style="background:#D6D8D1"></button>
<button class="color-swatch" data-color="#D7C28A" style="background:#D7C28A"></button>
<button class="color-swatch custom-bg" data-color="#EEF7FA">个性背景 ›</button>
</div>
</div>
<div class="setting-row page-effects" id="page-effect-options">
<button class="effect-option" data-effect="push"><span class="effect-icon">▯</span>平移翻页</button>
<button class="effect-option" data-effect="cover"><span class="effect-icon">▱</span>覆盖翻页</button>
<button class="effect-option" data-effect="simulation"><span class="effect-icon">◜</span>仿真翻页</button>
<button class="effect-option active" data-effect="updown"><span class="effect-icon">▤</span>上下翻页</button>
</div>
<div style="border-top:1px solid var(--divider-color);margin:8px 0"></div>
<div style="font-size:13px;font-weight:600;color:var(--text-primary);margin-bottom:8px">⚙ GPU / TTS 加速</div>
<div class="setting-row" id="gpu-batch-row" style="display:none">
<span class="setting-label">批量合成</span>
<input type="range" class="setting-slider" id="gpu-max-batch" min="1" max="20" value="5">
<span class="setting-link" id="gpu-batch-display">5句</span>
</div>
<div class="setting-row" id="gpu-half-row" style="display:none">
<span class="setting-label">半精度 (省显存)</span>
<label style="flex:1;display:flex;justify-content:flex-end">
<input type="checkbox" id="gpu-half" checked style="width:18px;height:18px">
</label>
</div>
<div class="setting-row" id="gpu-cache-row" style="display:none">
<span class="setting-label">每批清理缓存</span>
<label style="flex:1;display:flex;justify-content:flex-end">
<input type="checkbox" id="gpu-clear-cache" checked style="width:18px;height:18px">
</label>
</div>
<div class="setting-row" id="gpu-vram-row" style="display:none">
<span class="setting-label">显存阈值</span>
<input type="range" class="setting-slider" id="gpu-max-vram" min="50" max="95" value="80">
<span class="setting-link" id="gpu-vram-display">80%</span>
</div>
</div>
<div class="settings-footer">
<button class="settings-foot-link" id="set-eye-care">◉ 护眼模式</button>
<button class="settings-foot-link" id="set-more">☷ 更多设置</button>
</div>
</div>
</div>
<div class="modal-overlay" id="voices-modal">
<div class="voices-panel">
<div class="voices-header">
<h3>选择音色</h3>
<button class="icon-btn close-btn" id="voices-close">×</button>
</div>
<div class="voices-grid" id="voices-grid"></div>
<div class="emotion-panel">
<div class="emotion-title">朗读情感</div>
<div class="emotion-grid" id="emotion-grid"></div>
</div>
<div class="voices-note" id="voices-note"></div>
</div>
</div>
<div class="modal-overlay" id="toc-modal">
<div class="toc-panel">
<div class="toc-header">
<h3>目录</h3>
<button class="icon-btn close-btn" id="toc-close">×</button>
</div>
<div class="toc-body" id="toc-body"></div>
</div>
</div>
<div class="modal-overlay" id="import-modal">
<div class="import-panel">
<div class="import-header">
<h3>导入小说</h3>
<button class="icon-btn close-btn" id="import-close">×</button>
</div>
<div class="import-body">
<div class="import-section">
<h4>上传 TXT 文件</h4>
<div class="upload-zone" id="upload-zone">
<p>点击或拖拽文件到此处</p>
<input type="file" id="file-input" accept=".txt" hidden>
</div>
<div class="upload-form" id="upload-form" style="display:none">
<input type="text" id="import-title" placeholder="小说名称" class="import-input">
<input type="text" id="import-author" placeholder="作者(可选)" class="import-input">
<button class="import-submit" id="import-submit">确认导入</button>
</div>
</div>
<div class="import-divider">或</div>
<div class="import-section">
<h4>从 URL 自动爬取</h4>
<select id="crawl-source" class="import-input" style="margin-bottom:4px">
<option value="auto">自动检测网站类型</option>
<option value="xbiquge">笔趣阁风格 (xbiquge.la / biquge.com 等)</option>
<option value="69shu">69书吧 (69shu.com)</option>
<option value="syosetu">Syosetu 日本小说 (syosetu.com)</option>
<option value="biqubao">笔趣阁宝 (biqubao.com)</option>
</select>
<input type="url" id="crawl-url" placeholder="小说目录页 URL(支持多家网站)" class="import-input">
<div style="font-size:12px;color:var(--text-secondary);margin:-4px 0 8px 4px">
支持:xbiquge.la、69shu.com、biqubao.com、syosetu.com
<a href="https://www.xbiquge.la" target="_blank" style="color:var(--text-link);margin-left:4px">打开 xbiquge.la ›</a>
</div>
<button class="import-submit" id="crawl-submit">开始爬取</button>
<div class="crawl-progress" id="crawl-progress" style="display:none">
<span id="crawl-progress-text">正在导入目录并预抓100章...</span>
</div>
</div>
</div>
</div>
</div>
<div class="modal-overlay" id="menu-modal">
<div class="menu-panel">
<button class="menu-item" id="menu-export">导出 TXT</button>
<button class="menu-item" id="menu-edit">编辑信息</button>
<button class="menu-item" id="menu-info">关于</button>
<button class="menu-item danger" id="menu-delete">删除小说</button>
</div>
</div>
<div class="modal-overlay sheet-overlay" id="translate-modal">
<div class="settings-panel">
<div class="settings-header">
<h3>实时翻译</h3>
<button class="icon-btn close-btn" id="translate-close">×</button>
</div>
<div class="settings-body">
<div class="setting-row">
<span class="setting-label">译为目标语言</span>
<select id="translate-target" class="import-input" style="flex:1;margin:0;width:auto">
<option value="zh-CN">简体中文</option>
<option value="zh-TW">繁体中文</option>
<option value="en">English</option>
<option value="ja">日本語</option>
<option value="ko">한국어</option>
<option value="fr">Français</option>
<option value="de">Deutsch</option>
</select>
</div>
<div id="translate-result" style="padding:12px 0;font-size:14px;line-height:1.8;max-height:300px;overflow-y:auto;color:var(--text-secondary)">
点击「翻译本章」按钮开始翻译
</div>
<button class="import-submit" id="translate-chapter-btn" style="margin-bottom:8px">翻译本章</button>
<label style="font-size:12px;color:var(--text-secondary);display:flex;align-items:center;gap:6px">
<input type="checkbox" id="translate-auto"> 切换章节时自动翻译
</label>
</div>
</div>
</div>
<div class="modal-overlay" id="edit-modal">
<div class="import-panel">
<div class="import-header">
<h3>编辑书籍信息</h3>
<button class="icon-btn close-btn" id="edit-close">×</button>
</div>
<div class="import-body">
<input type="text" id="edit-title" placeholder="书籍名称" class="import-input">
<input type="text" id="edit-author" placeholder="作者" class="import-input">
<div style="margin:12px 0">
<label style="font-size:13px;color:var(--text-secondary);display:block;margin-bottom:6px">封面颜色</label>
<div style="display:flex;gap:8px;flex-wrap:wrap" id="edit-colors">
<button class="color-swatch" data-color="#5A7A9A" style="background:#5A7A9A;width:36px;height:36px;border-radius:50%"></button>
<button class="color-swatch" data-color="#8B5E3C" style="background:#8B5E3C;width:36px;height:36px;border-radius:50%"></button>
<button class="color-swatch" data-color="#6B8E6B" style="background:#6B8E6B;width:36px;height:36px;border-radius:50%"></button>
<button class="color-swatch" data-color="#A0526D" style="background:#A0526D;width:36px;height:36px;border-radius:50%"></button>
<button class="color-swatch" data-color="#B8860B" style="background:#B8860B;width:36px;height:36px;border-radius:50%"></button>
<button class="color-swatch" data-color="#4A6FA5" style="background:#4A6FA5;width:36px;height:36px;border-radius:50%"></button>
<button class="color-swatch" data-color="#8B7D6B" style="background:#8B7D6B;width:36px;height:36px;border-radius:50%"></button>
<button class="color-swatch" data-color="#C4724A" style="background:#C4724A;width:36px;height:36px;border-radius:50%"></button>
</div>
</div>
<button class="import-submit" id="edit-submit">保存修改</button>
</div>
</div>
</div>
<script src="js/data.js"></script>
<script src="js/settings.js"></script>
<script src="js/toc.js"></script>
<script src="js/reader.js"></script>
<script src="js/audio.js"></script>
<script src="js/app.js"></script>
</body>
</html>