master
宇天 2022-03-13 01:23:31 +08:00
parent 0168174012
commit 0691da3e0f
9 changed files with 84993 additions and 91 deletions

60
about.html Normal file
View File

@ -0,0 +1,60 @@
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<title>关于 - 在线五笔词库生成</title>
<meta name="keywords" content="在线五笔词库生成">
<meta name="description" content="在线五笔词库生成">
<link href="//unpkg.yutent.top/@bytedo/wcui/dist/css/reset-basic.css" rel="stylesheet">
<link rel="stylesheet" href="./css/index.css">
</head>
<body>
<div class="app flex column">
<header class="topbar flex ac noselect">
<div class="wrapper flex asc">
<a class="logo">五笔词库<span>86版</span></a>
<nav class="navs flex">
<a class="nav" href="./">首页</a>
<a class="nav">简码表</a>
<a class="nav">打字练习</a>
<a class="nav active">关于</a>
</nav>
</div>
</header>
<main class="main flex ac">
<div class="wrapper about">
<h2>更新日志</h2>
<dl class="logs">
<dt class="version">v0.1.0 - 2022.03.10</dt>
<dd>
<ol>
<li>完成基础字典生成</li>
<li>完成基本词组生成</li>
</ol>
</dd>
</dl>
</div>
</main>
<footer class="footer flex ac">
<div class="wrapper flex asc">
<span>&copy;2022, Yutent™.</span>
<span>Power by JavaScript</span>
</div>
</footer>
</div>
</body>
</html>

85
css/common.scss Normal file
View File

@ -0,0 +1,85 @@
body {
line-height: 1.5;
font-size: 14px;
color: var(--color-dark-1);
}
a {
color: inherit;
text-decoration: none;
}
wc-switch {
cursor: pointer;
}
.app {
width: 100%;
height: 100vh;
}
.flex {
display: flex;
&.column {
flex-direction: column;
}
&.ac {
justify-content: center;
}
&.alc {
align-items: center;
}
&.acc {
justify-content: center;
align-items: center;
}
&.asc {
justify-content: space-between;
align-items: center;
}
}
.wrapper {
width: 1024px;
}
.topbar {
width: 100%;
height: 64px;
background: #fff;
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.05);
.logo {
font-size: 24px;
color: var(--color-red-1);
span {
font-size: 14px;
}
}
.navs {
font-size: 16px;
.nav {
margin-left: 32px;
cursor: pointer;
transition: color 0.2s linear;
&.active,
&:hover {
text-decoration: underline;
color: var(--color-red-1);
}
}
}
}
.footer {
width: 100%;
height: 64px;
border-top: 1px solid var(--color-plain-2);
}

View File

@ -1 +1 @@
body{line-height:1.5;font-size:14px;color:var(--color-dark-1)}a{color:inherit;text-decoration:none}wc-switch{cursor:pointer}.app{width:100%;height:100vh}.flex{display:flex}.flex.column{flex-direction:column}.flex.ac{justify-content:center}.flex.alc{align-items:center}.flex.acc{justify-content:center;align-items:center}.flex.asc{justify-content:space-between;align-items:center}.wrapper{width:1024px}.topbar{width:100%;height:64px;background:#fff;box-shadow:0 6px 12px rgba(0,0,0,.05)}.topbar .logo{font-size:24px;color:var(--color-red-1)}.topbar .logo span{font-size:14px}.topbar .navs{font-size:16px}.topbar .navs .nav{margin-left:32px;cursor:pointer;transition:color .2s linear}.topbar .navs .nav.active,.topbar .navs .nav:hover{text-decoration:underline;color:var(--color-red-1)}.main{flex:1}.main .table-info{width:100%;height:64px}.main .search{width:100%}.main .search .field{margin-top:16px}.main .search .field.result{line-height:2;font-family:Menlo;word-wrap:break-word;white-space:pre-wrap}.main .search .field wc-input{flex:1}.footer{width:100%;height:64px;border-top:1px solid var(--color-plain-2)}@media screen and (max-width: 1024px){.topbar,.main{padding:0 16px}.footer .wrapper{flex-direction:column;align-items:center;justify-content:center}} body{line-height:1.5;font-size:14px;color:var(--color-dark-1)}a{color:inherit;text-decoration:none}wc-switch{cursor:pointer}.app{width:100%;height:100vh}.flex{display:flex}.flex.column{flex-direction:column}.flex.ac{justify-content:center}.flex.alc{align-items:center}.flex.acc{justify-content:center;align-items:center}.flex.asc{justify-content:space-between;align-items:center}.wrapper{width:1024px}.topbar{width:100%;height:64px;background:#fff;box-shadow:0 6px 12px rgba(0,0,0,.05)}.topbar .logo{font-size:24px;color:var(--color-red-1)}.topbar .logo span{font-size:14px}.topbar .navs{font-size:16px}.topbar .navs .nav{margin-left:32px;cursor:pointer;transition:color .2s linear}.topbar .navs .nav.active,.topbar .navs .nav:hover{text-decoration:underline;color:var(--color-red-1)}.footer{width:100%;height:64px;border-top:1px solid var(--color-plain-2)}.main{flex:1}.main .table-info{width:100%;height:64px}.main .table-info i{color:var(--color-red-1)}.main .search{width:100%}.main .search .field{margin-top:16px}.main .search .field.result{line-height:2;font-family:Menlo;word-wrap:break-word;white-space:pre-wrap}.main .search .field wc-input{flex:1}.main .about{padding:32px 16px}.main .about h2{font-size:24px}.main .about .logs .version{margin-top:32px;line-height:2;font-weight:bold;font-size:18px}.main .about .logs dd{color:var(--color-grey-3)}.main .about .logs ol{padding-left:2em;list-style:decimal}@media screen and (max-width: 1024px){.topbar,.main{padding:0 16px}.footer .wrapper{flex-direction:column;align-items:center;justify-content:center}}

View File

@ -1,82 +1,6 @@
body { @import './common.scss';
line-height: 1.5;
font-size: 14px;
color: var(--color-dark-1);
}
a {
color: inherit;
text-decoration: none;
}
wc-switch {
cursor: pointer;
}
.app {
width: 100%;
height: 100vh;
}
.flex {
display: flex;
&.column {
flex-direction: column;
}
&.ac {
justify-content: center;
}
&.alc {
align-items: center;
}
&.acc {
justify-content: center;
align-items: center;
}
&.asc {
justify-content: space-between;
align-items: center;
}
}
.wrapper {
width: 1024px;
}
.topbar {
width: 100%;
height: 64px;
background: #fff;
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.05);
.logo {
font-size: 24px;
color: var(--color-red-1);
span {
font-size: 14px;
}
}
.navs {
font-size: 16px;
.nav {
margin-left: 32px;
cursor: pointer;
transition: color 0.2s linear;
&.active,
&:hover {
text-decoration: underline;
color: var(--color-red-1);
}
}
}
}
.main { .main {
flex: 1; flex: 1;
@ -84,6 +8,8 @@ wc-switch {
.table-info { .table-info {
width: 100%; width: 100%;
height: 64px; height: 64px;
i {color:var(--color-red-1);}
} }
.search { .search {
@ -104,14 +30,39 @@ wc-switch {
} }
} }
} }
.about {
padding:32px 16px;
h2 {
font-size:24px;
} }
.footer { .logs {
width: 100%;
height: 64px; .version {
border-top: 1px solid var(--color-plain-2); margin-top:32px;
line-height:2;
font-weight:bold;
font-size:18px;
} }
dd {
color:var(--color-grey-3);
}
ol {
padding-left:2em;
list-style: decimal;
}
}
}
}
@media screen and (max-width: 1024px) { @media screen and (max-width: 1024px) {
.topbar, .topbar,
.main { .main {

10
data/dy.txt Normal file
View File

@ -0,0 +1,10 @@
𠂆 rtt
𠂇 dgt
𠂒 tfd
𠃌 nnll
𠏈 wqbm
𠦝 fjj
𡗗 dwi
𢦏 fae
𤇾 oopb
𦍌 ugf

84756
data/words.txt Normal file

File diff suppressed because it is too large Load Diff

View File

@ -21,7 +21,7 @@
<a class="nav active">首页</a> <a class="nav active">首页</a>
<a class="nav">简码表</a> <a class="nav">简码表</a>
<a class="nav">打字练习</a> <a class="nav">打字练习</a>
<a class="nav">关于</a> <a class="nav" href="./about.html">关于</a>
</nav> </nav>
</div> </div>
</header> </header>
@ -30,7 +30,7 @@
<div class="wrapper flex column"> <div class="wrapper flex column">
<header class="table-info flex alc"> <header class="table-info flex alc">
现有单字{{single}}个, 词组{{words}}个! 现有单字<i>{{single}}</i>个, 词组<i>{{words}}</i>, 异形字<i>{{dy}}</i>!
</header> </header>
<div class="search"> <div class="search">

View File

@ -18,14 +18,15 @@ import FIXED_18030 from './lib/18030.js'
const WB_CODE_NAME = { 1: '一级简码', 2: '二级简码', 3: '三级简码', 4: '四级简码' } const WB_CODE_NAME = { 1: '一级简码', 2: '二级简码', 3: '三级简码', 4: '四级简码' }
const WB_TABLE = new Enum() const WB_TABLE = new Enum()
const WB_TABLE_18030 = new Enum(FIXED_18030) const WB_TABLE_18030 = new Enum(FIXED_18030)
const WB_WORDS = new Enum()
Anot.hideProperty(WB_TABLE, 'length', 0) const WB_DY = new Enum()
Anot({ Anot({
$id: 'app', $id: 'app',
state: { state: {
single: 0, single: 0,
words: 0, words: 0,
dy: 0,
result: '', result: '',
filter: { filter: {
text: '', text: '',
@ -37,7 +38,6 @@ Anot({
.then(r => r.text()) .then(r => r.text())
.then(r => { .then(r => {
// //
r.split('\n').forEach(it => { r.split('\n').forEach(it => {
it = it it = it
.trim() .trim()
@ -53,6 +53,45 @@ Anot({
this.single = WB_TABLE.length this.single = WB_TABLE.length
}) })
fetch('./data/words.txt')
.then(r => r.text())
.then(r => {
//
r.split('\n').forEach(it => {
it = it
.trim()
.split(' ')
.map(_ => _.trim())
let k = it.shift()
if (k) {
WB_WORDS.add(k, it)
}
})
this.words = WB_WORDS.length
})
fetch('./data/dy.txt')
.then(r => r.text())
.then(r => {
//
r.split('\n').forEach(it => {
it = it
.trim()
.split(' ')
.map(_ => _.trim())
let k = it.shift()
if (k) {
WB_DY.add(k, it)
}
})
this.dy = WB_DY.length
})
}, },
methods: { methods: {
@ -118,9 +157,7 @@ Anot({
.map(t => `${WB_CODE_NAME[t.length]}: ${t.toUpperCase()}`) .map(t => `${WB_CODE_NAME[t.length]}: ${t.toUpperCase()}`)
.join('\t\t')}` .join('\t\t')}`
} else { } else {
return `${ return `${text[i]} 】👉\t无结果, 请检查你的输入是否正确, 如果确认无误, 可以反馈缺失字库。`
text[i]
} 👉\t无结果, 请检查你的输入是否正确, 如果确认无误, 可以反馈缺失字库`
} }
}) })
.join('\n') .join('\n')

3
package.json Normal file
View File

@ -0,0 +1,3 @@
{
"type": "module"
}