Live data from Hacker News

Ben the Bodyguard: Gorgeous HTML5 Website

benthebodyguard.com

61–70 of 104 posts

Re: Ben the Bodyguard: Gorgeous HTML5 Website

#61
post #14

Calling it an “HTML5 website” is a bit of an overreaction IMHO. Other than the DOCTYPE, there’s not much “HTML5” to it. It’s just good old HTML, JavaScript and CSS, wrapped together in a document that happens to use the HTML5 DOCTYPE.

I've come around to accepting that anything conforming to the relevant standards can (and should) properly be called HTML5, even if it doesn't actually take advantage of anything that wasn't available in HTML4.

Re: Ben the Bodyguard: Gorgeous HTML5 Website

#62

Might want to start it scrolling automatically, or otherwise do a better job of communicating that there's anything to see on the page. I got all the way back here thinking it was just a pretty splash screen, after trying for 30 seconds to click on things above the fold with no success. Only after reading comments did I go back to see if there was anything I had missed. I suspect a lot of people clicking through will…

It works great on the iPhone - didn't think twice about scrolling and was quickly impressed

Re: Ben the Bodyguard: Gorgeous HTML5 Website

#63

Might want to start it scrolling automatically, or otherwise do a better job of communicating that there's anything to see on the page. I got all the way back here thinking it was just a pretty splash screen, after trying for 30 seconds to click on things above the fold with no success. Only after reading comments did I go back to see if there was anything I had missed. I suspect a lot of people clicking through will…

It works great on the iPhone - didn't think twice about scrolling and was quickly impressed

It's too bad the site doesn't use high resolution textures for the iPhone 4. The site looks far sharper on my Macbook.

Re: Ben the Bodyguard: Gorgeous HTML5 Website

#64
There are HTML comments in the JavaScript at the bottom of the source, sandwiched in between the GA tracking code and some Google optimizer stuff. I didn't get any JS errors, so is that legal? Are the comments stripped before the text content of the script element is processed? If so that's pretty wild! Never knew that was possible.

Re: Ben the Bodyguard: Gorgeous HTML5 Website

#65
post #64

There are HTML comments in the JavaScript at the bottom of the source, sandwiched in between the GA tracking code and some Google optimizer stuff. I didn't get any JS errors, so is that legal? Are the comments stripped before the text content of the script element is processed? If so that's pretty wild! Never knew that was possible.

Your browsers JS engine would not process the comments, there before it's valid.

Re: Ben the Bodyguard: Gorgeous HTML5 Website

#67

Might want to start it scrolling automatically, or otherwise do a better job of communicating that there's anything to see on the page. I got all the way back here thinking it was just a pretty splash screen, after trying for 30 seconds to click on things above the fold with no success. Only after reading comments did I go back to see if there was anything I had missed. I suspect a lot of people clicking through will…

What you need is a half-hidden line of text or graphic near the bottom screen-edge. only way to hint at scrolling.

Hardly 'the only way'. With a animated arrow jumping up and down one can hint at scrolling. And by slowly moving bottom parts up and down you can hint at scrolling.

Re: Ben the Bodyguard: Gorgeous HTML5 Website

#68
post #50

In case anyone's not familiar with Javascript/HTML/CSS and is curious how this works, it's actually pretty simple and elegant. Ben is just an image positioned in the centre of the screen using a CSS property called "position: fixed", which means he doesn't move even when the content scrolls. The walking animations are created using a technique called CSS sprites, where instead of having multiple images, you just crea…

Javascript's onscroll event is a wonderful tool. It's one of the best ways to leverage an extremely common and expected interaction pattern (scrolling down a web page) to do interesting and unexpected things. I used it to create a sort of paginated-persistent-bookmark navigation for my new portfolio site earlier this year (in profile, if you're curious).

Re: Ben the Bodyguard: Gorgeous HTML5 Website

#69
post #50

In case anyone's not familiar with Javascript/HTML/CSS and is curious how this works, it's actually pretty simple and elegant. Ben is just an image positioned in the centre of the screen using a CSS property called "position: fixed", which means he doesn't move even when the content scrolls. The walking animations are created using a technique called CSS sprites, where instead of having multiple images, you just crea…

Javascript's onscroll event is a wonderful tool. It's one of the best ways to leverage an extremely common and expected interaction pattern (scrolling down a web page) to do interesting and unexpected things. I used it to create a sort of paginated-persistent-bookmark navigation for my new portfolio site earlier this year (in profile, if you're curious).

Clickable: http://rclayton.net

I think it's very elegantly done. Kudos.

Re: Ben the Bodyguard: Gorgeous HTML5 Website

#70
post #64

There are HTML comments in the JavaScript at the bottom of the source, sandwiched in between the GA tracking code and some Google optimizer stuff. I didn't get any JS errors, so is that legal? Are the comments stripped before the text content of the script element is processed? If so that's pretty wild! Never knew that was possible.

In the bad old days of early web development, browsers that didn't understand the script tag would display your code in the document. They allowed html comments inside the script tag as a workaround for it. We always had to write

http://javascript.crockford.com/script.html

Post reply on HN