GithubHelp home page GithubHelp logo

clarkadisney / photoslog Goto Github PK

View Code? Open in Web Editor NEW

This project forked from michaelvillar/photoslog

0.0 0.0 0.0 265 KB

A simple page to show a log of your photos.

Home Page: http://travel.michaelvillar.com

JavaScript 2.77% CoffeeScript 84.07% CSS 11.48% HTML 1.68%

photoslog's Introduction

Demo

http://travel.michaelvillar.com

Usage

Photos

Create a data folder: this is where your photos will live.

For each group of photos, create a folder (i.e. "sanfrancisco") and add your photos in it.

Finally, create a info.json into that folder with this format:

{
  "name": "San Francisco",
  "date": "2015-01-01",
  "images": [
    {
      "file": "1.jpg",
      "type": "full"
    },
    {
      "file": "2.jpg",
      "type": "row"
    },
    {
      "file": "3.jpg",
      "type": "row"
    }
  ]
}

This is how the file hierarchy should look like: File hierarchy

Test it locally

Install the necessary packages:

brew install imagemagick
npm install

Then run the script to prepare your photos -- this can take a while. It will resize your photos and create a global info.json required for the app. These will be saved into public/data/.

./scripts/prepare.coffee

Finally, compile the app and run it!

./scripts/compile.coffee
coffee web.coffee

Open http://localhost:8000/ in your browser.

Deploy it

For the sake of simplicity, we'll use Heroku.

heroku apps:create
git push heroku master

Then, you need to upload your photos on a server. Amazon S3 is an option. Upload the whole public/data folder which has been generated by ./scripts/prepare.coffee. Tell the app where your photos live:

heroku config:set IMAGES_ROOT_PATH="http://example.com/folder/"

You can also change the page title:

heroku config:set PAGE_TITLE="Michael Villar - Travel Log"

photoslog's People

Contributors

michaelvillar avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.