-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
232 lines (224 loc) · 21.4 KB
/
index.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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Rime西米</title>
<link rel="stylesheet" type="text/css" href="css/style.css" />
<script src="jscolor/jscolor.js"></script>
<script src="js/script.js"></script>
<script type="text/javascript" src="yaml/yaml.js"></script>
<!--
<style>
#canvas {
background-color: white;
background-image: url("./bg.png");
background-size: auto;
background-repeat: repeat;
}
</style>
-->
</head>
<body>
<h1><span>RIME</span><ruby>西<rt>See</rt></ruby><ruby>米<rt>Me</rt></ruby></h1>
<table>
<tr>
<td id="effect">
<div id="box">
<div id="select">
<span id="text">小狼毫</span>
<span id="hilited">pei se</span> <span id="cursor">‸</span>
<span id="prevpage"><</span> 
<span id="nextpage">></span>
</div>
<div id="display">
<div class="_hilited_candidate_back" id="n1"><span id="_hilited_mark">|</span><span class='label' id="label1">1.</span><span class='word' id="word1">配色</span><span class='code' id="code1">(pei se)</span></div>
<div class="_candidate_back" id="n2"> <span class='_hilited_marks'>|</span> <span class="_label" id="label2">2.</span><span class="word" id="word2">陪</span><span class='code' id="code2">(pei)</span></div>
<div class="_candidate_back" id="n3"> <span class='_hilited_marks'>|</span> <span class="_label" id="label3">3.</span><span class="word" id="word3">配</span><span class='code' id="code3">(pei)</span></div>
<div class="_candidate_back" id="n4"> <span class='_hilited_marks'>|</span> <span class="_label" id="label4">4.</span><span class="word" id="word4">賠</span><span class='code' id="code4">(pei)</span></div>
<div class="_candidate_back" id="n5"> <span class='_hilited_marks'>|</span> <span class="_label" id="label5">5.</span><span class="word" id="word5">培</span><span class='code' id="code5">(pei)</span></div>
<div class="_candidate_back" id="n6"> <span class='_hilited_marks'>|</span> <span class="_label" id="label6">6.</span><span class="word" id="word6">佩</span><span class='code' id="code6">(pei)</span></div>
<div class="_candidate_back" id="n7"> <span class='_hilited_marks'>|</span> <span class="_label" id="label7">7.</span><span class="word" id="word7">裴</span><span class='code' id="code7">(pei)</span></div>
<div class="_candidate_back" id="n8"> <span class='_hilited_marks'>|</span> <span class="_label" id="label8">8.</span><span class="word" id="word8">斐</span><span class='code' id="code8">(pei)</span></div>
<div class="_candidate_back" id="n9"> <span class='_hilited_marks'>|</span> <span class="_label" id="label9">9.</span><span class="word" id="word9">呸</span><span class='code' id="code9">(pei)</span></div>
<div class="_candidate_back" id="n10"><span class='_hilited_marks'>|</span> <span class="_label" id="label10">0.</span><span class="word" id="word10">胚</span><span class='code' id="code10">(pei)</span></div>
</div>
</div>
</td>
<td id="style_setting">
<form>
<fieldset>
<legend>基本信息</legend>
<span>代<span class="em"></span>號</span><input type="text" name="schema" value="example" onchange="writeIn(this.name,this.value);"><br />
<span>名<span class="em"></span>稱</span><input type="text" name="name" value="名字" onchange="writeIn(this.name,this.value);"><br />
<span>作<span class="em"></span>者</span><input type="text" name="author" value="作者" onchange="writeIn(this.name,this.value);"><br />
</fieldset>
<fieldset>
<legend>其他設置</legend>
<span>候選數</span> <input type="range" id="_page_size" value="5" min="1" max="10" name="number" onchange="changeNumber(this.value)"><span>    </span><span id="page_size_value"></span><br />
</fieldset>
<!--
<fieldset>
<legend>顯示背景</legend>
<span>背景色</span><input type="text" id="background" name="body" value="F9F9F9" onchange="document.getElementById('effect').style.backgroundColor = '#'+this.color">
</fieldset>
-->
<fieldset id="yamlLoader">
<input title="单组配色文件" type="file" style="background-color: #f0f0f0; width: '60px';" id="fileInput" onchange="InputFileChange(this.files)">
</fieldset>
<fieldset>
<legend>weasel style设置</legend>
<span title="font_face">候选字体</span><input type="text" id="font_face" value="Microsoft Yahei UI" onchange=""><br>
<span title="label_font_face">标签字体</span><input type="text" id="label_font_face" value="Microsoft Yahei UI" onchange=""><br>
<span title="comment_font_face">注解字体</span><input type="text" id="comment_font_face" value="Microsoft Yahei UI" onchange=""><br>
<span title="font_point">候选字号</span><input type="number" id="font_point" value=14 onchange=""><br>
<span title="label_font_point">标签字号</span><input type="number" id="label_font_point" value=14 onchange=""><br>
<span title="comment_font_point">注解字号</span><input type="number" id="comment_font_point" value=14 onchange=""><br>
<span title="horizontal">水平布局</span><input type="checkbox" id="horizontal" checked=true onchange=""><br>
<span title="inline_preedit">行内编辑</span><input type="checkbox" id="inline_preedit" checked=true onchange=""><br>
<span title="border_width">边框大小</span><input type="number" id="border_width" value=1 onchange=""><br>
<span title="margin_x">x  轴边距</span><input type="number" id="margin_x" value=10 onchange=""><br>
<span title="margin_y">y  轴边距</span><input type="number" id="margin_y" value=10 onchange=""><br>
<span title="shadow_radius">阴影半径</span><input type="number" id="shadow_radius" value=6 onchange="UpdateShadowView();"><br>
<span title="shadow_offset_x">阴影x偏置</span><input type="number" id="shadow_offset_x" value=5 onchange="UpdateShadowView();"><br>
<span title="shadow_offset_y">阴影y偏置</span><input type="number" id="shadow_offset_y" value=5 onchange="UpdateShadowView();"><br>
<span title="spacing">码选间距</span><input type="number" id="spacing" value=20 onchange=""><br>
<span title="candidate_spacing">候选间距</span><input type="number" id="candidate_spacing" value=20 onchange=""><br>
<span title="hilite_spacing">行内间距</span><input type="number" id="hilite_spacing" value=20 onchange=""><br>
<span title="hilite_padding">高亮外扩</span><input type="number" id="hilite_padding" value=10 onchange=""><br>
<span title="round_corner">高亮圆角</span><input type="number" id="round_corner" value=0 onchange="UpdateRoundCorner();"><br>
<span title="corner_radius">窗口圆角</span><input type="number" id="corner_radius" value=0 onchange="UpdateCornerRadius();"><br>
</fieldset>
</form>
</td>
<td id="color_setting">
<form>
<fieldset>
<legend>背景設置</legend>
<span title="back_color">窗口背景</span><input style="width:100px" type="text" style="width:auto" data-jscolor="{}" name="back_color" value="FFFFFF" onchange="changeColor('box','bg',this.name,this.value, 'back_color');"><br />
<span title="shadow_color">窗口阴影</span><input style="width:100px" type="text" style="width:auto" data-jscolor="{}" name="shadow_color" value="00000000" onchange="exConvert('shadow_color', this.value, convertABGR2RGBA(this.value)); UpdateShadowView();"><br
/>
<span title="border_color">窗口邊框</span><input style="width:100px" type="text" style="width:auto" data-jscolor="{}" name="border_color" value="000000" onchange="changeColor('box','bd',this.name,this.value, 'border_color');">
</fieldset>
<fieldset>
<legend>內選區域</legend>
<span title="text_color">文       字</span><input style="width:100px" type="text" style="width:auto" data-jscolor="{}" name="text_color" value="000000" onchange="changeColor('text','c',this.name,this.value, 'text_color');"><br
/>
<span title="hilited_text_color">編       碼</span><input style="width:100px" type="text" style="width:auto" data-jscolor="{}" name="hilited_text_color" value="000000" onchange="changeColor('hilited','c',this.name,this.value, 'hilited_text_color');"><br
/>
<span title="hilited_back_color">背       景</span><input style="width:100px" type="text" style="width:auto" data-jscolor="{}" name="hilited_back_color" value="DDDDDD" onchange="changeColor('hilited','bg',this.name,this.value, 'hilited_back_color');"><br
/>
<span title="hilited_shadow_color">阴       影</span><input style="width:100px" type="text" style="width:auto" data-jscolor="{}" name="hilited_shadow_color" value="00000000" onchange="exConvert('hilited_shadow_color', this.value, convertABGR2RGBA(this.value)); UpdateShadowView();"><br
/>
<span title="prevpage_color">向上翻页</span><input style="width:100px" type="text" style="width:auto" data-jscolor="{}" name="prevpage_color" value="00000000" onchange="exConvert('prevpage_color', this.value, convertABGR2RGBA(this.value)); if(!isColorElementColorTrans('prevpage_color') && !isColorElementColorTrans('prevpage_color'))changeColor('prevpage', 'c', this.name, this.value, 'prevpage_color');"><br
/>
<span title="nextpage_color">向下翻页</span><input style="width:100px" type="text" style="width:auto" data-jscolor="{}" name="nextpage_color" value="00000000" onchange="exConvert('nextpage_color', this.value, convertABGR2RGBA(this.value)); if(!isColorElementColorTrans('prevpage_color') && !isColorElementColorTrans('prevpage_color'))changeColor('nextpage', 'c', this.name, this.value, 'nextpage_color');">
</fieldset>
<fieldset>
<legend>激活候選項</legend>
<span title="hilited_mark_color">激活標識</span><input style="width:100px" type="text" style="width:auto" data-jscolor="{}" name="hilited_mark_color" value="FFFFFF" onchange="changeColor('n1','name','_hilited_mark',this.value, 'hilited_mark_color');"><br
/>
<span title="hilited_label_color">序號文字</span><input style="width:100px" type="text" style="width:auto" data-jscolor="{}" name="hilited_label_color" value="FFFFFF" onchange="changeColor('n1','name','label1',this.value, 'hilited_label_color');"><br
/>
<span title="hilited_candidate_text_color">候選文字</span><input style="width:100px" type="text" style="width:auto" data-jscolor="{}" name="hilited_candidate_text_color" value="FFFFFF" onchange="changeColor('n1','name','word1',this.value, 'hilited_candidate_text_color');"><br
/>
<span title="hilited_comment_text_color">提示文字</span><input style="width:100px" type="text" style="width:auto" data-jscolor="{}" name="hilited_comment_text_color" value="FFFFFF" onchange="changeColor('n1','name','code1',this.value, 'hilited_comment_text_color');"><br
/>
<span title="hilited_candidate_back_color">激活背景</span><input style="width:100px" type="text" style="width:auto" data-jscolor="{}" name="hilited_candidate_back_color" value="000000" onchange="changeColor('n1','bg',this.name,this.value, 'hilited_candidate_back_color');"><br
/>
<span title="hilited_candidate_border_color">边       框</span><input style="width:100px" type="text" style="width:auto" data-jscolor="{}" name="hilited_candidate_border_color" value="00000000" onchange="changeColor('n1','bd',this.name,this.value, 'hilited_candidate_border_color');"><br
/>
<span title="hilited_candidate_shadow_color">激活阴影</span><input style="width:100px" type="text" style="width:auto" data-jscolor="{}" name="hilited_candidate_shadow_color" value="00000000" onchange="exConvert('hilited_candidate_shadow_color', this.value, convertABGR2RGBA(this.value)); UpdateShadowView();"><br
/>
</fieldset>
<fieldset>
<legend>其它候選項</legend>
<span title="label_color">序號文字</span><input style="width:100px" type="text" style="width:auto" data-jscolor="{}" name="label_color" value="000000" onchange="changeColor('ni', 'n', 'label', this.value, 'label_color');"><br>
<span title="candidate_text_color">候選文字</span><input style="width:100px" type="text" style="width:auto" data-jscolor="{}" name="candidate_text_color" value="000000" onchange="changeColor('ni', 'n', 'word', this.value, 'candidate_text_color');"><br
/>
<span title="comment_text_color">提示文字</span><input style="width:100px" type="text" style="width:auto" data-jscolor="{}" name="comment_text_color" value="000000" onchange="changeColor('ni', 'n', 'code', this.value, 'comment_text_color');"><br
/>
<span title="candidate_back_color">候選背景</span><input style="width:100px" type="text" style="width:auto" data-jscolor="{}" name="candidate_back_color" value="00000000" onchange="changeColor('ni', 'nb', 'n', this.value, 'candidate_back_color');"><br
/>
<span title="candidate_border_color">边       框</span><input style="width:100px" type="text" style="width:auto" data-jscolor="{}" name="candidate_border_color" value="00000000" onchange="changeColor('ni', 'nd', 'n', this.value, 'candidate_border_color');"><br
/>
<span title="candidate_shadow_color">候選阴影</span><input style="width:100px" type="text" style="width:auto" data-jscolor="{}" name="candidate_shadow_color" value="00000000" onchange="exConvert('candidate_shadow_color', this.value, convertABGR2RGBA(this.value)); UpdateShadowView();"><br
/>
</fieldset>
<fieldset id="modEx">
<legend>BGR
<> RGB</legend>
<span>BGR</span><input type="text" id="bgr" value="77DDBB" onchange="exMode('bgr','rgb',this.value);"><br />
<span>RGB</span><input type="text" id="rgb" value="BBDD77" onchange="exMode('rgb','bgr',this.value);"><br />
</fieldset>
</form>
</td>
<td id="code_generate">
<h2>生成代碼</h2>
<div id="source_code">
<div id="schema">example</div><span>:</span><br />
<div> name: <span id="name">名字</span></div>
<div> author: <span id="author">作者</span></div>
<div> back_color: <span id="back_color" class="color">0xFFFFFF</span></div>
<div> shadow_color: <span id="shadow_color" class="color">0x00000000</span></div>
<div> border_color: <span id="border_color" class="color">0x000000</span></div>
<div> text_color: <span id="text_color" class="color">0x000000</span></div>
<div> hilited_text_color: <span id="hilited_text_color" class="color">0x000000</span></div>
<div> hilited_back_color: <span id="hilited_back_color" class="color">0xDDDDDD</span></div>
<div> hilited_shadow_color: <span id="hilited_shadow_color" class="color">0x00000000</span></div>
<div> hilited_mark_color: <span id="hilited_mark_color" class="color">0xFFFFFF</span></div>
<div> hilited_label_color: <span id="hilited_label_color" class="color">0xFFFFFF</span></div>
<div> hilited_candidate_text_color: <span id="hilited_candidate_text_color" class="color">0xFFFFFF</span></div>
<div> hilited_comment_text_color: <span id="hilited_comment_text_color" class="color">0xFFFFFF</span></div>
<div> hilited_candidate_back_color: <span id="hilited_candidate_back_color" class="color">0x000000</span></div>
<div> hilited_candidate_border_color: <span id="hilited_candidate_border_color" class="color">0x00000000</span></div>
<div> hilited_candidate_shadow_color: <span id="hilited_candidate_shadow_color" class="color">0x00000000</span></div>
<div> label_color: <span id="label_color" class="color">0x000000</span></div>
<div> candidate_text_color: <span id="candidate_text_color" class="color">0x000000</span></div>
<div> comment_text_color: <span id="comment_text_color" class="color">0x000000</span></div>
<div> candidate_back_color: <span id="candidate_back_color" class="color">0x00000000</span></div>
<div> candidate_border_color: <span id="candidate_border_color" class="color">0x00000000</span></div>
<div> candidate_shadow_color: <span id="candidate_shadow_color" class="color">0x00000000</span></div>
<div> prevpage_color: <span id="prevpage_color" class="color">0x00000000</span></div>
<div> nextpage_color: <span id="nextpage_color" class="color">0x00000000</span></div>
<div><br /></div>
<!--
<div>style/font_face: <span id="style_font_face">"Microsoft Yahei UI"</span></div>
<div>style/font_point: <span id="style_font_point">24</span></div>
<div>style/horizontal: <span id="style_horizontal">true</span></div>
<div>style/inline_preedit: <span id="style_inline_preedit">true</span></div>
<div>style/layout/border_width: <span id="layout_border_width">1</span></div>
<div>style/layout/margin_x: <span id="layout_margin_x">10</span></div>
<div>style/layout/margin_y: <span id="layout_margin_y">10</span></div>
<div>style/layout/spacing: <span id="layout_spacing">20</span></div>
<div>style/layout/candidate_spacing: <span id="layout_candidate_spacing">20</span></div>
<div>style/layout/hilite_padding: <span id="layout_hilite_padding">10</span></div>
<div>style/layout/hilite_spacing: <span id="layout_hilite_spacing">20</span></div>
<div>style/layout/round_corner: <span id="layout_round_corner">0</span></div>
<div>menu/page_size: <span id="menu_size">5</span></div>
-->
</div>
</td>
</tr>
</table>
<!--
<div id="canvas">
<p>
<canvas id="drawing" width="1600" height="800">a drawing of something</canvas>
</p>
</div>
-->
<script>
//window.onload = function() { drawConfigs(); }
window.onload = function() {
changeNumber(document.getElementById('_page_size').value);
}
jscolor.presets.default = {
palette: [
'#000000', '#7d7d7d', '#870014', '#ec1c23', '#ff7e26', '#fef100', '#22b14b', '#00a1e7', '#3f47cc', '#a349a4',
'#ffffff', '#c3c3c3', '#b87957', '#feaec9', '#ffc80d', '#eee3af', '#b5e61d', '#99d9ea', '#7092be', '#c8bfe7',
],
}
</script>
<div>請用Chrome內核瀏覽器</div>
</body>
</html>