Created
July 2, 2011 20:54
-
-
Save igorgue/1061639 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'sinatra' | |
get '/' do | |
<<-end_page | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0b1/jquery.mobile-1.0b1.min.css" /> | |
<script src="http://code.jquery.com/jquery-1.6.1.min.js"></script> | |
<script src="http://code.jquery.com/mobile/1.0b1/jquery.mobile-1.0b1.min.js"></script> | |
</head> | |
<body> | |
<div data-role="page"> | |
<div data-role="header" data-position="fixed"> | |
<h1>JQuery Error</h1> | |
<a href="/" data-icon="home">Home</a> | |
<a href="/" data-icon="delete">Logout</a> | |
</div><!-- /header --> | |
<div data-role="content"> | |
<h1>Go to /redirect_to <a href="/redirect_to">here</a>. | |
</div><!-- /content --> | |
<div data-role="footer" data-position="fixed"> | |
<h1>Footer</h1> | |
</div><!-- /footer --> | |
</div><!-- /page --> | |
</body> | |
</html> | |
end_page | |
end | |
get '/redirect_to' do | |
<<-end_page | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0b1/jquery.mobile-1.0b1.min.css" /> | |
<script src="http://code.jquery.com/jquery-1.6.1.min.js"></script> | |
<script src="http://code.jquery.com/mobile/1.0b1/jquery.mobile-1.0b1.min.js"></script> | |
</head> | |
<body> | |
<div data-role="page"> | |
<div data-role="header" data-position="fixed"> | |
<h1>JQuery Error</h1> | |
<a href="/" data-icon="home">Home</a> | |
<a href="/" data-icon="delete">Logout</a> | |
</div><!-- /header --> | |
<div data-role="content"> | |
<form action="/redirect_to" method="post" accept-charset="utf-8"> | |
<p><input type="submit" value="Redirec to /thank_you →"></p> | |
</form> | |
</div><!-- /content --> | |
<div data-role="footer" data-position="fixed"> | |
<h1>Footer</h1> | |
</div><!-- /footer --> | |
</div><!-- /page --> | |
</body> | |
</html> | |
end_page | |
end | |
post '/redirect_to' do | |
redirect '/thank_you' | |
end | |
get '/thank_you' do | |
<<-end_page | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0b1/jquery.mobile-1.0b1.min.css" /> | |
<script src="http://code.jquery.com/jquery-1.6.1.min.js"></script> | |
<script src="http://code.jquery.com/mobile/1.0b1/jquery.mobile-1.0b1.min.js"></script> | |
</head> | |
<body> | |
<div data-role="page"> | |
<div data-role="header" data-position="fixed"> | |
<h1>JQuery Error</h1> | |
<a href="/" data-icon="home">Home</a> | |
<a href="/" data-icon="delete">Logout</a> | |
</div><!-- /header --> | |
<div data-role="content"> | |
<h1>Thanks!</h1> | |
</div><!-- /content --> | |
<div data-role="footer" data-position="fixed"> | |
<h1>Footer</h1> | |
</div><!-- /footer --> | |
</div><!-- /page --> | |
</body> | |
</html> | |
end_page | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment