Twitter Bootstrap

I haven’t had the time to take a closer look at it until now, but Twit­ter Boot­strap looks really promis­ing. I think I am going to try it out in a cou­ple of upcom­ing projects.

Any­way, here’s the link: Twit­ter Bootstrap

Also, I hap­pened to stum­ble upon an icon font, based on the icons from Twit­ter Boot­strap. Appar­ently, this font should be com­pat­i­ble with the upcom­ing Twit­ter Boot­strap 2.0. Font Awe­some.

What is your expe­ri­ence with Bootstrap?

Placehold.it

Netsans Rocks!Placehold.it is a sim­ple place­holder ser­vice for when you need place­holder images in html mock­ups. Just use the http://placehold.it/ url as the source in your image tag, fol­lowed by some para­me­ters to set the size, text, color etc.

Like this:

<img src="http://placehold.it/300x150&text=netsans+rocks!" />

Very clever and useful.

Easter Egg at Treehouse

Team Treehouse's laptop illustrationI was just tak­ing a peek at Ryan Carson’s Tree­house and then I stum­bled upon a lit­tle easter egg. Did you find it yet?

Try click­ing the track­pad on the lap­top illus­tra­tion and see what happens.

A Bunch of Responsive Tools

Respon­sive Menu
Design­ing nav­i­ga­tion with more than 4 links on mobile devices will quickly prove to be a chal­lenge if you try to set­tle with CSS and media queries. In “Adap­tive Web Design” Aaron Gustafson pro­poses trans­form­ing the usual ordered or unordered list of nav­i­ga­tional links into a <select> drop down menu with JavaScript. Matt Ker­s­ley has turned that approach into a very use­ful jQuery plu­gin, which turns an ordi­nary list of links into a drop down below a spec­i­fied screen size.
You can get it on Github here: jQuery Respon­sive Menu Plugin

Test your respon­sive design
Also, if you want to test your respon­sive web design, you can try it out in Matt Kersley’s Respon­sive Web Design Test­ing Tool. Other than it’s test­ing abil­ity, this tool is a great ref­er­ence for remem­ber­ing the most com­mon breakpoints.

Dynamic Carousel
There are lots and lots of jQuery carousel, image slid­ers and gallery plu­g­ins out there on teh inter­webs, but they are rarely respon­sive. Mat Mar­quis has made a respon­sive one, which scales beau­ti­fully and works pretty well.
You can get it on Github here: Dynamic Carousel 

Style Tiles and Responsive Web Design

I used to start out my web design comps in Pho­to­shop. How­ever, design­ing for respon­sive­ness makes it a bit of a chal­lenge. Because what do you do, when your design needs 5 or 6 break­points? Do you make 5 or 6 dif­fer­ent comps of every page? And what about the states between the breakpoints?

Design­ing in the browser
Some would argue that you should start your designs directly in the browser. A ratio­nal approach, which also does a bet­ter job of elim­i­nat­ing the trou­ble with explain­ing, why your pixel-perfect design does not look the same in every browser. How­ever, design­ing in the browser is also an approach that may some­what limit cre­ativ­ity.

Start­ing out with Style Tiles
So before you even start your comp, maybe you should start some­where else. Get­ting the look and feel right before design­ing a full page lay­out may be helpful.

Saman­tha War­ren pro­poses using “Style Tiles” as a tool to help with team and client com­mu­ni­ca­tion. A Style Tile is a design deliv­er­able con­sist­ing of fonts, col­ors and inter­face ele­ments that com­mu­ni­cate the essence of a visual brand for the web:

Style Tiles are sim­i­lar to the paint chips and fab­ric swatches an inte­rior designer gets approval on before design­ing a room.
 An inte­rior designer doesn’t design three dif­fer­ent rooms for a client at the first kick-off meet­ing, so why do Web design­ers design three dif­fer­ent web­page mockups?

Saman­tha Warren

Go check out Saman­tha Warren’s clever take on design­ing for the web at Styletil.es. You can also grab a neat pho­to­shop tem­plate for mak­ing your own Style Tiles.

Luke Wroblewski on Mobile First at Drupalcon Denver

Are you still won­der­ing why you should design and develop for mobile first? If you can spare the best part of an hour, it is worth check­ing out Luke Wroblewski’s keynote at Dru­pal­con Den­ver 2012. It is both infor­ma­tive and enter­tain­ing, and I am shure, it will kill your doubt instantly.

Luke Wroblewski’s keynote on Mobile First

Navigation patterns in mobile web design

When design­ing for mobile, size mat­ters. You have a lim­ited amount of screen real estate to work with on small dis­plays, mak­ing it impor­tant to free up as much space as pos­si­ble to con­vey your mes­sage. Thus, nav­i­ga­tion should not take up too much space. So where do you put that navigation?

Brad Frost has done a lit­tle research on dif­fer­ent approaches to design­ing nav­i­ga­tion for respon­sive web sites. In “Respon­sive Nav­i­ga­tion Pat­terns” he takes a look the pros and cons of these, giv­ing exam­ples and links to use­ful resources.

Go read “Respon­sive Nav­i­ga­tion Pat­terns” here.

Invaluable online CSS generators

CSS3 lets us build really nice look­ing things, but let’s face it, the code does tend to get at bit bloated, when we have to repeat every­thing for each ven­dor pre­fix. Appar­ently, ven­dor pre­fixes are also hard to remem­ber, given the cur­rent debate on cer­tain browser ven­dors’ plans of imple­ment­ing the –webkit pre­fix. Or maybe some devel­op­ers are just too lazy writ­ing all that code? Nonethe­less, some parts of the CSS3 syn­tax is also really hard to remem­ber. At least I have a hard time remem­ber­ing the syn­tax for CSS3 gradients.

How­ever, I am get­ting really good help from a hand­ful of online tools. They do a great job of remem­ber­ing the syn­tax for me and mak­ing other tasks a bit eas­ier as well. Here is a list of the online CSS gen­er­a­tors, I use the most.

Pre­fixr and –pre­fix– my css

Repeat­ing every prop­erty for every browser ven­dor can be a pain in the neck. Just write the stan­dard CSS3 prop­er­ties and then paste them into either Pre­fixr or –pre­fix– my css. They both take care of the nec­es­sary pre­fixes, out­putting the code for you to copy and paste.

CSS3Generator

Don’t remem­ber which pre­fixes are nec­es­sary for box-shadow or border-radius? Try cre­at­ing your CSS3 effects with this handy tool.

ColorZilla’s Ulti­mate CSS Gra­di­ent Generator

This gra­di­ent gen­er­a­tor makes it really easy to cre­ate gra­di­ent back­grounds, min­i­miz­ing your need of Pho­to­shop for the same pur­pose. It includes all the nec­es­sary pre­fixes. Copy and paste, and you’re good to go.

0 to 255

This color gen­er­a­tor actu­ally does noth­ing in terms of CSS3. It just makes life a lot eas­ier, when it comes to find­ing lighter and darker hues of a cer­tain color.

Animate.css

If you are not yet ready to write your own or just want to make it easy, Dan Eden’s Animate.css is a col­lec­tion of CSS3 ani­ma­tions for you to pick and choose from. If there are none you like, he has even made it easy to cre­ate a cus­tom build, so you don’t even have to write a sin­gle char­ac­ter by hand.

Grid­pak

Grid­pak is a repon­sive grid gen­er­a­tor for mak­ing fluid lay­outs, com­plete with media queries and ready for mobile. Math­e­mat­i­cal skills are not needed here, because it cal­cu­lates the gut­ter– and col­umn widths on the fly.

Do you use any great online CSS tools or gen­er­a­tors, you would like to share? I’d like to hear about it.

Making WordPress image management easier for your editors

I am man­ag­ing a Word­Press site with a lot of edi­tors and con­trib­u­tors. They are not all equally up to pace with Word­Press and how it works, or at least they have dif­fer­ent ways of doing things. One thing that has proved to be a chal­lenge is the way Word­Press han­dles thumb­nails. My edi­tors and con­trib­u­tors often miss the ‘set as post thumb­nail’ link,  lead­ing to the lack of thumb­nails on the front page.

In this post I will try to explain, how I have made a fall­back, mak­ing it sort of OK for my users to for­get about the thumbnail.

A lit­tle history

Once upon a time, before ver­sion 2.9, Word­Press did not sup­port post thumb­nails. But there were work arounds. One of the best, I ever found, was from a web­site called wp-fun.co.uk. Sadly, the site is gone today, but I man­aged to dig up the old post ‘Easy Peasy Images Sug­ges­tion Roundup’ by Andrew Rick­mann on Archive.org.

Andrew wrote a nice lit­tle PHP class to include in your func­tions file, which gets the first thumb­nail image attach­ment from Word­Press posts. Luck­ily, I also man­aged to dig that one up on Archive.org. Go grab it here: post_imagephp.txt (remem­ber to rename .txt to .php, before includ­ing it in your functions.php file).

So why are You telling me about antiques like this?”, You ask. Because we can use it with advan­tage in our fall­back for peo­ple, who for­get to click the lit­tle ‘set as post thumb­nail’ link.

That way, a thumb­nail will still be dis­played with the post, as long as the edi­tor has just attached an image. If there are no images attached at all, we can always dis­play a default thumbnail.

The fall­back

Let’s take a peek at the code. Put the fol­low­ing where you would nor­mally use the_post_thumbnail().

<?php
// First of all, check if there are any image attachments at all.
$imgargs = array(
'order' => 'ASC',
'post_type' => 'attachment',
'post_parent' => $post->ID,
'post_mime_type' => 'image',
'post_status' => null,
'numberposts' => -1,
);
$attachments = get_posts($imgargs);
// Next, check if there is a manually chosen thumbnail.
if ( has_post_thumbnail() ) {
the_post_thumbnail('thumbnail');
}
// If there are no manually chosen thumbnails, check if there is an image attachment.
elseif ( $attachments ) {
// If there is an image attachment, call Andrew Rickmanns the_image function to get the thumbnail
the_image('thumbnail','attachment-thumbnail wp-post-image',false,false,true);
} else {
// If there are no attachments at all, display a default thumbnail.
?><img class="attachment-thumbnail wp-post-image" alt="" src="<?php bloginfo('stylesheet_directory'); ?>/the/path/to/your/image.jpg" />
<?php }?>

Require­ments:

Remem­ber to include this file, renamed to .php, in your functions.php: post_imagephp.txt

Icon Fonts

Webfont specimenRespon­sive Design is the new black for web design­ers. But with respon­sive design comes a lot of chal­lenges. One of them is to make ui icons scale with the rest of your lay­out. How­ever, icon fonts is a promis­ing solu­tion in its infancy.

Icon fonts are vec­tor based graph­ics and are able to scale indef­i­nitely with­out los­ing qual­ity, as opposed to the more well known and com­mon pixel based icons. But icon fonts are also tied to char­ac­ters and this is where the chal­lenges come in, when we want them dis­played cor­rectly with­out mak­ing too much trou­ble in screen read­ers or screen scrapers.

I have been col­lect­ing a few resources on the topic.

Using Icon Fonts
Besides being a ser­vice, that offers a nice col­lec­tion of scal­able icons, Pic­tos also has a great arti­cle on the pros and cons of icon fonts and how to use them.

Icon Fonts are Awe­some
Chris Coyier of CSS-tricks.com has put together a nifty exam­ple, where he demon­strates how easy it is to scale, col­orize and shape the shadow of icon fonts with plain and sim­ple CSS.

How to make your own icon web­font
Over at Web­de­signer Depot, Hey­don Pick­er­ing has writ­ten a tuto­r­ial on what makes a good icon and how to turn it into a webfont.

Icon Fonts
Finally, if you are not yet ready to make your own icon font, Font Squir­rel has a small col­lec­tion of free icon fonts, also avail­able as @font-face kits. Go grab ‘em and try them out.