diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2021-07-06 19:43:53 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-06 19:43:53 -0400 |
commit | e88d63fc6d251bc298eb721fee1cbb9f5f4b752e (patch) | |
tree | f24b38bd421da53f84ab6b47ddff3c6492d44087 /ext/data/templates/anki-field-templates-upgrade-v13.handlebars | |
parent | e15513208584764526e2348ca7796ea665925086 (diff) |
Template renderer media updates (#1802)
* Add TemplateRendererMediaProvider to abstract media-related functionality
* Update representation of injected media
* Update templates
* Update upgrade file
* Update tests
* Update test data
* Force media to be an object
* Update test data
Diffstat (limited to 'ext/data/templates/anki-field-templates-upgrade-v13.handlebars')
-rw-r--r-- | ext/data/templates/anki-field-templates-upgrade-v13.handlebars | 34 |
1 files changed, 34 insertions, 0 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~}} +{{>>>>>>>}} |