Search

 


Time travelling into the future at a rate of 1s/s

New Photo Album

Posted by Paul McConnon Tue, 09 Jun 2009 23:19:00 GMT

I've completely redesigned the photo album on this site.

Its a much cleaner design with less visual distractions, muted colours to highlight the content and larger thumbnails. The previous album was displayed inline, within the blog layout, and the thumbnails were tiny.

The new layout is liquid; thumbnails flow to fill up the space, as would be expected in a desktop app. The layout looks particularly good on a widescreen monitor.

As with the previous album, it includes Lightbox functionality for displaying images when a thumbnail is clicked. This new album however, resizes display images on the fly to suit the size of the viewers browser window. When viewing on a large screen, images can be rendered up to 1200x1024, when viewing on a smaller screen, much smaller images are shown.

Image sizes are chosen from a list of preset sizes such that they are as large as possible, while still fitting within the browser window.

I have added an unobtrusive slideshow effect by simply 'remote controlling' the Lightbox plugin with javascript.

The album is zero administration and is always up to date. I just synchronise a folder on my computer with a folder on my server and the folders photos show up in the album automagically. The site takes care of thumbnailing and resizing itself.

Technical Info

I coded the whole thing up as a Rails plugin, the source of which I'll be putting on Github in the next few days. I have a few more tests to finish first ;)

The plugin was designed to provide the following benefits:

  • Instant-on
    • Install the plugin
    • Add a call to the route helper and point to the required folder in environment.rb
    • Navigate to the url /concept_album and you have a full working photo album
  • No database required
    • Lightweight info on the albums and images are cached using Rails caching mechanism
  • Minimal configuration
    • Set the folder to create the album for, and the location to store cached images and you're done.
    • Even these are not, strictly-speaking, necessary as sensible defaults are provided.
  • No maintenance tasks required.
    • New images are found automatically and show up immediately. Just copy (FTP, SSH, Upload within your web app) files to the album folder and they'll appear in the album on the site.

       

 

 

Posted in , ,  | Tags , , ,  | 73 comments