Archive for September 2009


External url icon CSS

It didn’t take long at all before the linkdumpish nature of this blog so far caught up with me: I grew tired of adding class="external_link" to almost all the <A> tags. I also did not like how the icon did not match the visited link color. I corrected both of these today.

Square visible beneath, yuck!

Square visible beneath, yuck!

First, I opened the original SVG file for the external url icon in Inkscape. I had changed the 10×10 PNG to be transparent but the results were less than satisfactory and recoloring it would make it look worse. The SVG has just two objects – the square and the arrow above it. I removed the white fill on both objects to make them transparent, but didn’t like seeing the corner of the square peeking through the arrow.


Square with a difference

Square with a difference

Then, I created a new layer via Layer > Add Layer… and copied the arrow object into it, making sure the two arrows were exactly aligned on top of each other. I then hid the new layer, selected both the square and arrow, and selected Path > Difference from the menu. Simple!


Visited vers.

Visited version

Finished icon

Finished icon

Finally, I unhid the arrow layer and exported the image as a 10×10 PNG. I set the square to be the visited link color and picked something a shade lighter for the arrow (I didn’t fuss on that), and exported that as a 10×10 PNG as well.


I wanted the URL icons to appear only in the blog entries themselves but not if it’s a link to this site or a relative link so to finish, I changed the CSS from having a A.external_link definition to the following:

.entry_content A {
    background-image: url('images/url-external-trans.png');
    background-repeat: no-repeat;
    background-position: right top;
    padding-right: 13px;
}

.entry_content A:visited {
    background-image: url('images/url-external-trans-visited.png');
}

.entry_content A[href^="http://webgurus.com"],
.entry_content A[href^="http://new.webgurus.com"],
.entry_content A[href^="http://www.webgurus.com"],
.entry_content A[href^="/"],
.entry_content A[href^=".."],
.entry_content A[href^="javascript"]
{
    padding-right: 0px;
    background-image: none;
}

C’est fin! Any modern browser will display this link with an icon and this one without. At worst, any modern browser will a partial or broken implementation of CSS will either display the icon for all links or for none at all. I can live with either. But IE 7 is not quite a modern browser. If there was a link with a <br/> or one that wrapped over two lines, the icon was displayed in the wrong location, at the top right of the first line and not at the end of the link as other Mozilla and WebKit browsers do. I used a bit of jQuery to compare the link’s height with the line-height in CSS and removed the background image and appended a normal <img> if the link was broken up over more than one line.

Mozilla Labs Prism

Maybe I’m just too old school, but I’m struggling to see why Prism (found via gHacks) would be all that useful. How is this better than well-maintained set of bookmarks, bookmarklets, or links on a custom start page? Or how about Firefox’s AwesomeBar? No matter how much spin you put on it, Prism appears to me to be just a stripped down web browser. If it’s going to look like a desktop app and act like a desktop app, I want the code and data to be local like a desktop app – like Adobe AIR or XULRunner. Maybe it would make more sense if it was combined with Gears or HTML5′s proposed offline storage, but still, haven’t Gmail’s recent and historical pattern of downtimes show some of the vulnerabilities of having web-only services? Web services are not created equal. If Twitter shows the fail whale for hours, how much is really lost, compared to Gmail being down?

Like I said, I’m old school. I like my email app to just do email and a calendar and not IM’s or web browsing, and vice versa all around.

CMS experiments

And now, since the blog is done, I need something to manage the rest of the site: a proper content management system or framework. Currently, there’s only two static pages, the index page and the contact form, and two static pages is about the limit before a reasonable person should look into a CMS, even if he is using server side includes to be current with the latest 1995 technology.

The question is, what to use and how much? Many of the CMS’s out there would be overkill, and some of the frameworks would require too much work for just some simple pages and would be better suited for a web application. Based on previous projects or experiments, I am thinking of testing the following:

I think this is a nice selection – two each from PHP, Python and Perl and some more straight CMS and some more a framework. I’ve evaluated Django, Drupal and Mojo before, currently use WordPress and have used Catalyst at my job. I admit that is a strike against Catalyst because of how that project ended up, but that was more a problem with integration with the existing codebase than anything else.

The criteria is simple – how hard is it to make two simple pages, the index and a contact form, with an include of the blog posts on the index page? Bonus points if the contact form can be handled by the same framework instead of a separate CGI.

Any suggestions for one that I’ve missed?

37signals PRESS RELEASE

PRESS RELEASE: 37SIGNALS VALUATION TOPS $100 BILLION AFTER BOLD VC INVESTMENT

I am so glad that there are still people in this industry with a sense of humor and who can laugh at themselves. They are parodying, of course, the press releases where an Internet company (say, Facebook) announces they have raised VC money (say, $240 million from Microsoft in return for 1.6% of the company) and are now worth $15 billion, with a bit of an extra dig at Apple as well: “Also, everything we make will include a compass.”

It reminds me of years ago when I sent around to friends a fake press release announcing “record first quarter profits” after finding a quarter on the sidewalk. The sad thing is that $0.25 probably was more profit than half the dotcoms ever saw during that same time period.

I knew I’d forget one…

DD_roundies: Code-only rounded HTML boxes

I knew I wanted to have rounded corners on this site, but I also knew that they can be a pain to get working cross-browser. Firefox uses the -moz-border-radius property, Chrome and Safari -webkit-border-radius, and CSS3 compliant browsers are supposed to use border-radius but I have yet to see one that actually does. Usually, background images or rounded corners are sliced up and positioned via background properties but I wondered if there was an easier way that didn’t involve adding a mess of HTML “just” for rounded corners. The library linked above does that. It uses IE’s implementation of VML, a competing standard to SVG that only Microsoft supports. If a browser doesn’t support either VML or the Firefox/WebKit CSS properties, it gracefully downgrades to squared edges. (Opera, I’m looking at you)

Acknowledgements linkdump

I wanted to list all of the resources and sites I used for this redesign, before they were lost to the ether (aka the recesses of my Firefox history). In no particular order:

Webgurus.com officially relaunches!

We* are pleased to announce the official relaunch of webgurus.com!

About a month ago I found myself with more free time than I had anticipated, so I did what most people would do in that sort of situation: I took two weeks off to remove some badly-installed vinyl siding and repair and repaint a side of my house. Once that was complete and I had managed not to fall off of the scaffolding and give myself a pre-existing condition, I decided to rework my website. The design itself was around six years old and the content had been more or less static for most of the time. I had, in effect, let this site get middle-aged and go to seed. Now it was time to get on a treadmill or buy a sports car or something.

A while back I had been playing around with Illustrator and Inkscape and had created a background and color scheme that I thought was at least somewhat interesting. I quickly threw that together with an unused logo redesign I had made and took down the old crufty content. Goodbye, quirky advertising clip art from the 20s, 30s and 40s! (Don’t be sad, it will return in a future site to be named later)

I admit my first redesign (thankfully never published) was a little heavy on the jQuery. Too many things moving, too long of an animated intro. What was next, a rendering of a metal block spinning and burning down to a company logo? I decided to Keep It Simple, Stupid. I set about working on a second redesign, but for what purpose this time around? Well, why not start off with a blog and use that as a means to link to whatever experiments or projects? That seems simple enough.

I had had a blog around 9 years ago (back when people were still trying to decide between “web log”, “weblog” and “blog”) and had in fact written my own blogging platform, but this time around I decided I was going to just use WordPress. Why would a supposedly ‘webguru’ web developer do that? Simple. I didn’t want to spend the next year literally reinventing the wheel. Why bother with worrying about whether or not something was invented here when the real purpose was to engage in shameless self-promotion and to post funny pictures of cats? Once I had made my decision, I did not debate it. Such is the way of the samurai designer. It also gave me a chance to brush up on my PHP skills after years of working with Perl.

I also did not debate using some pre-packaged theme. Using this excellent tutorial as a starter and with help from the Codex, I modified the standard Kubrick theme to what you see now. And that’s how I spent my end-of-summer vacation. The End.

* Royal we, sorry, but force of habit

Redesign time!

We are in the middle of a complete makeover, scrub-down and refocus. More content will be available as soon as it gets converted.