hmm

by Dave Mon 18 April 2005 @ 03:01
Ok, so that's done, and I think its fairly elegant too.  I've invented a new markup tag, called photo.  The format for using it is
<photo src="Path-To-Image" alt="Some Text" href="Path-To-Link" id="Number"/>
It looks at the src tag and builds an image around that, using the correct formatting for the CSS class I use for photos.  Then it looks for alt, and adds that if it exits.  If either href or id are present, then it renders the image inside a link tag for either the href to point to, or an image in the database.  The id tag takes precedence over the href tag, should the both exist.
So, the photo of the bread below, would be shortened to
<photo src="/photos/oail/IMG_3057.S.jpg" alt="Saturday Morning" id="519"/>
And that beats the hell out of the markup I had to build for the original Saturday Morning photo :-)

Categorised : Programming
Tagged with : , ,


Add comment




  Country flag
biuquote
  • Comment
  • Preview
Loading


Johann Sebastian Bach's grave is here, along with the organ whose construction he advised on. Pretty awesome tbh :-)This is where US and Soviet forces met for the first time in world war two.Awesome awesome view from a restaurant on top of the Bastei!We had lunch in Meissen at the cafe in the famous porcelain factory, and ate from about €1000 worth of chinaA little light lunch and some wine...Dresden's famous frauenkirche, recently rebuilt after being destroyed in the second world war.