diff --git a/speech.js b/speech.js index a557b3b3..16964b7f 100644 --- a/speech.js +++ b/speech.js @@ -90,15 +90,8 @@ const hbs = expressHandlebars.create({ ); } }, - addTwitterCard (assetType, source) { - if (assetType === 'image') { - return new Handlebars.SafeString( - ` - - - ` - ); - } else if (assetType === 'video') { + addTwitterCard (source, mimeType) { + if (mimeType === 'video/mp4') { return new Handlebars.SafeString( ` @@ -110,6 +103,12 @@ const hbs = expressHandlebars.create({ ` ); + } else { + return new Handlebars.SafeString( + ` + + ` + ); } }, ifConditional (varOne, operator, varTwo, options) { diff --git a/views/layouts/show.handlebars b/views/layouts/show.handlebars index 198616b3..0a6c3376 100644 --- a/views/layouts/show.handlebars +++ b/views/layouts/show.handlebars @@ -8,7 +8,7 @@ - {{{addTwitterCard openGraphInfo.type openGraphInfo.source}}} + {{{addTwitterCard openGraphInfo.source fileInfo.fileType}}} {{{addOpenGraph fileInfo.name openGraphInfo.showUrl openGraphInfo.source fileInfo.fileType }}} diff --git a/views/showLite.handlebars b/views/showLite.handlebars index db9df9ce..413293e9 100644 --- a/views/showLite.handlebars +++ b/views/showLite.handlebars @@ -6,8 +6,10 @@ {{!--fallback--}} Your browser does not support the video element. + {{else}} - {
+		<img class= + {{/ifConditional}} \ No newline at end of file