-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathoptions.html
125 lines (124 loc) · 4.54 KB
/
options.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>单词库 | LexiBridge</title>
<link rel="stylesheet" href="theme.css" />
<link rel="stylesheet" href="global.css" />
<link rel="stylesheet" href="md-layout.css" />
<style>
.buttons {
display: flex;
margin-bottom: 1.5rem;
overflow: hidden;
gap: 8px;
align-items: center;
}
#search-input {
--md-outlined-text-field-top-space: 8px;
--md-outlined-text-field-bottom-space: 8px;
}
#clear-btn {
/* --md-sys-color-on-surface-variant: var(--md-sys-color-error); */
}
</style>
<script type="module" src="./bundle.js"></script>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined&display=swap">
</head>
<body>
<nav-drawer>
<top-app-bar slot="top-app-bar"></top-app-bar>
<md-list role="menubar" class="nav">
<md-list-item selected="selected" type="link" href="options.html">单词库</md-list-item>
<md-list-item type="link" href="blacklist.html">禁用域名</md-list-item>
</md-list>
<main slot="app-content">
<h2 class="mb-0">我的词库 (当前总数:<span id="total-words">0</span>)</h2>
<div class="buttons">
<md-outlined-text-field id="search-input" name="search" placeholder="搜索单词" type="search">
<md-icon slot="leading-icon">search</md-icon>
</md-outlined-text-field>
<md-filled-button id="search-btn">搜索</md-filled-button>
<div style="flex-grow:1;"></div>
<md-icon-button title="手动添加" aria-label="手动添加" id="open-add-modal">
<md-icon>add</md-icon>
</md-icon-button>
<md-icon-button title="导入" aria-label="导入" id="open-modal">
<md-icon>file_upload</md-icon>
</md-icon-button>
<md-icon-button title="导出" aria-label="导出" id="export-btn">
<md-icon>file_download</md-icon>
</md-icon-button>
<md-icon-button title="清空词库" aria-label="清空词库" id="clear-btn">
<md-icon>delete_forever</md-icon>
</md-icon-button>
</div>
<div class="table-container">
<div class="scroll-wrapper">
<table>
<thead>
<tr>
<th>单词</th>
<th>释义</th>
<th style="width:1px;"></th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</main>
</nav-drawer>
<template id="pagination">
<div class="pagination">
<md-outlined-button link class="previous-page">上一页</md-outlined-button>
<md-outlined-button class="current-page" disabled></md-outlined-button>
<md-outlined-button link class="next-page">下一页</md-outlined-button>
</div>
</template>
<template id="row">
<tr>
<td></td>
<td></td>
<td>
<md-text-button>删除</md-text-button>
</td>
</tr>
</template>
<md-dialog id="add-modal">
<p slot="headline">手动添加</p>
<div slot="content" style="width:560px;">
<div class="field">
<md-outlined-text-field label="单词" name="key" type="text"></md-outlined-text-field>
</div>
<div class="field">
<md-outlined-text-field label="释义" rows="3" name="value" type="textarea"></md-outlined-text-field>
</div>
</div>
<footer slot="actions">
<md-text-button disabled id="add-btn">添加</md-text-button>
<md-text-button id="cancel-add-btn">取消</md-text-button>
</footer>
</md-dialog>
<md-dialog id="import-modal">
<div slot="headline">从文件导入</div>
<div slot="content" method="dialog">
<input type="file" accept=".json" name="source" id="id-file" />
<p>示例文件:
<a download href="https://raw.githubusercontent.com/ChanMo/LexiBridge/main/words/CET4_edited.json">大学四级(4615)</a>,
<a download href="https://raw.githubusercontent.com/ChanMo/LexiBridge/main/words/CET6_edited.json">大学六级(2270)</a>,
<a download href="https://raw.githubusercontent.com/ChanMo/LexiBridge/main/words/GRE_8000_Words.json">考研(7744)</a>,
<a download href="https://raw.githubusercontent.com/ChanMo/LexiBridge/main/words/GRE_abridged.json">考研(精简)(4333)</a>
<a download href="https://raw.githubusercontent.com/ChanMo/LexiBridge/main/words/OALD8_abridged_edited.json">牛津高阶英语词典第八版(13653)</a>
</p>
</div>
<div slot="actions">
<md-text-button disabled id="import-btn">导入</md-text-button>
<md-text-button id="cancel-btn">取消</md-text-button>
</div>
</md-dialog>
<script src="options.js"></script>
</body>
</html>