diff options
Diffstat (limited to 'ext/data')
-rw-r--r-- | ext/data/templates/anki-field-templates-upgrade-v13.handlebars | 34 | ||||
-rw-r--r-- | ext/data/templates/default-anki-field-templates.handlebars | 14 |
2 files changed, 42 insertions, 6 deletions
diff --git a/ext/data/templates/anki-field-templates-upgrade-v13.handlebars b/ext/data/templates/anki-field-templates-upgrade-v13.handlebars index 04cc855a..ebf9069e 100644 --- a/ext/data/templates/anki-field-templates-upgrade-v13.handlebars +++ b/ext/data/templates/anki-field-templates-upgrade-v13.handlebars @@ -15,3 +15,37 @@ {{=======}} {{#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~}} +{{>>>>>>>}} diff --git a/ext/data/templates/default-anki-field-templates.handlebars b/ext/data/templates/default-anki-field-templates.handlebars index 67547732..62da796d 100644 --- a/ext/data/templates/default-anki-field-templates.handlebars +++ b/ext/data/templates/default-anki-field-templates.handlebars @@ -31,8 +31,8 @@ {{/inline}} {{#*inline "audio"}} - {{~#if definition.audioFileName~}} - [sound:{{definition.audioFileName}}] + {{~#if (hasMedia "audio")~}} + [sound:{{#getMedia "audio" format="fileName"}}{{/getMedia}}] {{~/if~}} {{/inline}} @@ -173,7 +173,9 @@ {{/inline}} {{#*inline "screenshot"}} - <img src="{{definition.screenshotFileName}}" /> + {{~#if (hasMedia "screenshot")~}} + <img src="{{#getMedia "screenshot" format="fileName"}}{{/getMedia}}" /> + {{~/if~}} {{/inline}} {{#*inline "document-title"}} @@ -291,13 +293,13 @@ {{! End Pitch Accents }} {{#*inline "clipboard-image"}} - {{~#if definition.clipboardImageFileName~}} - <img src="{{definition.clipboardImageFileName}}" /> + {{~#if (hasMedia "clipboardImage")~}} + <img src="{{#getMedia "clipboardImage" format="fileName"}}{{/getMedia}}" /> {{~/if~}} {{/inline}} {{#*inline "clipboard-text"}} - {{~#if definition.clipboardText~}}{{definition.clipboardText}}{{~/if~}} + {{~#if (hasMedia "clipboardText")}}{{#getMedia "clipboardText" format="text"}}{{/getMedia}}{{/if~}} {{/inline}} {{#*inline "conjugation"}} |