Sha256: 41d6a0c62c21ee2ec03721c90c687af109b28304d80314f0920e0ef6936fb05f

Contents?: true

Size: 1.08 KB

Versions: 2

Compression:

Stored size: 1.08 KB

Contents

require 'sinatra/base'
require 'haml'
require 'rack/jquery'
require 'rack/jquery_ui'
require 'rack/jquery_ui/themes'

class App < Sinatra::Base

  enable :inline_templates
  use Rack::JQuery
  use Rack::JQueryUI
  use Rack::JQueryUI::Themes, :theme => "vader", :themes => Rack::JQueryUI::Themes::STANDARD_THEMES

  get "/" do
    haml :index, :layout => :unspecified
  end

  get "/google-cdn" do
    haml :index, :layout => :google
  end

  get "/media-temple-cdn" do
    haml :index, :layout => :mediatemple
  end

  get "/microsoft-cdn" do
    haml :index, :layout => :microsoft
  end

  get "/themes/?" do
    haml :themes_list, :layout => :unspecified
  end

  get "/fallback/?" do
    haml :themes_list, :layout => :unspecified
  end

  
  get "/themes/" do
    haml :theme, :layout => :layout_theme
  end
  
  get "/themes/:theme" do |theme|
    @theme = theme
    haml :theme, :layout => :layout_theme
  end

  
  get "/fallback/" do
    haml :theme, :layout => :layout_fallback
  end

  get "/fallback/:theme" do |theme|
    @theme = theme
    haml :theme, :layout => :layout_fallback
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rack-jquery_ui-themes-3.0.1 examples/config.rb
rack-jquery_ui-themes-3.0.0 examples/config.rb