dsh-reading-inbox 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +211 -206
- package/README.md +211 -206
- package/VERIFY.md +133 -126
- package/index.js +80 -80
- package/package.json +83 -83
- package/src/annotations.js +45 -7
- package/src/config.js +44 -44
- package/src/fetch.js +173 -173
- package/src/markdown.js +309 -309
- package/src/routes.js +276 -254
- package/src/search.js +109 -0
- package/src/store.js +741 -647
- package/src/tools.js +441 -437
- package/web/app.js +912 -785
- package/web/index.html +83 -74
- package/web/style.css +814 -739
package/web/index.html
CHANGED
|
@@ -1,74 +1,83 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="zh-CN">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
-
<meta name="color-scheme" content="light dark">
|
|
7
|
-
<title>阅读收件箱</title>
|
|
8
|
-
<link rel="icon" href="./favicon.svg" type="image/svg+xml">
|
|
9
|
-
<link rel="stylesheet" href="./style.css">
|
|
10
|
-
</head>
|
|
11
|
-
<body>
|
|
12
|
-
<div class="app">
|
|
13
|
-
<header class="topbar">
|
|
14
|
-
<div class="brand">
|
|
15
|
-
<div class="brand-icon" aria-hidden="true">📥</div>
|
|
16
|
-
<div class="brand-copy">
|
|
17
|
-
<h1>阅读收件箱</h1>
|
|
18
|
-
<p id="stats">正在加载…</p>
|
|
19
|
-
</div>
|
|
20
|
-
</div>
|
|
21
|
-
<form id="clip-form" class="clip-form">
|
|
22
|
-
<div class="clip-inputs">
|
|
23
|
-
<input id="clip-url" type="text" inputmode="url" placeholder="粘贴网页链接,回车保存" autocomplete="off" required>
|
|
24
|
-
<input id="clip-tags" type="text" placeholder="标签,逗号分隔(可选)" autocomplete="off">
|
|
25
|
-
</div>
|
|
26
|
-
<button type="submit" class="primary" id="clip-submit">保存</button>
|
|
27
|
-
</form>
|
|
28
|
-
</header>
|
|
29
|
-
|
|
30
|
-
<main class="layout" id="layout">
|
|
31
|
-
<aside class="list-pane">
|
|
32
|
-
<div class="list-head">
|
|
33
|
-
<input id="search" type="search" placeholder="搜索标题、正文、标签…" autocomplete="off">
|
|
34
|
-
<div class="
|
|
35
|
-
<
|
|
36
|
-
<button type="button"
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
<
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
</div>
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="zh-CN">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
+
<meta name="color-scheme" content="light dark">
|
|
7
|
+
<title>阅读收件箱</title>
|
|
8
|
+
<link rel="icon" href="./favicon.svg" type="image/svg+xml">
|
|
9
|
+
<link rel="stylesheet" href="./style.css">
|
|
10
|
+
</head>
|
|
11
|
+
<body>
|
|
12
|
+
<div class="app">
|
|
13
|
+
<header class="topbar">
|
|
14
|
+
<div class="brand">
|
|
15
|
+
<div class="brand-icon" aria-hidden="true">📥</div>
|
|
16
|
+
<div class="brand-copy">
|
|
17
|
+
<h1>阅读收件箱</h1>
|
|
18
|
+
<p id="stats">正在加载…</p>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
<form id="clip-form" class="clip-form">
|
|
22
|
+
<div class="clip-inputs">
|
|
23
|
+
<input id="clip-url" type="text" inputmode="url" placeholder="粘贴网页链接,回车保存" autocomplete="off" required>
|
|
24
|
+
<input id="clip-tags" type="text" placeholder="标签,逗号分隔(可选)" autocomplete="off">
|
|
25
|
+
</div>
|
|
26
|
+
<button type="submit" class="primary" id="clip-submit">保存</button>
|
|
27
|
+
</form>
|
|
28
|
+
</header>
|
|
29
|
+
|
|
30
|
+
<main class="layout" id="layout">
|
|
31
|
+
<aside class="list-pane">
|
|
32
|
+
<div class="list-head">
|
|
33
|
+
<input id="search" type="search" placeholder="搜索标题、正文、标签… 支持 tag: is: site: after: has:highlight" autocomplete="off">
|
|
34
|
+
<div class="views-bar">
|
|
35
|
+
<div id="views" class="views" aria-label="保存的视图"></div>
|
|
36
|
+
<button type="button" id="save-view" class="view-save" title="保存当前搜索为视图">+ 视图</button>
|
|
37
|
+
</div>
|
|
38
|
+
<form id="view-form" class="view-form" hidden>
|
|
39
|
+
<input id="view-name" type="text" maxlength="60" placeholder="视图名称">
|
|
40
|
+
<button type="submit" class="button small primary">保存</button>
|
|
41
|
+
<button type="button" id="view-cancel" class="button small">取消</button>
|
|
42
|
+
</form>
|
|
43
|
+
<div class="tabs" id="tabs" role="tablist">
|
|
44
|
+
<button type="button" class="tab active" data-status="all" role="tab">全部 <span id="count-all">0</span></button>
|
|
45
|
+
<button type="button" class="tab" data-status="unread" role="tab">未读 <span id="count-unread">0</span></button>
|
|
46
|
+
<button type="button" class="tab" data-status="reading" role="tab">在读 <span id="count-reading">0</span></button>
|
|
47
|
+
<button type="button" class="tab" data-status="read" role="tab">已读 <span id="count-read">0</span></button>
|
|
48
|
+
<button type="button" class="tab" data-status="archived" role="tab">归档 <span id="count-archived">0</span></button>
|
|
49
|
+
</div>
|
|
50
|
+
<div id="tag-filter" class="tag-filter" hidden>
|
|
51
|
+
标签:<span id="tag-filter-name"></span>
|
|
52
|
+
<button type="button" id="tag-clear">清除</button>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
<div id="list" class="list" aria-live="polite"></div>
|
|
56
|
+
</aside>
|
|
57
|
+
|
|
58
|
+
<section id="detail" class="detail-pane">
|
|
59
|
+
<div class="empty-state">
|
|
60
|
+
<div class="empty-icon" aria-hidden="true">📄</div>
|
|
61
|
+
<h2>选择一篇文章</h2>
|
|
62
|
+
<p>从左侧打开,或把网页链接粘贴到上方保存。</p>
|
|
63
|
+
</div>
|
|
64
|
+
</section>
|
|
65
|
+
</main>
|
|
66
|
+
</div>
|
|
67
|
+
|
|
68
|
+
<div id="selection-toolbar" class="selection-toolbar" hidden>
|
|
69
|
+
<div class="selection-quote" id="selection-quote"></div>
|
|
70
|
+
<div class="selection-controls">
|
|
71
|
+
<button type="button" class="color-dot yellow active" data-color="yellow" aria-label="黄色高亮"></button>
|
|
72
|
+
<button type="button" class="color-dot green" data-color="green" aria-label="绿色高亮"></button>
|
|
73
|
+
<button type="button" class="color-dot blue" data-color="blue" aria-label="蓝色高亮"></button>
|
|
74
|
+
<button type="button" class="color-dot red" data-color="red" aria-label="红色高亮"></button>
|
|
75
|
+
<input id="selection-note" type="text" maxlength="2000" placeholder="批注(可选)">
|
|
76
|
+
<button type="button" class="button primary" data-action="save-highlight">保存高亮</button>
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
|
|
80
|
+
<div id="toast" class="toast" role="status" hidden></div>
|
|
81
|
+
<script src="./app.js" type="module"></script>
|
|
82
|
+
</body>
|
|
83
|
+
</html>
|