aboutsummaryrefslogtreecommitdiff
path: root/ext/data/templates/anki-field-templates-upgrade-v13.handlebars
blob: 2500703025d67815ed01c07ddf77ffe94310bef5 (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
{{#*inline "selection-text"}}
    {{~#if (hasMedia "selectionText")}}{{#getMedia "selectionText" format="text"}}{{/getMedia}}{{/if~}}
{{/inline}}

{{#*inline "sentence-furigana"}}
    {{~#if definition.cloze~}}
        {{~#if (hasMedia "textFurigana" definition.cloze.sentence)~}}
            {{#getMedia "textFurigana" definition.cloze.sentence format="html"}}{{/getMedia}}
        {{~else~}}
            {{definition.cloze.sentence}}
        {{~/if~}}
    {{~/if~}}
{{/inline}}

{{<<<<<<<}}
{{#each glossary}}{{#multiLine}}{{.}}{{/multiLine}}{{/each}}
{{=======}}
{{#each glossary}}{{#formatGlossary ../dictionary}}{{{.}}}{{/formatGlossary}}{{/each}}
{{>>>>>>>}}

{{<<<<<<<}}
{{#each glossary}}{{#multiLine}}{{.}}{{/multiLine}}{{#unless @last}} | {{/unless}}{{/each}}
{{=======}}
{{#each glossary}}{{#formatGlossary ../dictionary}}{{{.}}}{{/formatGlossary}}{{#unless @last}} | {{/unless}}{{/each}}
{{>>>>>>>}}

{{<<<<<<<}}
{{#each glossary}}<li>{{#multiLine}}{{.}}{{/multiLine}}</li>{{/each}}
{{=======}}
{{#each glossary}}<li>{{#formatGlossary ../dictionary}}{{{.}}}{{/formatGlossary}}</li>{{/each}}
{{>>>>>>>}}

{{<<<<<<<}}
    {{~#if definition.audioFileName~}}
        [sound:{{definition.audioFileName}}]
    {{~/if~}}
{{=======}}
    {{~#if (hasMedia "audio")~}}
        [sound:{{#getMedia "audio" format="fileName"}}{{/getMedia}}]
    {{~/if~}}
{{>>>>>>>}}

{{<<<<<<<}}
    <img src="{{definition.screenshotFileName}}" />
{{=======}}
    {{~#if (hasMedia "screenshot")~}}
        <img src="{{#getMedia "screenshot" format="fileName"}}{{/getMedia}}" />
    {{~/if~}}
{{>>>>>>>}}

{{<<<<<<<}}
    {{~#if definition.clipboardImageFileName~}}
        <img src="{{definition.clipboardImageFileName}}" />
    {{~/if~}}
{{=======}}
    {{~#if (hasMedia "clipboardImage")~}}
        <img src="{{#getMedia "clipboardImage" format="fileName"}}{{/getMedia}}" />
    {{~/if~}}
{{>>>>>>>}}

{{<<<<<<<}}
{{~#if definition.clipboardText~}}{{definition.clipboardText}}{{~/if~}}
{{=======}}
{{~#if (hasMedia "clipboardText")}}{{#getMedia "clipboardText" format="text"}}{{/getMedia}}{{/if~}}
{{>>>>>>>}}