Skip to content

Commit a9553ff

Browse files
committed
add preview & bug fix
1 parent 1eec047 commit a9553ff

3 files changed

Lines changed: 20 additions & 2 deletions

File tree

src/config/_common.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export const k_left_ = ['(Left)', '(←)'];
9292
export const k_xf = ['[x!]'];
9393
export const k_power = ['[^]', '[■^□]', '[x^■]'];
9494
export const k_simp = ['[Simp]'];
95-
export const k_product = ['[Π]', '[Product]'];
95+
export const k_product = ['(Π)', '(Product)'];
9696
export const k_per = ['(%)'];
9797
export const k_per_ = ['[%]'];
9898
export const k_tg = ['[tg]'];

src/config/cw02.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ update(cw02, {
99
't': k_arccos,
1010
'y': k_arctan,
1111
'D': ['(|__)', '(∟)', '(⌙)'],
12+
'G': ['(Rép)', '(Rep)'],
13+
'H': ['[e^x]', '[e^■]'],
1214
'N': k_arcsin,
1315
'S': ['(|-)', '(├)'],
1416
'Z': k_arctg,
@@ -18,6 +20,6 @@ update(cw02, {
1820
';': k_sen,
1921
});
2022

21-
del(cw02, ['G', 'H', 'J', 'Y']);
23+
del(cw02, ['J', 'Y']);
2224

2325
export { cw02 };

src/index.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<meta charset="UTF-8">
44
<title>Key Font Helper</title>
55
<link rel="stylesheet" href="https://cwh.ca510.com/key-font/key_font.css">
6+
<link rel="stylesheet" href="https://cwh.ca510.com/1-level-font/table.css">
67
<div>
78
<input id="series-input" type="radio" name="type" value="series" checked>
89
<label for="series-input">Series Based</label>
@@ -21,11 +22,17 @@
2122
<div>
2223
<div id="result"></div>
2324
</div>
25+
<div>
26+
<div id="mapping"></div>
27+
</div>
2428
<script>
2529
const keyName = document.getElementById('keyName');
2630
const series = document.getElementById('series');
2731
const text = document.getElementById('text');
2832
const result = document.getElementById('result');
33+
const mapping = document.getElementById('mapping');
34+
35+
const ascii = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "!", "$", "\"", "'", "%", "&", "(", ")", "*", "+", ".", ",", "-", "/", "=", "^", "~", "#", "{", "<", ">", "?", "@", "[", "}", "]", ":", ";", "_", "`", "|", "\\"];
2936

3037
window.addEventListener('load', function () {
3138
kfh.config.forEach((kf) => {
@@ -34,6 +41,15 @@
3441
option.innerText = kf.fontName;
3542
keyName.appendChild(option);
3643
});
44+
mapping.innerHTML = `<div class="table-container"><table class="table-view"><thead>
45+
<tr>
46+
<th>ASCII</th>
47+
${kfh.config.map(v => `<th colspan="2">${v.fontName.replace('CASIO ', '')}</th>`).join('')}
48+
</tr></thead>
49+
<tbody>
50+
${ascii.map(a => `<tr><td>${a}</td>${kfh.config.map(v => `<td class="${v.keyName}">${a}</td><td>${v.keyMapping[a]?.join('<br>') ?? ''}</td>`).join('')}</tr>`).join('')}
51+
</tbody>
52+
</div>`;
3753
kfh.series.forEach((s) => {
3854
const option = document.createElement('option');
3955
option.value = s;

0 commit comments

Comments
 (0)