-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
53 changed files
with
5,256,305 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
d3.csv("https://zhuyuhao.com/yuhao/beta/chaifen/宇浩輸入法全漢字拆分表.csv", function (data) { | ||
var dictionary = data; | ||
var button = d3.select("#button"); | ||
var form = d3.select("#form"); | ||
button.on("click", runEnter); | ||
form.on("submit", runEnter); | ||
|
||
// Defining the function | ||
function runEnter() { | ||
d3.select("tbody").html("") | ||
d3.event.preventDefault(); | ||
var inputValue = d3.select("#user-input").property("value"); | ||
var inputChars = [...inputValue]; | ||
for (var n = 0; n < inputChars.length; n++) { | ||
var filteredDictionary = | ||
dictionary.filter(dictionary => dictionary.char.includes(inputChars[n])); | ||
var output = _.sortBy(filteredDictionary, 'code') | ||
for (var i = 0; i < filteredDictionary.length; i++) { | ||
d3.select("tbody").insert("tr").html( | ||
"<td>" + (output[i]['char']) + "</td>" + | ||
"<td>" + (output[i]['division']) + "</td>" + | ||
"<td>" + (output[i]['code']) + "</td>" + | ||
"<td>" + (output[i]['quick_simp']) + "</td>" + | ||
"<td>" + (output[i]['region']) + "</td>" + | ||
// "<td>" + (output[i]['details']) + "</td>" + | ||
"<td>" + (output[i]['comments']) + "</td>") | ||
} | ||
} | ||
}; | ||
}); |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> | ||
|
||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
|
||
<title>宇浩输入法拆分查询系统·Beta</title> | ||
<style media="screen, print"> | ||
@font-face { | ||
font-family: 'YuhaoSongti'; | ||
src: url("https://zhuyuhao.com/yuhao/fonts/YuhaoSongti.ttf"); | ||
} | ||
|
||
body { | ||
font-family: "YuhaoSongti", serif; | ||
} | ||
</style> | ||
|
||
<!-- Font Awesome icons (free version)--> | ||
<script src="https://use.fontawesome.com/releases/v5.15.1/js/all.js" crossorigin="anonymous"></script> | ||
<!-- Google fonts--> | ||
<link href="https://fonts.googleapis.com/css?family=Varela+Round" rel="stylesheet" /> | ||
|
||
<script src="https://d3js.org/d3.v3.min.js"></script> | ||
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/lodash.js/0.10.0/lodash.min.js"></script> | ||
|
||
<link href="styles.css" rel="stylesheet"> | ||
</head> | ||
|
||
<body> | ||
<header class="mas"> | ||
<div class="container h-100 align-items-center"> | ||
<div class="row"> | ||
<div class="col-md-12"> | ||
<div class="mx-auto"> | ||
<br> | ||
<h1 class=>宇浩输入法</h1> | ||
<h2 class=>查询99000个汉字拆分</h2> | ||
<p> | ||
本拆分表包含至 CJK-I 区、部首区、兼容区全汉字拆分。字形标准取自: | ||
<br> The Unicode Standard, Version 15.0 (priority: GTHJKV) | ||
</p> | ||
<h6>(<a href="https://zhuyuhao.com/yuhao/">点击这里返回宇浩输入法官网首页</a>)</h6> | ||
<form id="form"> | ||
<div class="input-group input-group-newsletter"> | ||
<input class="form-control" id="user-input" placeholder="输入汉字或词语"> | ||
<br> | ||
<br> | ||
<br> | ||
<br> | ||
<div class="boton input-group-append" id="boton"> | ||
<button class="boton btn btn-secondary" type="button" id="button">查询编码 | ||
</button> | ||
</div> | ||
</div> | ||
</form> | ||
<table class="table" cellpadding="10"> | ||
<thead> | ||
<tr> | ||
<th scope="col">字符</th> | ||
<th scope="col">拆分</th> | ||
<th scope="col">全码</th> | ||
<th scope="col">简码</th> | ||
<th scope="col">字集</th> | ||
<th scope="col">注释</th> | ||
</tr> | ||
</thead> | ||
<tbody style="font-family: YuhaoSongti;"> | ||
<script src="app.js"></script> | ||
</tbody> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
</header> | ||
|
||
<!-- Optional JavaScript --> | ||
<!-- jQuery first, then Popper.js, then Bootstrap JS --> | ||
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" | ||
integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" | ||
crossorigin="anonymous"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" | ||
integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" | ||
crossorigin="anonymous"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" | ||
integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" | ||
crossorigin="anonymous"></script> | ||
</body> | ||
|
||
</html> |
Oops, something went wrong.