Skip to content

Instantly share code, notes, and snippets.

@kevinrobayna
Created March 2, 2014 15:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kevinrobayna/9307847 to your computer and use it in GitHub Desktop.
Save kevinrobayna/9307847 to your computer and use it in GitHub Desktop.
!!!
%html
%head
%title Web App Example
%link{:rel => "stylesheet", :type => "text/css", :href => "/stylesheet.css"}
%script{:type => "text/javascript", :src => "/application.js"}
%body
#Header
!= haml :"header"
#contents
= yield
#footer
!= haml :"footer"
require 'sinatra/base'
require 'haml'
require 'coffee-script'
require 'sass'
class WebAppExample < Sinatra::Base
set :root, File.dirname(__FILE__)
#Needed for CoffeeScript and SCSS
get '/application.js' do
coffee :application
end
get '/stylesheet.css' do
scss :stylesheet
end
#Starting actual application
get '/' do
haml :index
end
end
@kevinrobayna
Copy link
Author

why it dont work?

Thanks for help

@kevinrobayna
Copy link
Author

Files into repository

../WebAppExample
|-- Gemfile
|-- Gemfile.lock
|-- README.md
|-- Rakefile
|-- WebAppExample.rb
|-- config.ru
|-- public
`-- views
    |-- about.haml
    |-- coffee
    |   `-- application.coffee
    |-- footer.haml
    |-- header.haml
    |-- index.haml
    |-- layout.haml
    `-- scss
        `-- stylesheet.scss

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment