The Photo Journal |
|||||||
Friday, December 13, 2002 | |||||||
I recently rebuilt the Photo section of my site and added a photo-blog type of capability. Here's what I did. File Templates I didn't want to go all the way using stylesheets to format the page because the different browsers render the pages differently. I'm an Opera snob, and I've learned the hard way that there are major differences in the way IE and Opera render <div> layouts. My compromise is to create the basic structure using a table with one <tr> row and two <td> columns. Within the columns I use <div>s to provide the detailed structure. Like so:
Tagging example here. Blog I display only the 5 most recent images, just to keep the download time reasonable for the user. I then have an Archive article that lists the headline of each article as a link. Click the link, see the image. To do: So far I've only had one or two images I've wanted to post for a particular day. I can foresee having a group of images that I want to post for a day. I need to figure out how I want to link from the blog page and how I want to display the group. Stories The table of contents is another loop that calls the intro page article of each story. The thumbnail is called from Extra1, where I put the Magic Name of the thumbnail image. Each of the current stories represents a differnt way of dealing with the intro article.
For those stories that I kept outside of CD, I decided to play it safe and tagged the Home link as a full URL. To do: I haven't made any new stories since working with CD, so I don't know how I'm going to approach the task. One consideration will be how much I can play within CD. Another one, quite frankly, will be object overhead. Loops Here's the loop for the Blog page:
Here's the loop for the Archive page:
The stylesheet classes in the above two loops provide formating only -- text-alignment and font styles. The Stories table of contents depends on some style commands to work properly. The loop is:
The keys are the float element and the clear element. The float element in <div class=photo03> sets the image to the left margin and allows <div class=location03> to display next to the image to the right. Without the float element, <div class=location03> would stack underneath <div class=photo03> . The float is cancelled by <div style="clear: left;">. Without the clear element, the next image stacks underneath <div class=location03>, next to the thumbnail above, rather than stacking underneath <div class=photo03> thumbnail. And finally, here's what I used for the redirects:
|
|||||||
© 2002, 2003 satterlee.com |