Skip to content

Instantly share code, notes, and snippets.

@hamecoded
Forked from am/index.haml
Created December 13, 2012 16:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hamecoded/4277763 to your computer and use it in GitHub Desktop.
Save hamecoded/4277763 to your computer and use it in GitHub Desktop.
customized for mobile

haml html5 boilerplate

haml -f html5 index.haml
  1. added mobile viewport
  2. use lastest jquery | modernizer
  3. added vendor libs (uncomment): Dojo
# run ./buid_html from commandline
haml -f html5 index.haml > index.html
!!! 5
/[if lt IE 7]<html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en">
/[if IE 7]<html class="no-js lt-ie9 lt-ie8" lang="en">
/[if IE 8]<html class="no-js lt-ie9" lang="en">
<!--[if gt IE 8]><!-->
%html.no-js( lang = "en" )
<!--<![endif]-->
%head
%meta( charset = "utf-8" )
%meta(http-equiv = "X-UA-Compatible" content = "IE=edge,chrome=1" )
%title
%meta( name = "description" content = "" )
%meta( name = "viewport" content = "width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no" )
%link( rel = "stylesheet" href = "css/style.css" )
%script( src = "//www.modernizr.com/downloads/modernizr-latest.js" )
%body
%header
%div(role = "main")
%footer
%script( src = "//code.jquery.com/jquery-latest.min.js" )
:javascript
window.jQuery || document.write('<script src="js/libs/jquery-1.8.3.min.js"><\/script>')
<!-- load Vendor Libs -->
<!-- load Dojo -->
/ %script( src = "//ajax.googleapis.com/ajax/libs/dojo/1.8.1/dojo/dojo.js" data-dojo-config="async: true" )
%script( src = "js/plugins.js" )
%script( src = "js/script.js" )
:javascript
var _gaq=[['_setAccount','UA-XXXXX-X'],['_trackPageview']];
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
s.parentNode.insertBefore(g,s)}(document,'script'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment