examples/config.rb in rack-jquery_ui-0.0.3 vs examples/config.rb in rack-jquery_ui-0.0.4

- old
+ new

@@ -8,71 +8,164 @@ enable :inline_templates use Rack::JQuery use Rack::JQueryUI get "/" do - "RUNNING" + haml :index, :layout => :unspecified end get "/google-cdn" do - haml :index, :layout => :google + haml :accordion, :layout => :google end get "/media-temple-cdn" do - haml :index, :layout => :mediatemple + haml :accordion, :layout => :mediatemple end get "/microsoft-cdn" do - haml :index, :layout => :microsoft + haml :accordion, :layout => :microsoft end get "/unspecified-cdn" do - haml :index, :layout => :unspecified + haml :accordion, :layout => :unspecified end + + get "/ui/:plugin" do |plugin| + haml plugin.to_sym, :layout => :ui + end end __END__ @@google %html %head = Rack::JQuery.cdn( :google ) = Rack::JQueryUI.cdn( :google ) + %link{ href: "http://code.jquery.com/ui/1.10.1/themes/base/jquery-ui.css", rel: "stylesheet"} + :css + body { + font-family: "Trebuchet MS", "Helvetica", "Arial", "Verdana", "sans-serif"; + font-size: 62.5%; + } = yield @@microsoft %html %head = Rack::JQuery.cdn( :microsoft ) = Rack::JQueryUI.cdn( :microsoft ) + %link{ href: "http://code.jquery.com/ui/1.10.1/themes/base/jquery-ui.css", rel: "stylesheet"} + :css + body { + font-family: "Trebuchet MS", "Helvetica", "Arial", "Verdana", "sans-serif"; + font-size: 62.5%; + } = yield @@mediatemple %html %head = Rack::JQuery.cdn( :media_temple ) = Rack::JQueryUI.cdn( :media_temple ) + %link{ href: "http://code.jquery.com/ui/1.10.1/themes/base/jquery-ui.css", rel: "stylesheet"} + :css + body { + font-family: "Trebuchet MS", "Helvetica", "Arial", "Verdana", "sans-serif"; + font-size: 62.5%; + } = yield @@unspecified %html %head = Rack::JQuery.cdn() = Rack::JQueryUI.cdn() - = yield + %link{ href: "http://code.jquery.com/ui/1.10.1/themes/base/jquery-ui.css", rel: "stylesheet"} + :css + body { + font-family: "Trebuchet MS", "Helvetica", "Arial", "Verdana", "sans-serif"; + font-size: 62.5%; + } + %body + = yield +@@ui +%html + %head + = Rack::JQuery.cdn() + = Rack::JQueryUI.cdn() + %link{ href: "http://code.jquery.com/ui/1.10.1/themes/base/jquery-ui.css", rel: "stylesheet"} + :css + body { + font-family: "Trebuchet MS", "Helvetica", "Arial", "Verdana", "sans-serif"; + font-size: 62.5%; + } + %body + = yield + @@index +%p + %a{ href: "/google-cdn" } + google-cdn +%p + %a{ href: "/media-temple-cdn" } + media-temple +%p + %a{ href: "/microsoft-cdn" } + microsoft-cdn +%p + %a{ href: "/unspecified-cdn" } + unspecified-cdn +%p + %a{ href: "/ui/accordion" } + accordion -%p.aclass - "NOTHING TO SEE HERE… " -%p.aclass - "MOVE ALONG… " -%p.aclass - "MOVE ALONG… " -#placeholder +@@accordion :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(); + $(function() { + $( "#accordion" ).accordion(); + }); +#accordion + %h3 + Section 1 + %div + %p + Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer + ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit + amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut + odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate. + %h3 + Section 2 + %div + %p + Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet + purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor + velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In + suscipit faucibus urna. + %h3 + Section 3 + %div + %p + Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis. + Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero + ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis + lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui. + %ul + %li + List item one + %li + List item two + %li + List item three + %h3 + Section 4 + %div + %p + Cras dictum. Pellentesque habitant morbi tristique senectus et netus + et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in + faucibus orci luctus et ultrices posuere cubilia Curae; Aenean lacinia + mauris vel est. + %p + Suspendisse eu nisl. Nullam ut libero. Integer dignissim consequat lectus. + Class aptent taciti sociosqu ad litora torquent per conubia nostra, per + inceptos himenaeos. \ No newline at end of file