Photo Gallery

I spent part of the day putting together a new format for my photo gallery.

I went looking to crib some slideshow javascript code, but I wasn’t happy with anything I found. After a while it just seemed like I was wasting a perfectly good opportunity to reinvent my own wheel by spending all day reading about wheel theory.

First, I had to start a collection of photos in a medium-sized format. That was fun: I recorded some macros to resize and matte portrait and landscape aspects to a square. Choosing from among thousands of my photographs was not as easy. That will be the continuing struggle.

Next, with a few photos prepared, I went to work on stylesheets: A page title banner, a container for the current photo, and left & right navigation buttons. I tweaked the positions until I thought it looked good. Then, it was back to photoshop to craft some images for the banner and navigation. Every so often, I would make a small change that would wreck everything, and sometimes it was a minor keystroke error - like “i” for “l”, which is a bit hard to distinguish in the screen font I’m using.

Then it was on to the Javascript. If there were one way to do it, I’d be in luck, but as the design took shape in my head (what, did you think I planned it out in advance? such a small thing? well - you’re right - I should have), I kept contradicting myself and combining incompatible strategies. Every great new idea meant backtracking to redo much of what I had completed… only do discover that my new idea didn’t work. It almost sounds like the Structure of Scientific Revolutions. I would commit myself to an idea until it proved absurd, then finally admit defeat and start working on a different idea.

The data is part of the problem: Somewhere in the middle of the process, I tried rolling my own XML file and writing and AJAX call into the Javascript, but I lost control over the ability to verify what I was doing - in other words, I would be flying blind. When it didn’t work, I didn’t have much recourse to debug the thing… So, I was back to storing the filenames and captions in an Array. This could still be pulled out into a separate file: It’s always nice to tease these things apart for editing - but this particular strength becomes something of a weakness when you need to do a lot of cross referencing among associated files.

Well, I think the results look pretty good. Any changes I make to it now can be little cosmetic stylesheet alterations. The best part about a slideshow is that not all the photos must be loaded immediately with the page. The size of the page is minuscule, and each photo is of modest size.

Now it’s back to preparing some good photos. From out of about four thousand. Don’t worry: most of those are duds.

Posted by Evan Bittner Thu, 23 Oct 2008 00:00:00 GMT

Comments

  1. Amanda said about 4 hours later:

    Looks fabulous, Sahib. Can hardly wait for it to have more photos!

  2. Vanessa said about 15 hours later:

    Cool. Finally some organization for the photos…

Trackbacks

Use the following link to trackback from your own site:
http://evanbittner.com/blog/articles/trackback/592

(leave url/email »)