Categories
Burningbird

Pick your bird

I’m still playing with new styles for the site. I find when I’m tired or want to think about a topic before I write on it that playing around with a new style is very soothing. After all, it’s very easy because all of the styles use the same basic layout and layout is the tough part of a web page design.

I thought I would write out the details of how all this works since the sheet switching seems to be working relatively well. I’m still tweaking, but that’s primarily because of my extensive use of photos and graphics.

I borrowed the dynamic stylesheet loading Javascript from Michael Hanscom, who got it from an A List Apart article. You can also download a copy here. After downloading, rename it to “styleswitcher.js”.

The ALA article has good coverage about adding the switcher code and how it works so I won’t repeat it. What I’ll talk about instead is what I’m doing with my own site, including using PHP to generate CSS.

First, all of the sites have the same basic layout. Once I found what I liked, I kept it and this makes site redesign more a matter of fun exploration than work.

The basic design is two columns, usually centered, each separated slightly from the other. Within the sidebar column on the left, several discrete sections containing images and things like Recent Comments and other lists are framed within another ’sidebar’ section that usually doesn’t have any background (Walker Evans differs).

I made no attempt to ‘contain’ these sidebar items, hence creating the effect a friend called the “floating clouds”. I also make no attempt to ensure that all the segments are exactly the same size, and spaced exactly the same. Clouds in nature are imprecise and chaotic and so are my sidebar clouds.

(Besides, I’m also a little chaotic so the design suits me. And it feels so good to drive the anal among you crazy with my irregularities.)

Now, to change the sidebar images with each stylesheet, what I did was create a set of nine DIV blocks, img1-img9, that have a different image as a background image, just as I use a background image for the entire page. From Fire & Ice, one of the image blocks looks as follows:

div.img1 {
background-image: URL(./look/noaa2sm.jpg);
width: 200px; height: 131px; margin: 0px; padding: 0px
}

The main page has the DIV blocks embedded into the sidebar, but if the matching DIV class is not included, nothing shows – as you’ll see in Old Bird. Otherwise, the image defined in the stylesheet is what shows.

Of course, this has some latency effects with some browsers and an embedded transparent GIF within the block would help overcome this – but the sidebar images I use differ in size from stylesheet to stylesheet. So, for the nonce, the slight latency issue remains.

You can access any of my style sheets just by opening my main page, getting the stylesheet names, and then saving the sheet. As for this page, well, a girl has to have some secrets, doesn’t she?

Seriously – you can access a copy of the main index page design here.

Finally, a new approach that I’m exploring now can be seen in a style called “Random Shot”. This style, still under development, is a combination of PHP and CSS that uses a random generator to access a database containing names of photos I have stored on my server, and change the image with each page load. You’ve seen random photos in my main page, but that’s a pure PHP page.

It’s relatively easy to combine CSS and PHP. To have the web server process the PHP in the CSS file, you need to name the file with a PHP extension instead of CSS (unless you’re playing around with your .htaccess file – more in a later writing). However, to ensure that a page is returned as a specific type to the browser, in this case CSS, include a PHP header function call as the first bit of code in the page and set the document type:

<?php

header(’Content-type: text/css’);

?>

Now, the page will be processed as PHP, but returned to the browser as CSS.

Include the link to this page as you would any other CSS page:

<link rel=”alternate stylesheet” media=”screen” title=”randomshots” href=”http://weblog.burningbird.net/photos.php” type=”text/css” />

At this time, I’m using a file with names of photos for my test stylesheet, but you can use a database or anything else you want:

<?php

// script is RandomImage, from Enter the Fog
$url = file(“http://burningbird,net/somefile.txt”);

//generate a random number
srand((double)microtime() * 1000000);

//change the number after the % to the number of images
//you have
$ct = count($url);
$rn = (rand()%$ct);

//display the banner and link . This opens in a new window
$imgname = trim($url[$rn]);
printf(“background-image: URL(’%s’);”, $imgname);
?>
width: 200px; height: 130px; margin: 0px; padding: 0px
}

You can use PHP to do anything within your stylesheet. Think of the possibilities….

All you have to remember is that the more processing you put in, the slower the page loads. And if you dynamically generate the stylesheet, it won’t cache between access. However, unless the file is large or uses a lot of photos –ahem– you shouldn’t have any problems. If you use a lot of photos or processing though, there could be a noticable lag between when the page loads and the stylesheet kicks in.

Categories
Burningbird

New look. Really new look.

I did testing of the new look in the validation engines, and several different browsers and it seems to work. I am aware of the float problem with IE 6.0 and will dig up the work around and add it. I’m getting to the point where if I no longer support Netscape 4.x, I don’t want to support IE 6.x, either.

But it is widely used so if you’re using it, be aware that I working the problem.

I have other new styles to add in addition to the ones you have now, but I’ll leave those for next week. I myself switch between Fire & Ice and Lemon Shake-Ups, depending if I’m in the mood for summer or winter. Shake-Ups is a bit busy, but it suits the photo at the top and is very cheerful.

Speaking of photos, yes I am using photos in the sidebar and yes it can slow load times. Hopefully once they cache, their bandwidth burden should be minimized.

The ice photos used in Fire & Ice are from the NOAA public libraries and they are lovely, aren’t they? The other photos that aren’t NOAA’s or mine are from Jon Sullivan who has generously placed most of his wonderful work into the public domain. (Jon has a weblog here. Read his disclaimer at the bottom for a giggle.) I will be using more of Jon’s work in upcoming styles.

I either created the clipart or downloaded it from the free clipart pages at about.com.

If you can try these different stylesheets in your browser and drop me a note and let me know what does or doesn’t work, I’d be appreciative. This is a very major change, and I imagine the site will be rough for a week, until I finish the transition.

I’ve had the old colors and look for so long, when I come to the pages, it doesn’t feel like my site. But change is good. Thanks again for those who have commented and tested; a special thanks to Roger for helping me with the Burningbird title positioning.

Fixed the layout problem in Safari and IE – I had an unclosed DIV tag within my last post (my update block).

Rah!

Categories
Burningbird

Fire and ice

Though I work primarily with backend development, my start in writing was front end design and development, working with Javascript and CSS. I know, hard to imagine.

Lately though, I’ve been in a design mood, and have designed a new format for this weblog, which you can see at the test weblog. I’ve borrowed Michael Hanscom’s idea of a style switcher, and his Javascript, and have created three styles so far. I have five more in the wings, waiting to finish, but you can see what I have now.

The (F) and (S) designate fixed background image or sliding. So far my favorite design is Fire and Ice, inspired by a posting title by Rogi. Check out the sidebar that changes with each stylesheet. The photos change in and around the ‘floating cloud’ segmented sidebar, as someone named it, and a lovely name it is. The difference from the original design is that I am now going fully centered.

I still need to play around with the stylesheets, make sure it works with the browsers I plan on supporting. And I have one last challenge – the Burningbird title. I want it to right align with the box holding the post text, but haven’t figured it out yet. If anyone has any ideas, I’d appreciate hearing about them.

Found, thanks to Roger.

This has been fun. Much more fun than being a pain in the butt to the WordPress people. But not as fun as paddle-ball, Dave.

Nice safe, topic.

Categories
Writing

New Icy frost Leatherwood

Allan Moult has completely redesigned Leatherwood Online and I like the new look. It’s a variation on the triple column, but giving more prominence to the main content. Allan’s also created a bunch of new blogs to support the site.

One new section focuses entirely on the Antarctica, and I think this really gives the site the one last hook it needed, appealing to the scientist/adventurer in all of us. And think of the photo opportunities, such as the following photo from Doug Thost.

If I ever get around to trying out more new site looks, I’d like to do some based on that unique and glorious blue color that very old ice gets.

Of course, this new effort also fits with my interest in squid, in particular the giant varieties of squid. I’m working on an interview of Dick Williams, expedition leader for a unique land/marine study that resulted in this accidental photo of one of the larger squid species (still being determined).

But all my attention isn’t devoted completely to icy vistas and tenacious marine life. There was this recipe for warm stout and chocolate pudding that also caught my fancy…

Categories
Just Shelley

It never rains but it pours

I just had an unexpected visit from the IRS. They showed up at my door with no warnings. I had no idea there was any problem, or anything wrong.

It would seem they don’t have the last form 940 for my corporation, which I closed in 2002. I had a letter to this effect last year, about not getting this form. That was cool, so sent them a copy. Didn’t hear another word. Not another word in over six months.

I also filed on time for my individual taxes for 2002 (filed in 2003) and 2003 (filed in 2004). Since I didn’t have the cash to pay the taxes owed, I sent in the form requesting payments, and have been making payments for my taxes owed last year ever since. I also just now received a letter from the IRS, on Friday, accepting my payment plan for both years and giving me a form to make first payment for the combined liability. But then Monday I received a note that all taxes were due, because none had been paid, and forms not filed.

And then I received a visit this morning from the IRS.

I hope I can find my copies of everything. Luckily the bank maintains copies of the checks, and I found my returns. I hope that none of the paperwork I need was in the unit that I sold off. I can’t afford a lawyer to represent me.

The bizarre thing about form 940 is that it would have nothing to do with taxes paid. I was an S corporation, and therefore didn’t pay corporate taxes. I paid my unemployment, and my social security, too. I paid income taxes through my individual tax return, and she said I did pay for all monies on my individual account – but I didn’t file the 940.

So now I’ll spend my day going through all my papers again, and faxing anything I can think of–because if I don’t she told me she will pursue financial and criminal avenues by the end of the week. So I’ll fax everything! Everything! And then hope this isn’t seen as a nuisance and therefore also make me criminally liable.

And it was a nice day, today, too. I thought about going for a walk.

At least there’s one good thing: it wasn’t someone from Ashcroft’s office, investigating me for my past critical writing about him and the President.

(Ooops! Well, now I’ve done it, haven’t I?)

If I end up in jail, will you bake me a cake?

update

Sorry for ’sharing too much’ with this post. I was finishing up my previous post when the IRS agent came by, and just sort of wrote my reactions. I realize, though, that this can fall into that category of “information you’d rather I not share”.

It does look like I have all the paperwork needed. Still rattled though. But will try and post happy writing later. Except that I was going to write about how amazed I am that no one seems to be questioning the Spirit of America. I can’t be the only person hesitant about the premise behind this operation, am I?