Skip to content

Instantly share code, notes, and snippets.

@ramboldio
Last active June 13, 2016 12:41
Show Gist options
  • Save ramboldio/7995085431951d80e34b to your computer and use it in GitHub Desktop.
Save ramboldio/7995085431951d80e34b to your computer and use it in GitHub Desktop.
Useful Jade code blocks
mixin windows-tile(image, color)
// Windows 8 tile icon
meta(name='msapplication-TileImage', content=image)
meta(name='msapplication-TileColor', content=color)
mixin fallback
<!--[if lt IE 7]><html class='no-js lt-ie9 lt-ie8 lt-ie7'> <![endif]-->
<!--[if IE 7]><html class='no-js lt-ie9 lt-ie8'> <![endif]-->
<!--[if IE 8]><html class='no-js lt-ie9'> <![endif]-->
<!--[if gt IE 8]><!--> <html class='no-js'> <!--<![endif]-->
mixin piwik_tracking_code(url, id)
script.
var _paq = _paq || [];
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
_paq.push(['setTrackerUrl', #{url} +'piwik.php']);
_paq.push(['setSiteId', #{id}]);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
})();
mixin piwik_opt_out(url)
iframe(style="border: 0; height: 200px; width: 100%;" src="#{url}/index.php?module=CoreAdminHome&action=optOut&language=de")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment