Sha256: 10c675f6b2206d6119f8dbc2f45ec1eb500ea5db453fbc56dc820ee038d233c4

Contents?: true

Size: 1.32 KB

Versions: 2

Compression:

Stored size: 1.32 KB

Contents

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

class App < Sinatra::Base

  enable :inline_templates
  use Rack::JQuery
  use Rack::JQueryUI

  get "/" do
    "RUNNING"
  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 "/unspecified-cdn" do
    haml :index, :layout => :unspecified
  end
end

__END__

@@google
%html
  %head
    = Rack::JQuery.cdn( :google )
    = Rack::JQueryUI.cdn( :google )
  = yield

@@microsoft
%html
  %head
    = Rack::JQuery.cdn( :microsoft )
    = Rack::JQueryUI.cdn( :microsoft )
  = yield

@@mediatemple
%html
  %head
    = Rack::JQuery.cdn( :media_temple )
    = Rack::JQueryUI.cdn( :media_temple )
  = yield

@@unspecified
%html
  %head
    = Rack::JQuery.cdn()
    = Rack::JQueryUI.cdn()
  = yield

@@index

%p.aclass
  "NOTHING TO SEE HERE… "
%p.aclass
  "MOVE ALONG… "
%p.aclass
  "MOVE ALONG… "
#placeholder
:javascript
  all_text = $('.aclass').text();
  $('#placeholder').text(all_text + " (draggable!)").mouseover(function() {
    $(this).css({ 'color': 'red', 'font-size': '150%' });    
  }).mouseout(function() {
    $(this).css({ 'color': 'blue', 'font-size': '100%' });
  }).draggable();

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rack-jquery_ui-0.0.3 examples/config.rb
rack-jquery_ui-0.0.2 examples/config.rb