From f89dd7b4de8f44c33d5c69f641aefca439400d3b Mon Sep 17 00:00:00 2001 From: bill bittner Date: Wed, 11 Oct 2017 14:16:28 -0700 Subject: [PATCH] created layout for showlite --- helpers/serveHelpers.js | 2 +- views/layouts/showlite.handlebars | 23 ++++++++++++++ views/partials/assetInfo.handlebars | 47 +++++++++++++++-------------- views/show.handlebars | 3 -- 4 files changed, 49 insertions(+), 26 deletions(-) create mode 100644 views/layouts/showlite.handlebars diff --git a/helpers/serveHelpers.js b/helpers/serveHelpers.js index d5dbdaf1..7301927c 100644 --- a/helpers/serveHelpers.js +++ b/helpers/serveHelpers.js @@ -40,6 +40,6 @@ module.exports = { }, showFileLite (fileInfo, res) { const openGraphInfo = createOpenGraphInfo(fileInfo); - res.status(200).render('showLite', { layout: 'show', fileInfo, openGraphInfo }); + res.status(200).render('showLite', { layout: 'showlite', fileInfo, openGraphInfo }); }, }; diff --git a/views/layouts/showlite.handlebars b/views/layouts/showlite.handlebars new file mode 100644 index 00000000..114bae03 --- /dev/null +++ b/views/layouts/showlite.handlebars @@ -0,0 +1,23 @@ + + + + + + + Spee.ch + + + + + {{#unless fileInfo.nsfw}} + {{{addTwitterCard fileInfo.fileType openGraphInfo.source openGraphInfo.embedUrl openGraphInfo.directFileUrl}}} + {{{addOpenGraph fileInfo.title fileInfo.fileType openGraphInfo.showUrl openGraphInfo.source fileInfo.description fileInfo.thumbnail}}} + {{/unless}} + + {{ googleAnalytics }} + + + {{{ body }}} + + + diff --git a/views/partials/assetInfo.handlebars b/views/partials/assetInfo.handlebars index 47a418ee..fd0faf2e 100644 --- a/views/partials/assetInfo.handlebars +++ b/views/partials/assetInfo.handlebars @@ -1,25 +1,5 @@ - -
-
-
- Share: -
-
-
- twitter -
-
- facebook -
-
- tublr -
-
- reddit -
-
-
-
+
+

{{fileInfo.description}}

@@ -57,6 +37,29 @@
+
+
+
+ Share: +
+
+
+ twitter +
+
+ facebook +
+
+ tublr +
+
+ reddit +
+
+
+
+
+
[more]
diff --git a/views/show.handlebars b/views/show.handlebars index 1d136cf1..c3360419 100644 --- a/views/show.handlebars +++ b/views/show.handlebars @@ -8,9 +8,6 @@
{{> asset}}
-
- {{fileInfo.description}} -