-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path_insert-html-cn-grammar.js
12 lines (12 loc) · 10.5 KB
/
_insert-html-cn-grammar.js
1
2
3
4
5
6
7
8
9
10
11
12
require(["_dom-writers", "_tag-builders"], function(writers, builders){
var grammarTable = builders.buildDetailsTag('<table> <tr> <th>who?</th> <th>when?</th> <th>at where?</th> <th>do what?</th> </tr> <tr> <td><u><ruby>谁<rt>shéi</rt></ruby></u></td> <td><u><ruby>什么时候<rt>shén me shí hou</rt></ruby></u></td> <td><u><ruby>在哪里<rt>zài nǎ lǐ</rt></ruby></u></td> <td><u><ruby>做什么<rt>zuò shén me</rt></ruby></u></td> </tr> <tr> <td><ruby>我<rt>wǒ</rt></ruby></td> <td><ruby>最近<rt>zuì jìn</rt></ruby></td> <td><ruby>在公司<rt>zài gōng sī</rt></ruby></td> <td><ruby>上班<rt>shàng bān</rt></ruby></td> </tr> <tr> <td><ruby>你<rt>nǐ</rt></ruby></td> <td><ruby>今天<rt>jīn tiān</rt></ruby></td> <td><ruby>在家<rt>zài jiā</rt></ruby></td> <td><ruby>吃饭<rt>chī fàn</rt></ruby></td> </tr> <tr> <td><ruby>他<rt>tā</rt></ruby></td> <td><ruby>明天<rt>míng tiān</rt></ruby></td> <td><ruby>在上海<rt>zài shàng hǎi</rt></ruby></td> </tr> <tr> <td></td> <td><ruby>昨天<rt>zuó tiān</rt></ruby></td> <td></td> </tr> </table> ', "CN Basic Grammar");
var monthTable = builders.buildDetailsTag('<table> <caption><ruby><span class="tone4">個</span><span class="tone4">月</span><span class="tone5">的</span><span class="tone1">一</span><span class="tone2">年</span><rt><span class="tone4">gè</span> <span class="tone4">yuè</span> <span class="tone5">de</span> <span class="tone1">yī</span> <span class="tone2">nián</span><!--ge yue de yi nian--></rt></ruby></caption> <tr> <td><ruby><span class="tone1">一</span><span class="tone4">月</span><rt><span class="tone1">yī</span> <span class="tone4">yuè</span><!--yi yue--></rt></ruby></td> <td><ruby><span class="tone4">二</span><span class="tone4">月</span><rt><span class="tone4">èr</span> <span class="tone4">yuè</span><!--er yue--></rt></ruby></td> <td><ruby><span class="tone1">三</span><span class="tone4">月</span><rt><span class="tone1">sān</span> <span class="tone4">yuè</span><!--san yue--></rt></ruby></td> <td><ruby><span class="tone4">四</span><span class="tone4">月</span><rt><span class="tone4">sì</span> <span class="tone4">yuè</span><!--si yue--></rt></ruby></td> </tr> <tr> <td><ruby><span class="tone3">五</span><span class="tone4">月</span><rt><span class="tone3">wǔ</span> <span class="tone4">yuè</span><!--wu yue--></rt></ruby></td> <td><ruby><span class="tone4">六</span><span class="tone4">月</span><rt><span class="tone4">lìu</span> <span class="tone4">yuè</span><!--liu yue--></rt></ruby></td> <td><ruby><span class="tone1">七</span><span class="tone4">月</span><rt><span class="tone1">qī</span> <span class="tone4">yuè</span><!--qi yue--></rt></ruby></td> <td><ruby><span class="tone1">八</span><span class="tone4">月</span><rt><span class="tone1">bā</span> <span class="tone4">yuè</span><!--ba yue--></rt></ruby></td> </tr> <tr> <td><ruby><span class="tone3">九</span><span class="tone4">月</span><rt><span class="tone3">jǐu</span> <span class="tone4">yuè</span><!--jiu yue--></rt></ruby></td> <td><ruby><span class="tone2">十</span><span class="tone4">月</span><rt><span class="tone2">shí</span> <span class="tone4">yuè</span><!--shi yue--></rt></ruby></td> <td><ruby><span class="tone2">十</span><span class="tone1">一</span><span class="tone4">月</span><rt><span class="tone2">shí</span> <span class="tone1">yī</span> <span class="tone4">yuè</span><!--shi yi yue--></rt></ruby></td> <td><ruby><span class="tone2">十</span><span class="tone4">二</span><span class="tone4">月</span><rt><span class="tone2">shí</span> <span class="tone4">èr</span> <span class="tone4">yuè</span><!--shi er yue--></rt></ruby></td> </tr> </table>', "個月的一年");
var timeTable2 = builders.buildDetailsTag('<table> <caption><ruby><span class="tone2">時</span><span class="tone4">刻</span><span class="tone3">表</span><span class="tone4">二</span><rt><span class="tone2">shí</span> <span class="tone4">kè</span> <span class="tone3">biǎo</span><!--shi ke biao--><span class="tone4"> èr</span><!--er--></rt></ruby></caption> <tr> <td><ruby><span class="tone4">上</span><span class="tone1">星</span><span class="tone1">期</span><rt><span class="tone4">shàng</span> <span class="tone1">xīng</span> <span class="tone1">qī</span><!--shang xing qi--></rt></ruby></td> <td><ruby><span class="tone4">這</span><span class="tone1">星</span><span class="tone1">期</span><rt><span class="tone4">zhè</span> <span class="tone1">xīng</span> <span class="tone1">qī</span><!--zhe xing qi--></rt></ruby></td> <td><ruby><span class="tone4">下</span><span class="tone1">星</span><span class="tone1">期</span><rt><span class="tone4">xià</span> <span class="tone1">xīng</span> <span class="tone1">qī</span><!--xia xing qi--></rt></ruby></td> <td><ruby><span class="tone3">每</span><span class="tone1">星</span><span class="tone1">期</span><rt><span class="tone3">měi</span> <span class="tone1">xīng</span> <span class="tone1">qī</span><!--mei xing qi--></rt></ruby></td> </tr> <tr> <td><ruby><span class="tone4">上</span><span class="tone4">個</span><span class="tone4">月</span><rt><span class="tone4">shàng</span> <span class="tone4">gè</span> <span class="tone4">yuè</span><!--shang ge yue--></rt></ruby></td> <td><ruby><span class="tone4">這</span><span class="tone4">個</span><span class="tone4">月</span><rt><span class="tone4">zhè</span> <span class="tone4">gè</span> <span class="tone4">yuè</span><!--zhe ge yue--></rt></ruby></td> <td><ruby><span class="tone4">下</span><span class="tone4">個</span><span class="tone4">月</span><rt><span class="tone4">xià</span> <span class="tone4">gè</span> <span class="tone4">yuè</span><!--xia ge yue--></rt></ruby></td> <td><ruby><span class="tone3">每</span><span class="tone3">個</span><span class="tone4">月</span><rt><span class="tone3">měi</span> <span class="tone3">gě</span> <span class="tone4">yuè</span><!--mei ge yue--></rt></ruby></td> </tr> </table>', "CN Close Times");
var timeTable1 = builders.buildDetailsTag('<table> <caption><ruby><span class="tone2">時</span><span class="tone4">刻</span><span class="tone3">表</span><rt><span class="tone2">shí</span> <span class="tone4">kè</span> <span class="tone3">biǎo</span><!--shi ke biao--></rt></ruby></caption> <tr> <td><ruby><span class="tone3">早</span><span class="tone5">上</span><rt><span class="tone3">zǎo</span> <span class="tone5">shang</span><!--zao shang--></rt></ruby></td> <td><ruby><span class="tone5">上</span><span class="tone5">午</span><rt><span class="tone4">shàng</span> <span class="tone3">wǔ</span><!--shang wu--></rt></ruby></td> <td><ruby><span class="tone1">中</span><span class="tone3">午</span><rt><span class="tone1">zhōng</span> <span class="tone3">wǔ</span><!--zhong wu--></rt></ruby></td> <td><ruby><span class="tone4">下</span><span class="tone3">午</span><rt><span class="tone4">xià</span> <span class="tone3">wǔ</span><!--xia wu--></rt></ruby></td> <td><ruby><span class="tone3">晚</span><span class="tone5">上</span><rt><span class="tone3">wǎn</span> <span class="tone5">shang</span><!--wan shang--></rt></ruby></td> </tr> <tr> <td><ruby><span class="tone2">前</span><span class="tone1">天</span><rt><span class="tone2">qián</span> <span class="tone1">tiān</span><!--qian tian--></rt></ruby></td> <td><ruby><span class="tone2">昨</span><span class="tone1">天</span><rt><span class="tone2">zuó</span> <span class="tone1">tiān</span><!--zuo tian--></rt></ruby></td> <td><ruby><span class="tone1">今</span><span class="tone1">天</span><rt><span class="tone1">jīn</span> <span class="tone1">tiān</span><!--jin tian--></rt></ruby></td> <td><ruby><span class="tone2">明</span><span class="tone1">天</span><rt><span class="tone2">míng</span> <span class="tone1">tiān</span><!--ming tian--></rt></ruby></td> <td><ruby><span class="tone4">後</span><span class="tone1">天</span><rt><span class="tone4">hòu</span> <span class="tone1">tiān</span><!--hou tian--></rt></ruby></td> </tr> </table>', "CN Day Times");
var weekdayTable = builders.buildDetailsTag('<table> <caption><ruby><span class="tone1">一</span><span class="tone5">个</span><span class="tone1">星</span><span class="tone1">期</span><span class="tone5">的</span><span class="tone1">七</span><span class="tone1">天</span><rt><span class="tone1">yī</span> <span class="tone5">ge</span> <span class="tone1">xīng</span> <span class="tone1">qī</span> <span class="tone5">de</span> <span class="tone1">qī</span> <span class="tone1">tiān</span><!--yi ge xing qi de qi tian--></rt></ruby></caption> <tr> <td><ruby><span class="tone1">星</span><span class="tone1">期</span><span class="tone1">一</span><rt><span class="tone1">xīng</span> <span class="tone1">qī</span> <span class="tone1">yī</span><!--xing qi yi--></rt></ruby></td> <td><ruby><span class="tone1">星</span><span class="tone1">期</span><span class="tone4">二</span><rt><span class="tone1">xīng</span> <span class="tone1">qī</span> <span class="tone4">èr</span><!--xing qi er--></rt></ruby></td> <td><ruby><span class="tone1">星</span><span class="tone1">期</span><span class="tone1">三</span><rt><span class="tone1">xīng</span> <span class="tone1">qī</span> <span class="tone1">sān</span><!--xing qi san--></rt></ruby></td> <td><ruby><span class="tone1">星</span><span class="tone1">期</span><span class="tone4">四</span><rt><span class="tone1">xīng</span> <span class="tone1">qī</span> <span class="tone4">sì</span><!--xing qi si--></rt></ruby></td> </tr> <tr> <td><ruby><span class="tone1">星</span><span class="tone1">期</span><span class="tone3">五</span><rt><span class="tone1">xīng</span> <span class="tone1">qī</span><span class="tone3">wǔ</span><!--wu--></rt></ruby></td> <td><ruby><span class="tone1">星</span><span class="tone1">期</span><span class="tone4">六</span><rt><span class="tone1">xīng</span> <span class="tone1">qī</span> <span class="tone4">lìu</span><!--xing qi liu--></rt></ruby></td> <td colspan="2"><ruby><span class="tone1">星</span><span class="tone1">期</span><span class="tone1">天</span>(<span class="tone1">星</span><span class="tone1">期</span><span class="tone4">日</span>)<rt><span class="tone1">xīng</span> <span class="tone1">qī</span> <span class="tone1">tiān</span><!--xing qi tian-->( <span class="tone1">xīng</span> <span class="tone1">qī</span> <span class="tone4">rì</span> )<!--( xing qi ri )--></rt></ruby></td> </tr> </table>', "一个星期的七天");
writers.appendToBody(grammarTable);
writers.appendToBody(monthTable);
writers.appendToBody(timeTable2);
writers.appendToBody(timeTable1);
writers.appendToBody(weekdayTable);
});