def layout
html do
head do
title "Ruby Camping ABingo Plugin Demo"
style :type => 'text/css' do
"\n/* --- General Test App Styles --- */\n\nbody {\npadding:0 0 0 0;\nmargin:5px;\nfont-family:'Lucida Grande','Lucida Sans Unicode',sans-serif;\nfont-size: 0.8em;\ncolor:#303030;\nbackground-color: #fbf9b5;\n}\n\na {\ncolor:#303030;\ntext-decoration:none;\nborder-bottom:1px dotted #505050;\n}\n\na:hover {\ncolor:#303030;\nbackground: yellow;\ntext-decoration:none;\nborder-bottom:4px solid orange;\n}\n\nh1 {\nfont-size: 14px;\ncolor: #cc3300;\n}\n\ntable {\nfont-size:0.9em;\nwidth: 1050px;\n}\n\ntr\n{\nbackground:lightgoldenRodYellow;\nvertical-align:top;\n}\n\nth\n{\nfont-size: 0.9em;\nfont-weight:bold;\nbackground:lightBlue none repeat scroll 0 0;\n\ntext-align:left;\n}\n\n#header\n{\nwidth: 100%;\nheight: 30px;\nborder-bottom: 4px solid #ccc;\n}\n\n#header_title\n{\nfloat: left;\n}\n\n#top_nav\n{\nfloat: right;\n}\n\n#footer\n{\nwidth: 100%;\nborder-top: 4px solid #ccc;\n}\n\n\n#footer_notices\n{\nwidth: 100%;\nborder-top: 4px solid #ccc;\n}\n\n#home\n{\nbackground-color: #C9E3F5;\npadding: 10px;\nheight: 300px;\n}\n\n#debug_panel\n{\nbackground-color: wheat;\npadding: 10px;\n}\n\n.xyz\n{\nbackground-color: #D1F2A5;\npadding: 10px;\nheight: 300px;\n}\n\n.xyz h1\n{\ncolor: #9D9F89;\n}\n\n#special_promo\n{\nmargin: 20px;\n}\n\n#landing a:hover\n{\nbackground-color: #B2DE93;\nborder-bottom-color:green;\n}\n\n#marketing\n{\nwidth: 480px;\nheight: 100px;\nmargin: 20px;\n}\n\n#benefits\n{\nfloat: left;\nwidth: 300px;\nheight: 100px;\nfont-size: 1.3em;\nfont-weight: bold;\ncolor: green;\nbackground-color: #B2DE93;\n}\n\n#actnow\n{\nfloat: right;\nwidth: 180px;\nheight: 100px;\ntext-align: center;\nbackground-color: #8BC59B;\n}\n\n#signup_btn\n{\nbackground-color:#91F1A0;\nborder:4px solid green;\nfont-size:1.5em;\nfont-weight:bold;\nheight:72px;\nmargin: 10px 20px 10px 22px;\nwidth:130px;\n}\n\n#actnow a:hover #signup_btn\n{\nbackground-color: #69F17F;\ncolor: #007300;\nborder: 4px solid #00AA00;\n}\n\n/* --- ABingo Dashboard Styles ---*/\n\n#abingo_dashboard\n{\nbackground-color: white;\npadding: 10px;\n}\n\nabingo_experiment_table\n{\nwidth: 100%;\n}\n\n.abingo_experiment_row\n{\n}\n\n.abingo_alternative_row\n{\ncolor: red;\nfont-weight: bold;\n}\n\n.abingo_debug\n{\ndisplay: block;\nwidth: 100%;\n}\n\n.abingo_explain\n{\ncolor: #CCC;\nfont-style:italics;\n}\n\n\n"
end
end
body do
div.header! do
div.header_title! "Ruby Camping ABingo Plugin Demo"
div.top_nav! do
a "Home", :href=>"/"
span " | "
if @state.nil? || @state.user_id.nil?
a "Sign-In", :href=>'/signin'
span " | "
a "Sign-Up", :href=>'/signup'
else
a "XYZ", :href=>"/welcome"
span " | "
a "Sign-Out", :href=>'/signout'
if @state.user_id == abingo_administrator_user_id
span " | "
a "ABingo Dashboard", :href=>"/abingo/dashboard"
end
end
end
end
self << yield
div.footer! do
div.debug_panel! do
h4 "Debugging Information:"
h5 "State:"
div "#{@state.inspect}"
h5 "Cache Data:"
if Abingo.cache && Abingo.cache.data
Abingo.cache.data.each do | k,v |
div.abingo_debug "#{k} => #{v.inspect}";
end
end
end
div.footer_notices! { "Copyright © 2010 - #{ a('Patrick McKenzie', :href => 'http://www.bingocardcreator.com/abingo') } and #{ a('Philippe Monnet', :href => 'http://blog.monnet-usa.com/') } " }
end
end
end
end