Skip to content

Instantly share code, notes, and snippets.

@yoshuawuyts
Created July 26, 2013 21:18
Show Gist options
  • Save yoshuawuyts/6092300 to your computer and use it in GitHub Desktop.
Save yoshuawuyts/6092300 to your computer and use it in GitHub Desktop.
slightly adjusted h5bp in jade, made to support angular with fallback to local (made to be sails compatible out of the box)
!!! 5
//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(class='no-js')
//<![endif]
head
meta(charset='utf-8')
meta(http-equiv='X-UA-Compatible', content='IE=edge,chrome=1')
title= title
meta(name='', content='')
// Viewport mobile tag for sensible mobile support
meta(name="viewport",content="width=device-width, initial-scale=1, maximum-scale=1")
body
//if lt IE 7
p.chromeframe.
You are using an <strong>outdated</strong> browser.
Please <a href="http://browsehappy.com/">upgrade your browser</a> or
<a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a>
to improve your experience.
block body
// sails
script(type="text/javascript", src="/js/socket.io.js")
script(type="text/javascript", src="/js/sails.io.js")
script(type="text/javascript", src="/js/app.js")
//angular
script(type="text/javascript", src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js")
script window.angular || document.write('<script src="js/angular.min.js"><\/script>'
//application
script(type="text/javascript", src="/js/stddr.js")
// set up google analytics to track pages
script.
var _gaq=[['_setAccount','UA-XXXXX-X'],['_trackPageview']];
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
g.src='//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