/ Published in: HAML
A 2 column HAML template for use with Sinatra, Padrino, or any other HAML enabled framework/app. This layout consists of a header section, a 2 column content section, and a footer section. It also includes Rack:Flash based notifications.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?xml version="1.0" encoding="UTF-8"?> !!! Strict %html %head %title= @page_title %link{:type=>"text/css", :href=>"/stylesheets/application.css", :rel=>"stylesheet"} %script{:type=>"text/javascript", :src=>"public/javascripts/jquery.js"} %script $('document').ready(function() { $('.flash').fadeTo(4000,0); }) %body #top #header %h1 Your App Name #content #leftCol -_msg = '' -if flash.has?(:info) -_class = 'info' -_msg = flash[:info] -elsif flash.has?(:notice) -_class = 'notice' -_msg = flash[:notice] -elsif flash.has?(:error) -_class = 'error' -_msg = flash[:error] %div.flash{:class=>_class} %p =_msg = yield #rightCol Right Col Content #footer %p Copyright © 2009 yourcompany.com