From 35cf994149727a6f3c173710045fda717c1da82d Mon Sep 17 00:00:00 2001 From: bill bittner Date: Mon, 7 Aug 2017 13:57:50 -0700 Subject: [PATCH] fixed issue with show lite and removed assettype from twitter --- speech.js | 17 ++++++++--------- views/layouts/show.handlebars | 2 +- views/showLite.handlebars | 4 +++- 3 files changed, 12 insertions(+), 11 deletions(-) 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