Skip to content

Instantly share code, notes, and snippets.

@jathayde
Created August 16, 2009 18:50
Show Gist options
  • Save jathayde/168702 to your computer and use it in GitHub Desktop.
Save jathayde/168702 to your computer and use it in GitHub Desktop.
# def initialize(photo)
# @photo = PHOTOS[rand(24)]
# end
def filename
@photo[0]
end
def photo_caption
@photo[1]
end
def random_image_call
"<img src=\"/media/images/design/masthead/#{filename}\" alt=\"masthead image\" height=\"250\" width=\"725\" border=\"0\" />"
end
# Define the array of photos. Maybe eventually do this with YAML
PHOTOS = [
# Image Name Caption
[ '930lights.jpg', 'The stage lights at the <a href="http://www.930.com">930 Club</a> in Washington, DC during the <a href="http://www.ilovemetric.com/">Metric</a> show.' ],
[ 'arlingtonclouds.jpg', 'Cloud patterns over South Arlington in late summer, 2004' ],
[ 'commongrounds.jpg', 'The door to Common Grounds coffee shop; Arlington, Virginia' ],
[ 'courtlegs.jpg', '<a href="http://www.totushek.com/" rel="friend met co-worker muse">Courtney</a> catching a tan at <a href="http://craigberlingo.com/" rel="friend met colleague">Craig</a> and <a href="http://jen.berlingo.com/" rel="friend met colleague">Jen</a>\'s Wedding; June 2003' ],
[ 'emilymetric.jpg', 'Joshua Winstead and Emily Haines of <a href="http://www.ilovemetric.com/">Metric</a> appearing at the <a href="http://www.930.com/">930 Club</a> in Washington, DC' ],
[ 'interpolpaul.jpg', 'Paul Banks of <a href="http://www.interpolny.com/">Interpol</a> performing at the Curiosa Festival, Summer 2004' ],
[ 'lahinasunset.jpg', 'The sunset looking out upon Lahina harbor. Lahina, Maui, Hawai\'i' ],
[ 'longbeachharbor.jpg', 'Long Beach, California. Looking towards the harbor. Summer 2004' ],
[ 'manhattanbeachsunset.jpg', 'Angie\'s Balcony, during the VH1 Awards Week; Manhattan Beach, California, Fall 2001' ],
[ 'massave.jpg', 'Brownstones on Mass Ave, NE; Washignton, DC' ],
[ 'mauisunsettrees.jpg', 'The sun setting with the trees in silouhette. Maui, Hawai\'i. Summer 2004' ],
[ 'pennquartersunset.jpg', 'Sunset from Penn Quarter (near the White House), Washington, DC' ],
[ 'queenmary.jpg', 'The deck of the Queen Mary I, moored in Long Beach Harbor in California.' ],
[ 'recordstash.jpg', 'The record stash at Kynz\'s house where the <a href="http://www.boboroshiandkynz.com/">Boboroshi and Kynz</a> production magic happens.' ],
[ 'rte28barn.jpg', 'A patriotic barn on Route 28 south west of Washington, D.C.' ],
[ 'rosslynsunset.jpg', 'Sunset over Rosslyn viewed from Georgetown in Washington, D.C.' ],
[ 'ruralroad.jpg', 'Near a scout camp in the Appalachian Mountains of Virginia; Spring 2002' ],
[ 'slash.jpg', 'Slash of <a href="http://www.velvetrevolver.com/">Velvet Revolver</a> at the <a href="http://www.930.com/">9:30 Club</a>, Washington, D.C.' ],
[ 'solomonsboats.jpg', 'Boats docked in Solomon\'s Island, MD for the Fourth of July Weekend' ],
[ 'studiopencils.jpg', 'The pint glass of drawing utensils in the <a href="http://www.meticulous.com/" rel="me co-worker">Meticulous</a> studio.' ],
[ 'verlainelights.jpg', 'Candles on the tables of Verlaine, New York City, March 2005' ],
[ 'derby05.jpg', 'The pack races down the stretch at an early race at Churchill Downs on the day of the Kentucky Derby, 2005.' ],
[ 'gtownbank.jpg', 'Sunset on the Gold Leaf dome, Georgetown, Wisconsin & M Streets, NW, Washington DC' ],
[ 'gtownkeysunset.jpg', 'Sunset over the Potomac River behind the Key Bridge in Washington, DC (looking towards Virginia). Spring 2005' ],
[ 'pinkflowers.jpg', 'Flowers growing in the front yard in Arlington, Virginia. May 2005.' ]
]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment