From 60c1313d5d3dc58f5dcf8f291c378b7717ac8c51 Mon Sep 17 00:00:00 2001 From: Danielwhyte Date: Wed, 1 Aug 2018 14:53:15 +0100 Subject: [PATCH] adds preview thumbnail to image list, #13 --- lambda/lib/listObjects.js | 1 + lambda/templates/html-template.hbs | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/lambda/lib/listObjects.js b/lambda/lib/listObjects.js index 8d9770b..092e382 100644 --- a/lambda/lib/listObjects.js +++ b/lambda/lib/listObjects.js @@ -15,6 +15,7 @@ module.exports = (event, context, callback) => { var templateData = Object.assign({}, data, { bucket: process.env.S3_BUCKET, stage: process.env.STAGE, + region: process.env.REGION, uploaded: uploaded }); diff --git a/lambda/templates/html-template.hbs b/lambda/templates/html-template.hbs index c46e07f..c685ef0 100644 --- a/lambda/templates/html-template.hbs +++ b/lambda/templates/html-template.hbs @@ -34,6 +34,15 @@ margin: auto; text-align: right; } + .thumbnail { + object-fit: cover; + width: 100%; + height: 100%; + } + .thumbnail-container { + width: 5em; + height: 5em; + } td { text-align: center; } @@ -65,6 +74,7 @@ ID Name + Last Modified Status @@ -74,6 +84,11 @@ {{#if objectId}}{{objectId.S}}{{else}}missing{{/if}} {{#if title}}{{title.S}}{{else}}missing{{/if}} + +
+ object image preview +
+ {{#if modificationDate}}{{modificationDate.S}}{{/if}} {{#if active.BOOL}}