Showing posts with label User Interface. Show all posts
Showing posts with label User Interface. Show all posts

Wednesday, April 13, 2011

Create Rounded Corners And Gradient Images On The Fly!

I am often tasked with taking a mockup and branding a site. This usually involves a custom master page with tweaks to the CSS for the layout and color scheme. It also involves the creation of images used to compliment the UI, the holy grail for some being gradient images and rounded corners. For the amateur graphic designer like myself, this often becomes a tedious task that involves repetitive tweaks to an image. I once had a client tell me that I had the wrong shade of “pumpkin”. (Depending on your disposition, this could result in an act of either running full speed into a brick wall or rocking yourself to sleep every night.)
Enter the poorly named Web Designer Tool! After some experimentation with the System.Drawing and System.Drawing.Drawing2D .NET 2.0 classes, I figured out a way to generate these images on the fly. Now I can rapidly create rounded corners and gradients and don't have to sweat it if a client needs a color or hue adjusted. The rounded corners include many options, including width, height, gradient and solid colors, radius corner size, and border. I also provide a preview feature that integrates the images into a sample html page and launches it in your default browser. I have successfully tested this in IE 6.0 ~ 8.0, Chrome 10.0, and Firefox 4.0.
Note: Although this will fly in the face of CSS purists, I have decided to use a simple table based layout for the preview html. I do make an effort to use DIV based layouts for web design, but in this case I have yet to find approach that works flawlessly across browsers types and versions or that integrates nicely with SharePoint. If you are that CSS guru, I welcome you to take these images and come up with a better approach. If you are successful, I would love to try out your code. You are also welcome to use my Shapes.cs class below and build your own tool. Life will be much easier once CSS 3 has reached enough market penetration and we can simply use the border-radius property.


Sunday, March 30, 2008

The Raconteurs Home Page - Sweet, Sweet DOS 1.1 User Interface

I usually limit myself to things purely technical on this blog, but this was a little cool to pass up and is somewhat technical in nature. The Raconteurs have created their web site using a user interface reminiscent of something circa the early 80's. Looking at the page source, it is done mostly using Macromedia Flash. Disregarding the evil splash page, JavaScript errors, and possible copyright infringements (oh my!), there is truly something wonderful about this minimalist approach. What's the point of being so pretentious when you are only providing basic information? Far too many web sites are bloated with ubiquitous links and ads, and provide for a truly miserable user experience. Needless to say, it would have been way cooler (and no doubt, achievable) if they could have done this using only HTML, JavaScript, and CSS. By the way, if you haven't already, check out the their new album. This is true and unadulterated rock n' roll.

Splash Page

image

Home Page

image

DOS 1.10 - Notice the dates 1981, 1982.

image