Skip to content

Instantly share code, notes, and snippets.

@eanakashima
Created September 2, 2013 05:04
Show Gist options
  • Save eanakashima/6409337 to your computer and use it in GitHub Desktop.
Save eanakashima/6409337 to your computer and use it in GitHub Desktop.
html5 boilerplate v4.2 index.html --> index.html.haml for the most up-to-date version, use html2haml.heroku.com with the latest from https://github.com/h5bp/html5-boilerplate
!!!
/[if lt IE 7] <html class='no-js lt-ie9 lt-ie8 lt-ie7'>
/[if IE 7] <html class='no-js lt-ie9 lt-ie8'>
/[if IE 8] <html class='no-js lt-ie9'>
/ [if gt IE 8]><!
%html.no-js
/ <![endif]
%head
%meta{:charset => 'utf-8'}/
%meta{:content => 'IE=edge', 'http-equiv' => 'X-UA-Compatible'}/
%title
%meta{:content => '', :name => 'description'}/
%meta{:content => 'width=device-width, initial-scale=1', :name => 'viewport'}/
/ Place favicon.ico and apple-touch-icon.png in the root directory
%link{:href => 'css/normalize.css', :rel => 'stylesheet'}/
%link{:href => 'css/main.css', :rel => 'stylesheet'}/
%script{:src => 'js/vendor/modernizr-2.6.2.min.js'}
%body
/[if lt IE 7]
<p class='browsehappy'>You are using an <strong>outdated</strong> browser. Please <a href='http://browsehappy.com/'>upgrade your browser</a> to improve your experience.</p>
/ Add your site or application content here
%p Hello world! This is HTML5 Boilerplate.
%script{:src => '//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js'}
:javascript
window.jQuery || document.write("<script src='js/vendor/jquery-1.10.2.min.js'><\/script>");
%script{:src => 'js/plugins.js'}
%script{:src => 'js/main.js'}
/ Google Analytics: change UA-XXXXX-X to be your site's ID.
:javascript
(function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]=
function(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new Date;
e=o.createElement(i);r=o.getElementsByTagName(i)[0];
e.src='//www.google-analytics.com/analytics.js';
r.parentNode.insertBefore(e,r)}(window,document,'script','ga'));
ga('create','UA-XXXXX-X');ga('send','pageview');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment