Skip to content

Instantly share code, notes, and snippets.

@jimsynz
Created December 20, 2011 21:49
Show Gist options
  • Save jimsynz/1503450 to your computer and use it in GitHub Desktop.
Save jimsynz/1503450 to your computer and use it in GitHub Desktop.
Attempting to convert ember.js' index.html to haml
<!doctype html>
<!--[if lt IE 7 ]> <html lang="en" class="ie6"> <![endif]--> <!--[if IE 7 ]> <html lang="en" class="ie7"> <![endif]--> <!--[if IE 8 ]> <html lang="en" class="ie8"> <![endif]--> <!--[if IE 9 ]> <html lang="en" class="ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html 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="author" content="">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="/favicon.ico">
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
<link rel="stylesheet" href="css/style.css?v=2">
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body>
<script type="text/x-handlebars">
{{#view App.MyView}}
<h1>Hello world!</h1>
{{/view}}
</script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
<script>!window.jQuery && document.write(unescape('%3Cscript src="js/libs/jquery-1.6.1.min.js"%3E%3C/script%3E'))</script>
<script src="js/libs/ember-0.9.2.min.js"></script>
<script src="js/app.js"></script>
</body>
</html>
!!! 5
/[ if lt IE 7]
%html{:lang => 'en', :class => 'ie6'}
/[ if IE 8]
%html{:lang => 'en', :class => 'ie8'}
/[ if IE 9]
%html{:lang => 'en', :class => 'ie9'}
/[if (gt IE 9)|!(IE)]
%html{:lang => 'en'}
%head
%meta{:charset => 'UTF-8'}
%meta{'http-equiv' => 'X-UA-Compatible', :content => 'IE=edge,chrome=1'}
%title Kimono
%meta{:name => 'description', :content => 'Kimono; it is people, it is people, it is people.'}
%meta{:name => 'author', :content => 'James Harton, Sociable Limited'}
%meta{:name => 'viewport', :content => 'width=device-width, initial-scale=1.0'}
%link{:rel => 'shortcut icon', :href => asset_path('favicon.ico') }
%link{:rel => 'apple-touch-icon', :href => asset_path('apple-touch-icon.png') }
= stylesheet_link_tag 'application'
/[if lf IE 9]
= javascript_include_tag 'html5'
%body
= javascript_include_tag 'application'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment