Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@SteveBenner
Last active October 5, 2016 14:27
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 SteveBenner/fc78f445a9a5523d3d56 to your computer and use it in GitHub Desktop.
Save SteveBenner/fc78f445a9a5523d3d56 to your computer and use it in GitHub Desktop.
Slim template - Middleman layout based off HTML5 Boilerplate
doctype html
== conditional_html_tags_for_ie_versions 7..8, lang: 'en'
head
meta charset="utf-8"
meta http-equiv="X-UA-Compatible" content="IE=edge; chrome=1"
title = page_title
meta name="description" content=page_description
meta name="viewport" content="width=device-width, initial-scale=1"
/ Normalize - front end standardization
= stylesheet_link_tag 'vendor/normalize'
/ website stylesheets
= stylesheet_link_tag 'main'
/ load additional stylesheets here
/ Modernizr - feature detection and polyfills
= javascript_include_tag 'vendor/modernizr'
/ load additional preliminary scripts here
body
/[if lt IE 7]
p.browsehappy
| You are using an <strong>outdated</strong> browser. Please
| <a href="http://browsehappy.com/">Upgrade your browser to improve your experience!</a>
header
main
/ pages are rendered here
== yield
footer
= javascript_include_tag 'main'
/ load main scripts here
= partial 'partials/google-analytics'
<!DOCTYPE html>
<!--[if lt IE 7]<html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"><![endif]-->
<!--[if IE 7]<html class="no-js lt-ie9 lt-ie8" lang="en"><![endif]-->
<!--[if IE 8]<html class="no-js lt-ie9" lang="en"><![endif]-->
<!--[if gt IE 8]<!--><html class="no-js" lang="en"><!--<![endif]-->
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge; chrome=1" />
<title></title>
<meta name="description" content="" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
</head>
<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 to improve your experience!</a>
</p>
<![endif]-->
<header></header>
<main></main>
<footer></footer>
<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create','UA-XXXXXXXX-X','auto');ga('send','pageview');
</script>
</body>
</html>
@SteveBenner
Copy link
Author

More information about this template can be found here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment