| [ code ] |
PicPopper is a little JavaScript library I use to improve the UI of my static photo albums.
Here is an example, clicking on any of the thumbnails should pop up a window with an enlarged version of the picture. Click on the picture to view the next one, or the other links to do other fun things. The keyboard arrow keys also do clever things.
PicPopper is meant for anyone maintaining old-fashioned static image libraries, who wants a slightly nicer UI without having to migrate the whole collection to a new system.
Alternately, PicPopper is for:
If you want to just try PicPopper out or use it on someone else's bare-bones photo albums, drag the following bookmarklet to your browser's bookmarks toolbar:
Clicking on the bookmark will then enable PicPopper for whatever page you are looking at at the time.
Notes:
When invoked with picPopper.prepare(), PicPopper will scan the page's DOM for any links to images (<a href=foo.jpg> etc.) and modify them to invoke the PicPopper user interface. If you for some reason want PicPopper to ignore some images, you can specify a regular expression which images must match, like so: picPopper.prepare(/regexp/).
Within the UI, the browser is asked to scale images to the largest (unstretched) size that will fit in the user's browser window. On most modern browsers this scaling is both fast and pretty. Older ones may make a mess of it though, if they work at all...
Back and Next links are available for moving back and forth, as well as a link for viewing the unscaled, full-sized image.
The up, down, left, right, esc and Q keys all do unsurprising things.
PicPopper attempts to be clever by preloading the next image, while one is being displayed, to make the album more responsive in low bandwidth situations. To avoid hogging too much RAM/bandwidth PicPopper only preloads one image at a time.
The UI built into the PicPopper javascript is deliberately bare-bones, so users can customize the look/feel of it with their own CSS rules. See the default stylesheet to get an idea of what can be tweaked (most everything).
PicPopper requires jQuery and a modern browser, but in the samples here I've used Google's AJAX Libraries API to take care of loading all the required javascript (including jQuery) when the page is ready, so I don't have to host jQuery myself. Whether you do the same is entirely up to you.