<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>HTML 5 stars</title>
	
	<link>http://html5stars.com</link>
	<description>playground for new standards</description>
	<lastBuildDate>Sat, 15 Oct 2011 17:27:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/html5stars" /><feedburner:info uri="html5stars" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:browserFriendly></feedburner:browserFriendly><item>
		<title>JS PubSub enhanced</title>
		<link>http://html5stars.com/?p=132&amp;utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=js-pubsub-enhanced</link>
		<comments>http://html5stars.com/?p=132#comments</comments>
		<pubDate>Fri, 14 Oct 2011 01:13:12 +0000</pubDate>
		<dc:creator>standup75</dc:creator>
				<category><![CDATA[HTML5 News]]></category>

		<guid isPermaLink="false">http://html5stars.com/?p=132</guid>
		<description><![CDATA[Create independant module with a nice jQuery superclass, using PubSub]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fhtml5stars.com%2F%3Fp%3D132"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fhtml5stars.com%2F%3Fp%3D132&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p><strong>This is not exactly HTML5 related, but it&#8217;s what I call the bof (backend of the frontend), and helped me a lot getting things clean and organized.</strong><br/><br/></p>
<p>I was working on a project which had a very heavy front-end. It was relying on several back-ends I was taking information from and consolidating on the front-end. The front-end has several modules, and one or more needed to be updated every time I receive data. I can imagine a HTML5 game having the same kind of problematic where modules need to communicate but stay independent</p>
<p><a href="http://standupweb.net/welcome/js/eventer.js">Here</a> is my (jQuery) solution, a small piece of js that I call <a href="http://standupweb.net/welcome/js/eventer.js">eventer</a></p>
<p>Let&#8217;s take an example.</p>
<p><a style="display: block; overflow:auto" href="http://html5stars.com/wp-content/uploads/2011/10/eventer_example.jpg"><img src="http://html5stars.com/wp-content/uploads/2011/10/eventer_example.jpg" alt="" title="eventer_example" width="700" height="300" class="alignright size-full wp-image-133" /></a><br/><br />
The game is handled in game.js which has a function that scores points:<br />
<br/></p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">var game = game || Eventer.extend({<br />
scorePoints: function(score) {<br />
$.publish(&quot;SCORE_UPDATED&quot;, score);<br />
},<br />
init: function() {<br />
// the game here<br />
}<br />
});</div></td></tr></tbody></table></div>
<p>You add the Event at the beginning of eventer.js</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">var customEventList = [&quot;SCORE_UPDATED&quot;];</div></td></tr></tbody></table></div>
<p>now you can just create a function onScoreUpdated in a class called (for example) userInfo:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">var userInfo = userInfo || Eventer.extend({<br />
onScoreUpdated: function(score) {<br />
&nbsp; // code to update the DOM with the new score like:<br />
&nbsp; $(&quot;#score&quot;).text(score);<br />
},<br />
init: function() {<br />
// the user info module here<br />
}<br />
});</div></td></tr></tbody></table></div>
<p>So you don&#8217;t need to explicitly link the event with the onScoreUpdated function, eventer is doing that for you, camelize the name of the event, add on, and look for a function with that name</p>
<p>Your modules become very independant and easy to handle</p>
<p>Hope that can help</p>
]]></content:encoded>
			<wfw:commentRss>http://html5stars.com/?feed=rss2&amp;p=132</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upload images and resize</title>
		<link>http://html5stars.com/?p=122&amp;utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=upload-images-and-resize</link>
		<comments>http://html5stars.com/?p=122#comments</comments>
		<pubDate>Fri, 05 Nov 2010 18:38:48 +0000</pubDate>
		<dc:creator>standup75</dc:creator>
				<category><![CDATA[HTML5 News]]></category>

		<guid isPermaLink="false">http://html5stars.com/?p=122</guid>
		<description><![CDATA[
			
				
			
		
I am looking into ways to upload images and resize them. I had a straightforward php implementation, everything is done on the server by a script, it is using the cache and works fine. But we are afraid we are going to quickly run into a bottleneck, you need a good size server for only [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fhtml5stars.com%2F%3Fp%3D122"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fhtml5stars.com%2F%3Fp%3D122&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>I am looking into ways to upload images and resize them. I had a straightforward php implementation, everything is done on the server by a script, it is using the cache and works fine. But we are afraid we are going to quickly run into a bottleneck, you need a good size server for only a couple of pictures/sec. So I looked on the internet and I found 2 services that offer resizing and transfer to a S3 bucket. These services are <a href="http://transloadit.com">transloadit.com</a> and <a href="http://www.uploadjuicer.com/">uploadjuicer.com</a>. Both offer a free test account, so far I have tried only transloadit, because it has more documentation and the concept of assembly is really easy to grasp. Uploadjuicer only has a getting started guide based on examples, no further reference documentation or support homepage. Plus, unless you are uploading very heavy pictures, it seems to me that transloadit is cheaper and the test account (5GB) allows more testing than uploadjuicer (100 images). Well, both services are in beta, but uploadjuicer is VERY recent, so let&#8217;s hope they will give us more documentation to let us try their services without wasting time. On the up side, uploadjuicer has a nice integration with rails, which is my favorite server side framework. Anyway, I tried only transloadit for now and I found out that their support team is very responsive, even proactive. You can have your system up and running in a matter of a couple of hours. Just the time you need to understand their system of &#8220;assemblies&#8221;.</p>
<p>So, I started by opening m amazon S3 account, create a bucket, and retrieve my API key and secret from my amazon account setting. Then I opened a test account at transloadit and started writing a test script.</p>
<p>The assembly is a JSON object you are putting in the value of a hidden input field of the upload form. This is where you are defining the different resize operations before sending the images into your S3 bucket. Here is the assembly example I worked on:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">{<br />
&nbsp; &nbsp; auth:{key:&quot;4cd1d373da5044cdb5822afc72ec3211&quot;}<br />
&nbsp; , steps:<br />
&nbsp; &nbsp; &nbsp; { thumb1:<br />
&nbsp; &nbsp; &nbsp; &nbsp; { robot: &quot;/image/resize&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; , width: 320<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; , thumb2:<br />
&nbsp; &nbsp; &nbsp; &nbsp; { use: &quot;:original&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; , robot: &quot;/image/resize&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; , width: 160<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; , store:<br />
&nbsp; &nbsp; &nbsp; &nbsp; { use: [&quot;:original&quot;, &quot;thumb1&quot;, &quot;thumb2&quot;]<br />
&nbsp; &nbsp; &nbsp; &nbsp; , robot: &quot;/s3/store&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; , bucket: &quot;your_bucket&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; , key: &quot;your_s3_key&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; , secret: &quot;your_s3_secret&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; }<br />
&nbsp; , redirect_url:&quot;http://localhost:3000/uploading&quot;<br />
&nbsp; , notify_url:&quot;http://standupweb.net/uploaded.php?user=stan&quot;<br />
&nbsp; };</div></td></tr></tbody></table></div>
<p>The notify URL is key.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">notify_url:&quot;http://standupweb.net/uploaded.php?user=stan&quot;</div></td></tr></tbody></table></div>
<p>That is where I will save the image filename in the database and link it to the user (or other data like location, date&#8230;) so that I can easily reuse/browse the images from my server. This assembly needs to be HTML entitized and put inside the value attribute of the hidden input field, thus becomes pretty unreadable. I have written a short javascript to not worry about that, here is my complete example:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br />42<br />43<br />44<br />45<br />46<br />47<br />48<br />49<br />50<br />51<br />52<br />53<br />54<br />55<br />56<br />57<br />58<br />59<br />60<br />61<br />62<br />63<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &nbsp; &lt;form id=&quot;MyForm&quot; action=&quot;http://api2.transloadit.com/assemblies&quot; enctype=&quot;multipart/form-data&quot; method=&quot;POST&quot;&gt;<br />
&nbsp; &nbsp; &nbsp; &lt;input id=&quot;transloaditMsg&quot; type=&quot;hidden&quot; name=&quot;params&quot; /&gt;<br />
&nbsp; &nbsp; &nbsp; &lt;input type=&quot;file&quot; name=&quot;my_file&quot; multiple=&quot;multiple&quot; /&gt;<br />
&nbsp; &nbsp; &nbsp; &lt;input type=&quot;submit&quot; value=&quot;Upload&quot;&gt;<br />
&nbsp; &nbsp; &lt;/form&gt;<br />
&lt;script&gt;<br />
&nbsp; // from http://www.davidpirek.com/blog/object-to-string-how-to-deserialize-json<br />
&nbsp; function objectToString(o){<br />
&nbsp; &nbsp; &nbsp; var parse = function(_o){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var a = [], t;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for(var p in _o){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(_o.hasOwnProperty(p)){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; t = _o[p];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(t &amp;&amp; typeof t == &quot;object&quot;){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (t.constructor.toString().indexOf(&quot;Array&quot;) != -1) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var arrayString = &quot;\&quot;&quot; + p + &quot;\&quot;:[&quot;, nbEls = t.length;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for (var i=0; i&lt;nbEls; i++) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; arrayString += &quot;\&quot;&quot; + t[i] + &quot;\&quot;&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (i+1&lt;nbEls) arrayString += &quot;, &quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; a[a.length]=arrayString+&quot;]&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } else {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; a[a.length]= &quot;\&quot;&quot; + p + &quot;\&quot;:{ &quot; + arguments.callee(t).join(&quot;, &quot;) + &quot;}&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } else {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(typeof t == &quot;string&quot;){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; a[a.length] = [ &quot;\&quot;&quot;+p+ &quot;\&quot;: \&quot;&quot; + t.toString() + &quot;\&quot;&quot; ];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } else {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; a[a.length] = [ &quot;\&quot;&quot;+p+ &quot;\&quot;: &quot; + t.toString()];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return a;<br />
&nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; return &quot;{&quot; + parse(o).join(&quot;, &quot;) + &quot;}&quot;;<br />
&nbsp; }<br />
<br />
&nbsp; var transloaditMsg = {<br />
&nbsp; &nbsp; auth:{key:&quot;4cd1d373da5044cdb5822afc72ec3211&quot;}<br />
&nbsp; , steps:<br />
&nbsp; &nbsp; &nbsp; { thumb1:<br />
&nbsp; &nbsp; &nbsp; &nbsp; { robot: &quot;/image/resize&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; , width: 320<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; , thumb2:<br />
&nbsp; &nbsp; &nbsp; &nbsp; { use: &quot;:original&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; , robot: &quot;/image/resize&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; , width: 160<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; , store:<br />
&nbsp; &nbsp; &nbsp; &nbsp; { use: [&quot;:original&quot;, &quot;thumb1&quot;, &quot;thumb2&quot;]<br />
&nbsp; &nbsp; &nbsp; &nbsp; , robot: &quot;/s3/store&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; , bucket: &quot;PhotoSafari&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; , key: &quot;AKIAILQMUSNT3WCINDKQ&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; , secret: &quot;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&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; }<br />
&nbsp; , redirect_url:&quot;http://localhost:3000/uploading&quot;<br />
&nbsp; , notify:&quot;http://standupweb.net/uploaded.php&amp;user=stan&quot;<br />
&nbsp; };<br />
&nbsp; document.getElementById(&quot;transloaditMsg&quot;).setAttribute(&quot;value&quot;, objectToString(transloaditMsg));<br />
&lt;/script&gt;</div></td></tr></tbody></table></div>
<p>The only HTML5 part of this blog post is the fact that I am using the multiple attribute on the file input field that is supported by transloadit.</p>
<p>My need is a service to upload and resize images, but transloadit can also help out encoding, extracting thumbnails from video, it&#8217;s just another assembly rule using another robot.</p>
]]></content:encoded>
			<wfw:commentRss>http://html5stars.com/?feed=rss2&amp;p=122</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to save your canvas on the web server?</title>
		<link>http://html5stars.com/?p=99&amp;utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=how-to-save-your-canvas-on-the-web-server</link>
		<comments>http://html5stars.com/?p=99#comments</comments>
		<pubDate>Wed, 26 May 2010 15:09:58 +0000</pubDate>
		<dc:creator>standup75</dc:creator>
				<category><![CDATA[HTML5 News]]></category>
		<category><![CDATA[HTML5 Playground]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[base64]]></category>
		<category><![CDATA[canvas]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[todataurl]]></category>
		<category><![CDATA[xhr]]></category>

		<guid isPermaLink="false">http://html5stars.com/?p=99</guid>
		<description><![CDATA[
			
				
			
		
Here is my PHP/mootools HTML5 tutorial to save your canvas on your web server. Click here to view the demo.On a side note, for the people who read this post, since this demo is using Canvas, this is a level 3 HTML5 implementation, but since we are also using todataurl, and xhr.send, this is a [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fhtml5stars.com%2F%3Fp%3D99"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fhtml5stars.com%2F%3Fp%3D99&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Here is my PHP/mootools HTML5 tutorial to save your canvas on your web server. <a href="http://standupweb.net/canvas/swSaveCanvas.php">Click here</a> to view the demo.<br/>On a side note, for the people who read <a href="http://html5stars.com/?p=66">this post</a>, since this demo is using Canvas, this is a level 3 HTML5 implementation, but since we are also using todataurl, and xhr.send, this is a level 4 HTML5 implementation</p>
<p><a href="http://standupweb.net/canvas/swSaveCanvas.php"><img src="http://html5stars.com/wp-content/uploads/2010/05/saveCanvas1.png" alt="http://standupweb.net/canvas/swSaveCanvas.php" title="http://standupweb.net/canvas/swSaveCanvas.php" width="680" height="307" class="size-full wp-image-103" /></a><br/><br/></p>
<h1>integration</h1>
<p>First let&#8217;s prepare everything to make the plugin work, then I&#8217;ll explain how the plugin is working.<br />
Note that all the files can be found in this package: <a href="http://standupweb.net/canvas/package/swSaveCanvas.zip">download</a></p>
<h3>1.HTML/CSS</h3>
<p>As you can see in the file swSaveCanvas.php, we need 3 elements in the HTML for the mootools class swSaveCanvas to work:</p>
<ul>
<li>
<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">'ajax-action'</span>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span></div></td></tr></tbody></table></div>
<p>Element where the progress/status of the upload will be displayed.</li>
<li>
<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/button.html"><span style="color: #000000; font-weight: bold;">button</span></a> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">'save'</span> &gt;</span>save it!<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/button.html"><span style="color: #000000; font-weight: bold;">button</span></a>&gt;</span></div></td></tr></tbody></table></div>
<p>Button to save (i.e. upload) the canvas</li>
<li>
<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;canvas <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;swCanvas&quot;</span> <span style="color: #000066;">width</span><span style="color: #66cc66;">=</span><span style="color: #cc66cc;">320</span> <span style="color: #000066;">height</span><span style="color: #66cc66;">=</span><span style="color: #cc66cc;">240</span>&gt;&lt;<span style="color: #66cc66;">/</span>canvas&gt;</span></div></td></tr></tbody></table></div>
<p>The Canvas element</li>
</ul>
<h3>2.Javascript</h3>
<p>you need to include mootools, swSaveCanvas.js and instantiate a swSaveCanvas object:</p>
<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;lib/mootools/mootools-1.2.4-core-jm.js&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;js/swSaveCanvas.js&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">'text/javascript'</span>&gt;</span><br />
&nbsp; &nbsp;window.addEvent('domready',function() {<br />
&nbsp; &nbsp; &nbsp; var scObj = new SwSaveCanvas('swCanvas', 'save'); <br />
&nbsp; &nbsp;});<br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a>&gt;</span></div></td></tr></tbody></table></div>
<h3>3. PHP</h3>
<p>On the server side we need to catch the file, decode it and save it. The decode part is because the js is generating a base64 encoded string and PHP will need to retrieve the binary content of it, here is how you can achieve within a few lines of script:</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?php</span><br />
&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">function</span> decode<span style="color: #009900;">&#40;</span><span style="color: #000088;">$tmpname</span><span style="color: #339933;">,</span> <span style="color: #000088;">$filename</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000088;">$tmpFile</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/fopen"><span style="color: #990000;">fopen</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$tmpname</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'r'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000088;">$file</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/fopen"><span style="color: #990000;">fopen</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$filename</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'w'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><a href="http://www.php.net/feof"><span style="color: #990000;">feof</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$tmpFile</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a href="http://www.php.net/fwrite"><span style="color: #990000;">fwrite</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$file</span><span style="color: #339933;">,</span> <a href="http://www.php.net/base64_decode"><span style="color: #990000;">base64_decode</span></a><span style="color: #009900;">&#40;</span><a href="http://www.php.net/fread"><span style="color: #990000;">fread</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$tmpFile</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">8192</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; <a href="http://www.php.net/fclose"><span style="color: #990000;">fclose</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$file</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <a href="http://www.php.net/fclose"><span style="color: #990000;">fclose</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$tmpFile</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;<span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp;<span style="color: #000088;">$arrfile</span><span style="color: #339933;">=</span><span style="color: #000088;">$_FILES</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;<span style="color: #000088;">$tmpname</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$arrfile</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'tmp_name'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;<span style="color: #000088;">$upload_file</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;path/of/the/file.jpg&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/is_uploaded_file"><span style="color: #990000;">is_uploaded_file</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$tmpname</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; decode<span style="color: #009900;">&#40;</span><span style="color: #000088;">$tmpname</span><span style="color: #339933;">,</span> <span style="color: #000088;">$upload_file</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;<span style="color: #009900;">&#125;</span><br />
<span style="color: #000000; font-weight: bold;">?&gt;</span></div></td></tr></tbody></table></div>
<h1>explanations</h1>
<p>How does that work? We are using 2 key mechanism available in HTML5:</p>
<ul>
<li>get the data from the canvas: The key part of the swSaveCanvas class is here:</p>
<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">self.canvasEl.toDataURL('image/'+type)</div></td></tr></tbody></table></div>
<p>, that is where we encode the canvas in base64. Once we have this we can build a multipart request according to RFC2388</li>
<li>send binary content in an ajax request: Now that we have our request we send it using
<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">XMLHttpRequest.send()</div></td></tr></tbody></table></div>
<p>. It works on Firefox 3.6 using send() or sendAsBinary(), but sendAsBinary does not work on Safari. Send works fine with Safari. Chrome does not send the correct data, it sends ASCII instead of binary I guess, and does not understand sendAsBinary. Part from that I also could not have this working on IE (with exCanvas), nor on opera. If anyone has an idea, it is more than welcome!</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://html5stars.com/?feed=rss2&amp;p=99</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Canvas or SVG?</title>
		<link>http://html5stars.com/?p=91&amp;utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=canvas-or-svg</link>
		<comments>http://html5stars.com/?p=91#comments</comments>
		<pubDate>Tue, 18 May 2010 22:38:17 +0000</pubDate>
		<dc:creator>standup75</dc:creator>
				<category><![CDATA[HTML5 News]]></category>
		<category><![CDATA[canvas]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[svg]]></category>

		<guid isPermaLink="false">http://html5stars.com/?p=91</guid>
		<description><![CDATA[
			
				
			
		
This is our HTML5 alternative to flash for the visual components on our websites. First, one good news, although the first previews of IE9 only show implementation of SVG, Microsoft does want to implement Canvas as well, and is doing some proofs of concept for the moment (see  IEBlog ).
So, for the readers who [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fhtml5stars.com%2F%3Fp%3D91"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fhtml5stars.com%2F%3Fp%3D91&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>This is our HTML5 alternative to flash for the visual components on our websites. First, one good news, although the first previews of IE9 only show implementation of SVG, Microsoft does want to implement Canvas as well, and is doing some proofs of concept for the moment (see <a href="http://blogs.msdn.com/ie/archive/2010/03/09/Working-with-the-HTML5-Community.aspx"> IEBlog </a>).<br/><br />
So, for the readers who want a quick and straight forward answer:<br/><br />
- If you are doing graphs, maps, simple animations based on vectors or anything that can be rendered with vectors: Use SVG, you will be able to import your vector graphics done with illustrator, and manipulate it the way you want<br/><br />
- If you are doing animations with effects, bitmap manipulation, games&#8230; use Canvas.<br/><br />
I think it is going to be obivous, but it&#8217;s still new technologies and it&#8217;s good to have a quick reference as to when to use what. If you want a more in depth comparison go <a href="http://www.borismus.com/canvas-vs-svg-performance/">here</a><br/><br />
<a href="http://html5stars.com/wp-content/uploads/2010/05/canvasvssvg.jpg"><img src="http://html5stars.com/wp-content/uploads/2010/05/canvasvssvg.jpg" alt="" title="canvasvssvg" width="576" height="301" class="aligncenter size-full wp-image-93" /></a><br />
<strong>Good resources to start with canvas</strong> I, personally followed the Mozilla Canvas (<a href="https://developer.mozilla.org/en/Canvas_tutorial">here</a>) and found also this <a href="http://diveintohtml5.org/canvas.html#divingin">article</a> being very useful.<br/><br />
<strong>Good resources to start with SVG</strong> Find a good tutorial at <a href="http://www.w3schools.com/svg/default.asp">W3Schools.com</a>, and the reference library from mozilla (<a href="https://developer.mozilla.org/en/SVG_Reference">here</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://html5stars.com/?feed=rss2&amp;p=91</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Level 2 HTML5 website</title>
		<link>http://html5stars.com/?p=83&amp;utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=level-2-html5-website</link>
		<comments>http://html5stars.com/?p=83#comments</comments>
		<pubDate>Thu, 13 May 2010 13:59:08 +0000</pubDate>
		<dc:creator>standup75</dc:creator>
				<category><![CDATA[HTML5]]></category>
		<category><![CDATA[HTML5 Playground]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[doctype]]></category>
		<category><![CDATA[level 2 integration]]></category>
		<category><![CDATA[markup]]></category>
		<category><![CDATA[simple example]]></category>

		<guid isPermaLink="false">http://html5stars.com/?p=83</guid>
		<description><![CDATA[
			
				
			
		
So in my last post I showed how to distinguish 4 level of HTML5 integration.
I am now taking an example to show how to build a level 2 HTML5 website (i.e. integrate doctype + HTML5 markup).

Background story of the website:
You may know that the show &#8220;lost&#8221; is ending soon, everybody following the show has his [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fhtml5stars.com%2F%3Fp%3D83"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fhtml5stars.com%2F%3Fp%3D83&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>So in my last post I showed how to distinguish 4 level of HTML5 integration.</p>
<p>I am now taking an example to show how to build a level 2 HTML5 website (i.e. integrate doctype + HTML5 markup).<br/><br />
<div id="attachment_87" class="wp-caption aligncenter" style="width: 610px"><a href="http://html5stars.com/wp-content/uploads/2010/05/lostfinale.png"><img src="http://html5stars.com/wp-content/uploads/2010/05/lostfinale.png" alt="lostfinale.com" title="lostfinale" width="600" height="252" class="size-full wp-image-87" /></a><p class="wp-caption-text">http://thelostfinale.com</p></div><br/><br />
<strong>Background story of the website:</strong></p>
<p>You may know that the show &#8220;lost&#8221; is ending soon, everybody following the show has his own version of what should happen during the finale. So I have had the idea of building this website: http://thelostfinal.com just to gather funny and serious scenario that people made up for the end of the show. I like this speculations, it is a good exercise to try to gather all information you have from the show (during 6 years!) and figure out what could be a logical ending. The actual end might be disappointing, but looking at what people make up is never disappointing. Anyway, not the purpose of this article, just sharing&#8230;<br/><br />
<strong>Website skeleton:</strong><br/><br />
<em>1. Doctype</em></p>
<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #00bbdd;">&lt;!DOCTYPE html&gt;</span></div></td></tr></tbody></table></div>
<p><br/><br />
<em>2. Header</em></p>
<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/html.html"><span style="color: #000000; font-weight: bold;">html</span></a> xmlns<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://www.w3.org/1999/xhtml&quot;</span>&gt;</span><br />
&nbsp; &nbsp;<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/head.html"><span style="color: #000000; font-weight: bold;">head</span></a>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/title.html"><span style="color: #000000; font-weight: bold;">title</span></a>&gt;</span>Lost Finale suggestions<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/title.html"><span style="color: #000000; font-weight: bold;">title</span></a>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/meta.html"><span style="color: #000000; font-weight: bold;">meta</span></a> <span style="color: #000066;">http-equiv</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Content-Type&quot;</span> <span style="color: #000066;">content</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/html; charset=utf-8&quot;</span><span style="color: #66cc66;">/</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/meta.html"><span style="color: #000000; font-weight: bold;">meta</span></a> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;description&quot;</span> <span style="color: #000066;">content</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;suggestions and theory for the last episode of Lost&quot;</span><span style="color: #66cc66;">/</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/meta.html"><span style="color: #000000; font-weight: bold;">meta</span></a> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;keywords&quot;</span> <span style="color: #000066;">content</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;lost theory finale episode suggestions&quot;</span><span style="color: #66cc66;">/</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/link.html"><span style="color: #000000; font-weight: bold;">link</span></a> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;stylesheet&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;css/standupwebcms.css&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span> <span style="color: #000066;">media</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;all&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/link.html"><span style="color: #000000; font-weight: bold;">link</span></a> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;stylesheet&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;css/style.css&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span> <span style="color: #000066;">media</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;all&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/link.html"><span style="color: #000000; font-weight: bold;">link</span></a> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;stylesheet&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;css/roar.css&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span> <span style="color: #000066;">media</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;all&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/link.html"><span style="color: #000000; font-weight: bold;">link</span></a> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;shortcut icon&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;images/favicon.ico&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #808080; font-style: italic;">&lt;!--[if IE]&gt;</span><br />
<span style="color: #808080; font-style: italic;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;script src=&quot;http://html5shiv.googlecode.com/svn/trunk/html5.js&quot;&gt;&lt;/script&gt;</span><br />
<span style="color: #808080; font-style: italic;"> &nbsp; &nbsp; &nbsp; &lt;![endif]--&gt;</span><br />
&nbsp; &nbsp;<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/head.html"><span style="color: #000000; font-weight: bold;">head</span></a>&gt;</span></div></td></tr></tbody></table></div>
<p>Nothing special here, except the IE rule to include a little piece of javascript that would make the HTML5 markup also recognized by IE<br />
<br/><br />
<em>3.Body part of the HTML</em></p>
<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &nbsp;<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/body.html"><span style="color: #000000; font-weight: bold;">body</span></a>&gt;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">'wrapper'</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900;">&lt;header&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>header&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900;">&lt;nav&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>nav&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900;">&lt;section <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">'content'</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;article&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>article&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>section&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900;">&lt;footer&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>footer&gt;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span><br />
&nbsp; &nbsp;<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/body.html"><span style="color: #000000; font-weight: bold;">body</span></a>&gt;</span></div></td></tr></tbody></table></div>
<p>This is really the basics, I have put a div, just to center the content on the page, but otherwise, it is pure HTML5 markup. If you view the source on the page (http://thelostfinale.com) you will see this markup. I have put the left navigation inside the &lt;nav&gt; tag and the form inside the &lt;article&gt; tag. The rest should be obvious.</p>
<p>And that&#8217;s it! Well almost, just close the html tag&#8230;</p>
<p>I did this site in less than 4 hours, so it does not take more time to do a HTML5 website than a HTML4 website, just need to get used to the markup. Not that this website also has some CSS3 features (see the form, it does not look as on IE&#8230;)</p>
]]></content:encoded>
			<wfw:commentRss>http://html5stars.com/?feed=rss2&amp;p=83</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>HTML5 = beautiful HTML website</title>
		<link>http://html5stars.com/?p=66&amp;utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=html5-beautiful-html-website</link>
		<comments>http://html5stars.com/?p=66#comments</comments>
		<pubDate>Wed, 05 May 2010 14:40:49 +0000</pubDate>
		<dc:creator>standup75</dc:creator>
				<category><![CDATA[HTML5]]></category>
		<category><![CDATA[HTML5 News]]></category>
		<category><![CDATA[canvas]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[integration]]></category>

		<guid isPermaLink="false">http://html5stars.com/?p=66</guid>
		<description><![CDATA[
			
				
			
		
How does a HTML5 website look like? What makes it HTML5 specific? How can I start with HTML5?

I like to hear what HTML5 means for most people. It&#8217;s basically the new way to do animations on the web. A replacement of Flash. Of course this is not very accurate technically, but I like that there [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fhtml5stars.com%2F%3Fp%3D66"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fhtml5stars.com%2F%3Fp%3D66&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p><strong>How does a HTML5 website look like? What makes it HTML5 specific? How can I start with HTML5?</strong><br />
<br/><br />
I like to hear what HTML5 means for most people. It&#8217;s basically the new way to do animations on the web. A replacement of Flash. Of course this is not very accurate technically, but I like that there is a keyword for a new trend. HTML5 can do great things that will make the website look closer to a flash experience: Video, Audio, Canvas, SVG. Not mentioning things that are impossible to do with flash (like Geo-location) And what is also really appealing for website owners is the semantic aspect and how easy it is to update, integrate with a CMS&#8230;<br />
<br/><br />
<div id="attachment_79" class="wp-caption aligncenter" style="width: 595px"><a href="http://www.google.com/trends?q=html5&#038;ctab=0&#038;geo=all&#038;date=ytd&#038;sort=0"><img src="http://html5stars.com/wp-content/uploads/2010/05/html5googletrend1.png" alt="" title="html5 on google trends" width="585" height="581" class="size-full wp-image-79" /></a><p class="wp-caption-text">HTML5 on google trends</p></div><br />
<br/><br />
I think there is confusion as to what is done with HTML5, what is done with CSS3 and what is done with Javascript. What I mean is that a new modern website using a lot of CSS3 and Ajax, can already look very close to a flash experience and make people think it is HTML5. Only a look at the source code can confirm that. When you see games <a href="http://www.effectgames.com/effect/games/crystalgalaxy/">like this</a>, not even using canvas, it is pretty amazing.<br />
<br/><br />
The confusion is there because there are different level of integration of HTML5. Here are 4 different levels of HTML5 integration<br />
<br/></p>
<ol>
<li>
<strong>Putting only a doctype</strong>: If you just replace your doctype in your HTML by <code class="codecolorer html4strict default"><span class="html4strict"><span style="color: #00bbdd;">&lt;!DOCTYPE html&gt;</span></span></code>, you can already pretend &#8220;doing&#8221; HTML5. And I went to <a href="http://101besthtml5sites.com/">http://101besthtml5sites.com/</a> and the first 2 websites of this bestof only have the doctype changed! The rest of the code is full of <code class="codecolorer html4strict default"><span class="html4strict"><span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span></span></code>, I don&#8217;t see any video or anything else, I may have missed something, but this just adds up to the confusion
</li>
<li>
<strong>Using the semantic</strong>: A very good resource for that is surely <a href="http://html5doctor.com">http://html5doctor.com</a> This is the second level of integration, and requires already some more HTML5 education. <code class="codecolorer html4strict default"><span class="html4strict"><span style="color: #009900;">&lt;header&gt;&lt;content&gt;&lt;footer&gt;&lt;figure&gt;</span></span></code> and other <code class="codecolorer html4strict default"><span class="html4strict"><span style="color: #009900;">&lt;aside&gt;</span></span></code> tags need to be used where HTML4 only had <code class="codecolorer html4strict default"><span class="html4strict"><span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span></span></code> and <code class="codecolorer html4strict default"><span class="html4strict"><span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/span.html"><span style="color: #000000; font-weight: bold;">span</span></a>&gt;</span></span></code>
</li>
<li>
<strong>Graphics and animations</strong>: Canvas, SVG, This is the real potential replacement of flash. SVG is the oldest one and is slower (see <a href="http://www.ernestdelgado.com/gmaps/canvas/ddemo1.html">here</a>), but canvas has a real potential. You can play with it on every browser (excanvas for IE is working great in most cases) and it&#8217;s really fun!<br />
Some simple examples:<br />
<a href="http://reas.com/twitch/">http://reas.com/twitch/</a><br />
<a href="http://mrdoob.com/projects/harmony">http://mrdoob.com/projects/harmony</a><br />
And the best resources I found to start with:<br />
<a href="http://diveintohtml5.org/canvas.html">http://diveintohtml5.org/canvas.html</a><br />
<a href="https://developer.mozilla.org/en/Canvas_tutorial">https://developer.mozilla.org/en/Canvas_tutorial</a>
</li>
<li>
<strong>Other specific features</strong>. I put it as last, because the browsers are supporting it very differently. I am talking about the Audio and Video tags (see <a href="http://www.youtube.com/html5">youtube</a>), geo-location and other HTML5 features (I&#8217;ve developed a dragndrop file upload using Firefox specific HTML5 feature, and include fallback upload for the other browser: <a href="http://mootools.standupweb.net/dragndrop.php">click here</a>)
</li>
</ol>
<p><br/><br />
It will never be obvious to recognize at first sight an HTML5 website on a browser with a flash plugin installed (except if the site uses geo-location?), and the different levels of integration make it even harder, but the trend is here and Steve Jobs making a big advertisement for HTML5, Microsoft saying they would support it in the next versions of IE confirm this, so start today using the doctype, integrate some elements, and play with canvas!</p>
]]></content:encoded>
			<wfw:commentRss>http://html5stars.com/?feed=rss2&amp;p=66</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>New mootools file upload</title>
		<link>http://html5stars.com/?p=62&amp;utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=new-mootools-file-upload</link>
		<comments>http://html5stars.com/?p=62#comments</comments>
		<pubDate>Fri, 30 Apr 2010 22:09:29 +0000</pubDate>
		<dc:creator>standup75</dc:creator>
				<category><![CDATA[HTML5 Playground]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[dragndrop]]></category>
		<category><![CDATA[file upload]]></category>
		<category><![CDATA[firefox 3.6]]></category>
		<category><![CDATA[gmail]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[mootools]]></category>
		<category><![CDATA[picture upload]]></category>
		<category><![CDATA[standupweb]]></category>

		<guid isPermaLink="false">http://html5stars.com/?p=62</guid>
		<description><![CDATA[
			
				
			
		
Everybody likes the way you can upload files in gmail. The only drawback is that it uses flash. I managed to do the same using only html/ajax. The only thing I did not manage to achieve is the progress bar. Since we don&#8217;t have any progress event&#8230; It does not work on IE6 and IE7 [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fhtml5stars.com%2F%3Fp%3D62"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fhtml5stars.com%2F%3Fp%3D62&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Everybody likes the way you can upload files in gmail. The only drawback is that it uses flash. I managed to do the same using only html/ajax. The only thing I did not manage to achieve is the progress bar. Since we don&#8217;t have any progress event&#8230; It does not work on IE6 and IE7 (i.e. < 20% of the market). There should be a better solution for these browser than no fallback at all but it did not interest me for the moment</p>
<p>On the other hand, if you are using Firefox 3.6 and above, this plugin will turn into a drag-and-drop file upload component. The main articles that helped me for this part are:<br />
- <a href="http://www.thecssninja.com/javascript/drag-and-drop-upload">http://www.thecssninja.com/javascript/drag-and-drop-upload</a><br />
- <a href="http://www.appelsiini.net/2009/10/html5-drag-and-drop-multiple-file-upload">http://www.appelsiini.net/2009/10/html5-drag-and-drop-multiple-file-upload</a></p>
<p>I am providing client (Mootools) and server scripts (PHP). The plugin is documented and available here:<br />
<a href="http://mootools.standupweb.net/dragndrop.php">http://mootools.standupweb.net/dragndrop.php</a></p>
<div id="attachment_63" class="wp-caption aligncenter" style="width: 310px"><a href="http://html5stars.com/wp-content/uploads/2010/04/dragndrop.png"><img src="http://html5stars.com/wp-content/uploads/2010/04/dragndrop-300x193.png" alt="dragndrop file upload" title="dragndrop" width="300" height="193" class="size-medium wp-image-63" /></a><p class="wp-caption-text">dragndrop file upload</p></div>
]]></content:encoded>
			<wfw:commentRss>http://html5stars.com/?feed=rss2&amp;p=62</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New mootools slideshow</title>
		<link>http://html5stars.com/?p=54&amp;utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=new-mootools-slideshow</link>
		<comments>http://html5stars.com/?p=54#comments</comments>
		<pubDate>Mon, 26 Apr 2010 14:56:25 +0000</pubDate>
		<dc:creator>standup75</dc:creator>
				<category><![CDATA[HTML5]]></category>
		<category><![CDATA[HTML5 Playground]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[menu]]></category>
		<category><![CDATA[mootools]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[slideshow]]></category>

		<guid isPermaLink="false">http://html5stars.com/?p=54</guid>
		<description><![CDATA[
			
				
			
		
I spent some time lately reshaping my picture site: http://pics.standupweb.net
This led me to develop a couple of new mootools classes that can be easily reused. I provide instructions, callback functions and options:


- SwSlideshow: A ajax-based slideshow with a nice thumbnail tape: see http://mootools.standupweb.net/slideshow.php

- SwFolder: A ajax-based menu based on a folder hierarchy on the server. [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fhtml5stars.com%2F%3Fp%3D54"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fhtml5stars.com%2F%3Fp%3D54&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>I spent some time lately reshaping my picture site: <a href="http://pics.standupweb.net">http://pics.standupweb.net</a></p>
<p>This led me to develop a couple of new mootools classes that can be easily reused. I provide instructions, callback functions and options:</p>
<p><a href="http://html5stars.com/wp-content/uploads/2010/04/picsstandupwenet.png"><img src="http://html5stars.com/wp-content/uploads/2010/04/picsstandupwenet-300x181.png" alt="pics.standupweb.net" title="pics.standupweb.net" width="300" height="181" class="aligncenter size-medium wp-image-56" /></a><br />
<br/><br />
<strong>- SwSlideshow: </strong>A ajax-based slideshow with a nice thumbnail tape: see <a href="http://mootools.standupweb.net/slideshow.php">http://mootools.standupweb.net/slideshow.php</a><br />
<br/><br />
<strong>- SwFolder: </strong>A ajax-based menu based on a folder hierarchy on the server. Have a look on <a href="http://mootools.standupweb.net/folderMenu.php">http://mootools.standupweb.net/folderMenu.php</a><br />
<br/><br />
And because my roommate likes shooting a lot of pictures, I derived this classes to build a flipbook, the result is pretty funny: <a href="http://flipbook.standupweb.net">http://flipbook.standupweb.net</a></p>
]]></content:encoded>
			<wfw:commentRss>http://html5stars.com/?feed=rss2&amp;p=54</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>some CSS bookmarks</title>
		<link>http://html5stars.com/?p=42&amp;utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=some-css-bookmarks</link>
		<comments>http://html5stars.com/?p=42#comments</comments>
		<pubDate>Fri, 09 Apr 2010 14:48:49 +0000</pubDate>
		<dc:creator>standup75</dc:creator>
				<category><![CDATA[CSS3 News]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[graph]]></category>
		<category><![CDATA[template]]></category>

		<guid isPermaLink="false">http://html5stars.com/?p=42</guid>
		<description><![CDATA[
			
				
			
		
Yet another CSS post&#8230; although I&#8217;m not doing CSS all day, I realize I read a lot about it. Well I guess it&#8217;s important to be sure that what I am doing with Javascript or Canvas or whatever cannot simply be done with CSS. That&#8217;s  the case of graphs where I remember people refusing [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fhtml5stars.com%2F%3Fp%3D42"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fhtml5stars.com%2F%3Fp%3D42&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Yet another CSS post&#8230; although I&#8217;m not doing CSS all day, I realize I read a lot about it. Well I guess it&#8217;s important to be sure that what I am doing with Javascript or Canvas or whatever cannot simply be done with CSS. That&#8217;s  the case of graphs where I remember people refusing to do a project in Javascript, pretending the only to do it is by using Canvas, so we need to do it in Flash (hence the price&#8230;). Wrong! So, 2 subjects here<br />
<br/><br />
<strong>1. CSS templates: because I have wasted too much time with this it&#8217;s time to get some good bookmarks!</strong><br />
<br/>
<ul>
<li><a href="http://www.mycelly.com/">www.mycelly.com</a></li>
<li><a href="http://blog.html.it/layoutgala/">blog.html.it/layoutgala</a></li>
<li><a href="http://www.code-sucks.com/css%20layouts/faux-css-layouts/">code-sucks.com/css%20layouts/faux-css-layouts</a></li>
</ul>
<p><br/><br />
<strong>2. CSS Graphs: personal revenge! A big link salad of bar charts, pie charts, line graphs and scatter plots</strong><br />
<br/>
<ul>
<li><a href="http://www.standards-schmandards.com/exhibits/barchart/">www.standards-schmandards.com/exhibits/barchart</a></li>
<li><a href="http://www.maxdesign.com.au/articles/percentage/">www.maxdesign.com.au/articles/percentage</a></li>
<li><a href="http://applestooranges.com/blog/post/css-for-bar-graphs/">applestooranges.com/blog/post/css-for-bar-graphs</a></li>
<li><a href="http://www.cssplay.co.uk/menu/barchart.html">www.cssplay.co.uk/menu/barchart.html</a></li>
<li><a href="http://cssglobe.com/post/1272/pure-css-data-chart">cssglobe.com/post/1272/pure-css-data-chart</a></li>
<li><a href="http://www.sbmkpm.com/graph.html">www.sbmkpm.com/graph.html</a></li>
<li><a href="http://dragan.yourtree.org/blog/en/2007/03/31/ajax-mgraph/">dragan.yourtree.org/blog/en/2007/03/31/ajax-mgraph</a></li>
<li><a href="http://www.alistapart.com/articles/accessibledatavisualization/">www.alistapart.com/articles/accessibledatavisualization</a></li>
<li><a href="http://www.thewojogroup.com/2008/12/css-stacked-bar-graphs/">www.thewojogroup.com/2008/12/css-stacked-bar-graphs</a></li>
<li><a href="http://www.terrill.ca/design/vertical_bar_graphs/">www.terrill.ca/design/vertical_bar_graphs</a></li>
<li><a href="http://cssglobe.com/post/4175/pure-css-line-graph">cssglobe.com/post/4175/pure-css-line-graph</a></li>
<li><a href="http://www.dynamicdrive.com/dynamicindex11/linegraph.htm">www.dynamicdrive.com/dynamicindex11/linegraph.htm</a></li>
<li><a href="http://www.sbmkpm.com/multigraph.html">www.sbmkpm.com/multigraph.html</a></li>
<li><a href="http://www.jgc.org/blog/2005/12/css-absolute-positioning-scatter-plot.html">www.jgc.org/blog/2005/12/css-absolute-positioning-scatter-plot.html</a></li>
<li><a href="http://www.dynamicdrive.com/dynamicindex11/piegraph.htm">www.dynamicdrive.com/dynamicindex11/piegraph.htm</a></li>
<li><a href="http://petewilliamsagency.com/oldsite/css/examples/pie/">petewilliamsagency.com/oldsite/css/examples/pie</a></li>
</ul>
<p><br/>And the list goes on!!!</p>
]]></content:encoded>
			<wfw:commentRss>http://html5stars.com/?feed=rss2&amp;p=42</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Selectors specificity</title>
		<link>http://html5stars.com/?p=36&amp;utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=css-specificity</link>
		<comments>http://html5stars.com/?p=36#comments</comments>
		<pubDate>Wed, 07 Apr 2010 18:27:59 +0000</pubDate>
		<dc:creator>standup75</dc:creator>
				<category><![CDATA[CSS3 News]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[specificity]]></category>

		<guid isPermaLink="false">http://html5stars.com/?p=36</guid>
		<description><![CDATA[
			
				
			
		
Did you ever ask yourself why this &#60;div&#62; has such a padding? Then you inspect the element and see it gets this very specific property from a &#60;li&#62; located somewhere else and you don&#8217;t understand why. Well, of course the first thing I think of is &#8216;how did I get my css so out of [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fhtml5stars.com%2F%3Fp%3D36"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fhtml5stars.com%2F%3Fp%3D36&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Did you ever ask yourself why this &lt;div&gt; has such a padding? Then you inspect the element and see it gets this very specific property from a &lt;li&gt; located somewhere else and you don&#8217;t understand why. Well, of course the first thing I think of is &#8216;how did I get my css so out of control?&#8217;&#8230; But instead of cleaning it up (lazy, lack of time? or just curious), I try to understand why, and it is simple, the selectors for each tag are ordered by &#8217;specificity&#8217;. The rule of thumbs to determine the specificity is written in the CSS Selectors level 3 recommendations there: http://www.w3.org/TR/css3-selectors/#specificity. I just paste the serie of examples which are making the things pretty clear:</p>
<p><a href="http://html5stars.com/wp-content/uploads/2010/04/specificity.png"><img class="alignnone size-full wp-image-37" title="specificity" src="http://html5stars.com/wp-content/uploads/2010/04/specificity.png" alt="" width="488" height="162" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://html5stars.com/?feed=rss2&amp;p=36</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

