HTML5 Boilerplate Build Script: no manifest.appcache generated!

The HTML5 Boilerplate build script can auto generate your manifest.appcache file but it doesn’t out of the box.

Slightly hidden away in the docs:

To enable the appcache, just uncomment the file.manifest line in the project.properties file. It’ll create a manifest.appcache file and wire it all up.

You’ll find the project.properties file in build/project.

Now just do ant build and your HTML5 manifest file will be created and automatically referenced in your HTML file.

iOS: shouldAutorotateToInterfaceOrientation / Lock Orientation in PhoneGap

Starting in PhoneGap 0.9.5 there’s an undocumented iOS only feature that allows you to handle whether the device should rotate to a particular orientation. It exposes the iOS Objective-C method shouldAutorotateToInterfaceOrientation with a JavaScript function shouldRotateToOrientation.

function shouldRotateToOrientation (rotation) {
    switch (rotation) {
        //Portrait or PortraitUpsideDown
        case 0:
        case 180:
            return true;
        //LandscapeRight or LandscapeLeft
        case 90:
        case -90:
             return false;
    }
}

This needs to be in the global scope of your JavaScript and will get called before any rotations occur, so keep it lean to avoid locking up the UI. Returning true allows the device to rotate, returning false prevents it.

Works great in your HTML5 iOS, iPhone and iPad apps, sadly currently there’s no Android or other platform integration. Hopefully we’ll see a cross-platform method soon!

Katamari Hack


The winner of the 2011 Yahoo HackU contest at University of Washington, this is so cool.

Click here to activate the Katamari Damacy effect.

You can also install it as a bookmarklet by dragging: Katamari to your bookmarks bar.

It uses CSS3 transforms and html5 canvas to do this awesome effect.

Hats off to the developers, this works seamlessly. Checkout the javascript source code to see how they’re doing it or find out more on kathack.com

Site Seeing – Week Four

Google Font Directory

https://fonts.google.com/

Bit late to the party with this one, but the Google Font Directory has some great open source fonts that can be included in your webpages incredibly easily. They host the whole solution and it’s a few basic lines of CSS to get some fancy fonts on your site. My personal favourites include Inconsolata and Lobster.

Experimental Gummy Bear Surgery

http://www.likecool.com/Experimental_Gummy_Bear_Surgeries–Other–Gear.html

Some great gummy bear transpants!

Experimental Gummy Bear Surgeries

Experimental Gummy Bear Surgeries

For Zebras

http://spudcomics.com

Think the photo says it all, check out Spud Comics for more.

For zebras it's not a party until someone brings the barcode scanner cartoon

by Lonnie Easterling