Skip to content

Instantly share code, notes, and snippets.

@gkop
Created April 10, 2012 03:21
Show Gist options
  • Save gkop/2348137 to your computer and use it in GitHub Desktop.
Save gkop/2348137 to your computer and use it in GitHub Desktop.
-# adapted from https://github.com/ryanb/nifty-generators/blob/master/lib/generators/nifty/layout/templates/layout.html.haml
!!!
%html
%head
%title
= content_for?(:title) ? yield(:title) : "Untitled"
%meta{"http-equiv"=>"Content-Type", :content=>"text/html; charset=utf-8"}/
= stylesheet_link_tag "nifty"
= csrf_meta_tag
= yield(:head)
%body
#container
- flash.each do |name, msg|
= content_tag :div, msg, :id => "flash_#{name}"
- if content_for?(:title)
%h1= yield(:title)
= yield
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment