2
0
mirror of https://github.com/thumbsup/thumbsup synced 2024-11-05 12:01:04 +00:00
Go to file
2014-04-20 00:32:01 +10:00
bin Fix bin arguments 2014-04-20 00:19:33 +10:00
example Video thumbnails - no poster yet 2014-04-18 20:32:25 +10:00
public Activate BlueImp gallery viewer 2014-04-17 21:51:17 +10:00
src Cleanup 2014-04-20 00:32:01 +10:00
templates Remove unused template 2014-04-20 00:31:43 +10:00
.gitignore Initial commit 2014-04-17 21:26:18 +10:00
package.json Remove Gulp dependency (see below) 2014-04-19 17:49:24 +10:00
README.md Remove Gulp dependency (see below) 2014-04-19 17:49:24 +10:00
screenshot.jpg Fix README 2014-04-17 21:31:00 +10:00

thumbsup

Static HTML galleries from a list of photos & videos.

  • creates thumbnails for fast previews
  • uses relative paths so you can deploy the pages anywhere
  • supports custom CSS for styling
  • works great with Amazon S3 for static hosting

screenshot

Note: thumbsup keeps generated content separate from the original media. This means you're free to upload the media anywhere, and never have to worry about deleting the output folder

Requirements

Input

Any folder with photos and videos. thumbsup supports 1 level of subfolders:

input
  |
  |__ paris
  |    |__ img001.jpg
  |    |__ img002.jpg
  |
  |__ sydney
       |__ vid001.mp4
       |__ img003.png

Generating the galleries

thumbsup <args>

The following args are required:

  • --input <path> path to the folder with photos / videos
  • --output <path> target output folder
  • --media-prefix <url> prefix for the photos / videos URLS (can be relative or absolute)

And you can optionally specify:

  • --size <pixels> size of the thumbnails
  • --css <path> use the given CSS file instead of the default style

For example:

thumbsup --input "/media/photos" --output "./website" --media-prefix "http://my.photo.bucket.s3.amazon.com" --css "custom.css" --size 200

Deployment

The simplest is to deploy the media and generated pages to S3 buckets on AWS using the AWS CLI tools.

  • aws s3 sync /media/photos s3://my.photo.bucket --delete
  • aws s3 sync /generated/website s3://my.website.bucket --delete

Password protection

Amazon S3 buckets do not offer any type of authentication. However you can choose to deploy to another web server that offers password protection, such as HTTP Basic Auth.

An alternative is to deploy the galleries to UUID-based locations, like Dropbox shared galleries.

Dev notes

To create the sample gallery locally:

npm run example