vasilionjea / photoview

[deprecated] A light and modular component to display photos in a navigable popup

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Photoview

[ Deprecated ]

A light and modular component to display photos in a navigable popup; a.k.a. "lightbox". Written in plain JavaScript for modern Browsers. A working example of this application can be seen at the following URL: http://vasilionjea.github.io/photoview/

Features

  • Loads photos from a remote service (e.g. Flickr).
  • Displays photos and navigates through them.
  • more to come...

Browsers

Latest versions of the following (it may work in others as well, but these were tested):

  • Chrome
  • Safari
  • Firefox
  • IE *

* IE11 doesn't support the Promise API, so a polyfill is required; here is a simple promise lib you could use: https://github.com/then/promise

Local Development

  1. First cd photoview/ and run npm install.
  2. Then execute grunt watch to watch and build files automatically.
  3. In a new Terminal tab cd photoview/ and grunt connect:dev to run a NodeJS static server.
  4. Open your favorite Browser and go to: http://localhost:9000

To do

  • Provide keyboard navigation; left/right arrow keys, ESC key
  • Add close button (currently a user must click the large image to close it)
  • Add a LocalService class that uses an array of photo objects.
  • Add support for other services, e.g. Unsplash, 500px.
  • Add event emitter so communication between service & UI layer is done more succinctly.
  • Add ARIA roles.
  • Possibly allow for other types of content to be rendered, e.g. videos and html.

Resources

About

[deprecated] A light and modular component to display photos in a navigable popup

License:GNU General Public License v3.0


Languages

Language:JavaScript 84.8%Language:CSS 13.6%Language:HTML 1.6%