Skip to content

Instantly share code, notes, and snippets.

@henare
Created October 1, 2010 01:18
Show Gist options
  • Save henare/605575 to your computer and use it in GitHub Desktop.
Save henare/605575 to your computer and use it in GitHub Desktop.
A skeleton Sinatra app
require 'rubygems'
require 'sinatra'
require 'haml'
get '/' do
@answer = question
haml :index
end
helpers do
def question
"Yes"
end
end
__END__
@@ layout
!!!
%html
%head
%title
My App
:css
body {
text-align: center;
background-color: #fff;
}
#content {
width: 500px;
margin: auto;
}
h1 {
color: #000;
font-size: 250px;
text-align: center;
}
%body
= yield
@@ index
%div#content
%h1#answer= @answer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment