-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
256 lines (210 loc) · 5.61 KB
/
index.html
File metadata and controls
256 lines (210 loc) · 5.61 KB
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
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xml:lang="zh-TW" lang="zh-TW">
<head>
<meta charset="utf-8" />
<title>臺客語漢字表</title>
<style>
body {
margin: 0;
padding: 0;
}
@font-face {
font-family: "hanamin";
src: url(hanamincom.ttf);
}
img {
width: 32pt;
height: 32pt;
padding: 0.3em;
margin-top: -0.7em;
}
dl.char {
border: 1px black solid;
width: 19%;
text-align: center;
display: block;
float: left;
margin: 0 auto;
padding: 0;
}
dt {
font-size: 32pt;
font-family: "hanamin","HanaMinB","HanaMinA",serif;
padding: 0.3em;
}
dd {
top: 0;
margin: 0;
padding: 0;
}
h2 {
clear: both;
padding-top: 3em;
}
ul {
list-style-type:none;
margin:0;
padding:0;
position: absolute;
width: 100%;
color: white;
height: 50px;
}
/*Style for menu links*/
li a {
display:block;
width: 19vw;
height: 50px;
text-align: center;
line-height: 50px;
font-family: sans-serif;
color: #000;
background: #fff;
text-decoration: none;
border-bottom: none;
padding: 0;
margin: 0;
}
/*Hover state for top level links*/
/*Create a horizontal list with spacing*/
li {
display:inline-block;
float: left;
margin-right: 0;
margin-top: 0;
}
li:hover a {
background: #000;
color: #fff;
}
.top50 {
margin-top: 50px;
}
.show-menu {
font-family: sans-serif;
text-decoration: none;
color: #000;
background: #fff;
text-align: center;
padding: 10px 0;
display: none;
font-size: 14px;
}
/*Hide checkbox*/
input[type=checkbox]{
display: none;
}
/*Show menu when invisible checkbox is checked*/
input[type=checkbox]:checked ~ #menu{
display: block;
}
@media screen and (max-width : 768px) {
h2 {
padding-top: 1em;
}
/*Make dropdown links appear inline*/
ul {
position: static;
display: none;
}
/*Create vertical spacing*/
li {
border-bottom: 1px dashed rgba(0, 0, 0, 0.5);
}
/*Make all menu links full width*/
ul li, li a {
width: 100%;
}
/*Display 'show menu' link*/
.show-menu {
display:block;
}
}
@media print {
dl {
page-break-inside: avoid;
}
label,input,ul {
display: none;
}
}
</style>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<label for="show-menu" class="show-menu">臺客語漢字表</label>
<input type="checkbox" id="show-menu" role="button">
<ul id="menu">
<li><a href=#p1>臺語常用漢字</a></li>
<li><a href=#p2>客臺語共同常用漢字</a></li>
<li><a href=#p3>客語常用漢字</a></li>
<li><a href=#p4>客臺語共同次常用字</a></li>
<li><a href=#p5>資料來源與說明</a></li>
</ul>
<h2 id="p1">臺語常用漢字</h2>
<div data-series="臺">
</div>
<h2 id="p2">客臺語共同常用漢字</h2>
<div data-series="客臺">
</div>
<h2 id="p3">客語常用漢字</h2>
<div data-series="客">
</div>
<h2 id="p4">客臺語共同次常用字</h2>
<div data-series="次常用">
</div>
<div>
<h2 id="p5">資料來源</h2>
<p><a href="https://docs.google.com/spreadsheets/d/18CUbZ7tsvZ4QbUj3xcfYi9EGqsft4T37WtUMX9v2STQ/pubhtml">臺語客語特殊字表</a>by 烏衣行, Liz Lin, Ka-phing Loh。</p>
<p>自造字圖檔擷取於烏衣行製作的<a href="http://wesingkasu.blogspot.tw/2012/01/blog-post_1223.html">臺灣宋體、楷體</a>。</p>
<p>Unicode ext-B後字型採用<a href="http://fonts.jp/hanazono/">花園明朝體</a>擷取重組製作。</p>
<h2>說明</h2>
<p>自造字是否編入Unicode中,需進一步檢證,使用私用區編碼主要為臺灣宋體、楷體內的編碼。</p>
<p>本頁使用<a href="http://handlebarsjs.com">Handlebar.js</a>以及<a href="http://www.javascriptoo.com/tabletop">TableTop.js</a>製作。</p>
<p>你可以另外下載<a href="https://github.com/bobbytung/TaigiHakkaIdeograph/blob/master/台客語用漢字.pdf">PDF檔案</a>,也可以直接列印本網頁。</a></p>
</div>
<script src="js/jquery-1.11.3.min.js"></script>
<script src="js/handlebars-v3.0.3.js"></script>
<script src="js/tabletop.js"></script>
<script type="text/javascript">
$(document).ready(function() {
var renderPage = function(data, tabletop){
// prepare handlebars template
var charitem_source ='<dl class="char"><dt>{{glyph}}</dt>';
var charitem_source2 ='<img src="img/{{charimage}}"/>';
var charitem_source_end = '<dd>U+{{ucs}}</dd><dd>{{property}}</dd><dd>{{tw}}</dd></dl>';
var charitem = Handlebars.compile(charitem_source);
var charitem2 = Handlebars.compile(charitem_source2);
var charitem_end = Handlebars.compile(charitem_source_end);
// prepare data
var charlist = tabletop.sheets('ideochart').all();
// combine template and data
$.each(charlist, function(char_index, ideo){
var glyph = ideo['字形'] || '';
var ucs = ideo['Unicode'] || '';
var property = ideo['屬性'] || '';
var tw = ideo['客臺'] || '';
var charimage = ideo['image'] || ''
var context = {glyph: glyph, ucs: ucs, property: property, tw: tw, charimage: charimage};
var $charitem_element = $(charitem(context));
if(charimage.length > 0){
var $ideoimage = $(charitem2(context));
$charitem_element.append($ideoimage);
}
if(tw.length > 0){
var $ideo_end = $(charitem_end(context));
$charitem_element.append($ideo_end);
}
$('[data-series="'+ tw +'"]').append($charitem_element);
});
};
Tabletop.init({
key: '18CUbZ7tsvZ4QbUj3xcfYi9EGqsft4T37WtUMX9v2STQ',
callback: renderPage,
simpleSheet: true
});
})
</script>
</body>
</html>