Skip to content

Instantly share code, notes, and snippets.

@igravious
Created November 1, 2011 22:55
Show Gist options
  • Save igravious/1332213 to your computer and use it in GitHub Desktop.
Save igravious/1332213 to your computer and use it in GitHub Desktop.
html5 boilerplate say hello to markaby
# convert the index.html of html5 boilerplate to markaby
# html5 boilerplate repo: https://github.com/h5bp/html5-boilerplate
# needs HTML5 additions from my fork of markaby: https://github.com/igravious/markaby
def layout
comments = []
comments << '[if lt IE 7]> <html class="no-js ie6 oldie" lang="en"> <![endif]'
comments << '[if IE 7]> <html class="no-js ie7 oldie" lang="en"> <![endif]'
comments << '[if IE 8]> <html class="no-js ie8 oldie" lang="en"> <![endif]'
comments << '[if gt IE 8]><!'
html_five({:class => "no-js", :lang => @language}, comments) do
# how to simply get which controller we came from?
comment! '<![endif]'
head do
meta "http-equiv" => "X-UA-Compatible", "content" => "IE=edge,chrome=1"
title @title
meta "name" => "description", "content" => "The Electronic Poetry Publishing Platform"
meta "name" => "author", "content" => "Anthony Durity"
meta "name" => "viewport", "content" => "width=device-width,initial-scale=1"
link "rel" => "stylesheet", "href" => "cascading_stylesheets/poetify.css"
script "src" => "javascripts/libs/modernizr-2.0.6.min.js" do
end
end
body do
div.container! do
#binding.pry
header do
end
div.main!(:role => "main") do
self << yield
end
footer do
end
end
comment! '! end of #container '
#javascript_link_tag "//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"
script "src" => "//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" do
end
script do
text "window.jQuery || document.write('<script src=\"js/libs/jquery-1.6.2.min.js\"><\\/script>')"
end
comment! '[if lt IE 7 ]>'+
'<script src="//ajax.googleapis.com/ajax/libs/chrome-frame/1.0.2/CFInstall.min.js"></script>'+
'<script>window.attachEvent("onload",function(){CFInstall.check({mode:"overlay"})})</script>'+
'<![endif]'
end # end body
end # end html
end # end layout
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment