Karl Hans Janke Kollaborativ
Heute die Welt, morgen das Sonnensystem!

aug 2010

A tiny Lightbox work-alike in pure JavaScript

pixpls.klein.png

A little companion to fotogirl has already silently made it into the repo: pixpls displays images in a floating <div> atop the page with navigation buttons and metadata.

To use it with fotogirl, just drop pixpls.js next to the generated index.html. Everything else is already in place.

This one differs from the millions of other Lightbox clones in that it was invented here (har!), has no dependency on jQuery or another library and truly consists of only one file. No gifs, no css, just the JavaScript. Size is 8.5 kilobytes, 2.6 compressed.

Check the fotogirl example for a demo. Basic usage instructions are in the source.

On the topic of compatibility: I have not tried it on Chrome, Opera or Safari. If you have, let me know. Alas, I will not be bothered with IE compatibility. That is all.

Moar shell scripting: quick and easy HTML foto galleries

img_0249.klein.jpgimg_0265.klein.jpgimg_0266.klein.jpg

Introducing fotogirl: a shell script for quickly generating html galleries.

From the README:

basic operation

  • enter a directory containing .jpeg or .jpg files.
  • call fotogirl.
  • wait. note automatic orientation adjustment according to exif data.
  • notice scaled images in _scale/.
  • notice thumbnails in _thumb/.
  • observe index.html. thumbnails are linked to scaled images.

Head over to the project page for more info, look at some example output, and get the code!

PS. Don't ask about the name.

Update: (21:30) I'm sorry, the incompatibilities with non-BSD environments have been resolved. ;)