summaryrefslogtreecommitdiff
path: root/tmpl/kanji.html
blob: 57b6b7dcb752b9a9cad275db21df30c107dd3605 (plain)
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
{{#*inline "kanji"}}
<div class="entry" data-type="kanji">
    <div class="actions">
        {{#if addable}}
        <a href="#" class="action-view-note pending disabled"><img src="/mixed/img/view-note.png" title="View added note (Alt + V)" alt></a>
        <a href="#" class="action-add-note pending disabled" data-mode="kanji"><img src="/mixed/img/add-kanji.png" title="Add Kanji (Alt + K)" alt></a>
        {{/if}}
        {{#if source}}
        <a href="#" class="source-term"><img src="/mixed/img/source-term.png" title="Source term (Alt + B)" alt></a>
        {{/if}}
        <img src="/mixed/img/entry-current.png" class="current" title="Current entry (Alt + Up/Down/Home/End/PgUp/PgDn)" alt>
    </div>

    <div class="glyph">{{character}}</div>

    {{#if frequencies}}
    <div>
        {{#each frequencies}}
        <span class="label label-default tag-frequency">{{dictionary}}:{{frequency}}</span>
        {{/each}}
    </div>
    {{/if}}

    {{#if tags}}
    <div>
        {{#each tags}}
        <span class="label label-default tag-{{category}}" title="{{notes}}">{{name}}</span>
        {{/each}}
    </div>
    {{/if}}

    <table class="table table-condensed glyph-data">
        <tr>
            <th>Readings</th>
            <th>Glossary</th>
            <th>Statistics</th>
        </tr>
        <tr>
            <td class="reading">
                <dl>
                    {{#each kunyomi}}
                    <dd>{{.}}</dd>
                    {{/each}}
                    {{#each onyomi}}
                    <dd>{{.}}</dd>
                    {{/each}}
                </dl>
            </td>
            <td class="glossary">
                {{#if glossary.[1]}}
                <ol>
                    {{#each glossary}}
                    <li><span class="glossary-item">{{.}}</span></li>
                    {{/each}}
                </ol>
                {{else}}
                <span class="glossary-item">{{glossary.[0]}}</span>
                {{/if}}
            </td>
            <td>
                {{#if stats}}
                <table class="info-output">
                    {{#each stats}}
                    <tr>
                        <th>{{#if notes}}{{notes}}{{else}}{{name}}{{/if}}</th>
                        <td>{{value}}</td>
                    </tr>
                    {{/each}}
                </table>
                {{else}}
                No statistical data found
                {{/if}}
            </td>
        </tr>
        <tr>
            <th colspan="3">Dictionary Indices</th>
        </tr>
        <tr>
            <td colspan="3">
                {{#if indices}}
                <table class="info-output">
                    {{#each indices}}
                    <tr>
                        <th>{{#if notes}}{{notes}}{{else}}{{name}}{{/if}}</th>
                        <td>{{value}}</td>
                    </tr>
                    {{/each}}
                </table>
                {{else}}
                No index data found
                {{/if}}
            </td>
        </tr>
    </table>

    {{#if debug}}
    <pre>{{#dumpObject}}{{{.}}}{{/dumpObject}}</pre>
    {{/if}}
</div>
{{/inline}}

{{#if definitions}}
{{#each definitions}}
{{#unless @first}}<hr>{{/unless}}
{{> kanji debug=../debug addable=../addable source=../source root=../root}}
{{/each}}
{{else}}
<p class="note">No results found</p>
{{/if}}