- Vite + Vue 3 + TS scaffold with hash router (bookshelf / reader) - core/: encoding detection (UTF-8 strict, GBK fallback, gb18030 last resort), paragraph chunker with original-text offsets, offset utils, IndexedDB wrapper - Reader: windowed paragraph rendering with estimated spacers (constant ~240 DOM paragraphs), font-size/line-height settings via CSS vars persisted to localStorage - Progress: character-offset based, debounced save + flush on back/unload, exact restore via binary search; shelf shows percent - 21 vitest unit tests for core modules
13 lines
301 B
HTML
13 lines
301 B
HTML
<!doctype html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>TXT 阅读器</title>
|
|
</head>
|
|
<body>
|
|
<div id="app"></div>
|
|
<script type="module" src="/src/main.ts"></script>
|
|
</body>
|
|
</html>
|