Permalink
Browse files

* Pretty up default pages

* Echo
  • Loading branch information...
1 parent 09f4eac commit a4da442ccf7589e2def18939744f4fabe3bd5a7c Blake Mizerany committed Oct 2, 2007
Showing with 208 additions and 5 deletions.
  1. +1 −0 CHANGELOG
  2. +50 −0 Manifest
  3. +24 −0 RakeFile
  4. +3 −3 examples/hello/hello.rb
  5. +42 −1 files/default_index.erb
  6. BIN files/logo.png
  7. +1 −1 files/not_found.erb
  8. +87 −0 site/index.html
  9. BIN site/logo.png
View
1 CHANGELOG
@@ -0,0 +1 @@
+v0.1.0 Released!
View
50 Manifest
@@ -0,0 +1,50 @@
+CHANGELOG
+RakeFile
+README
+x.rb
+examples/hello/hello.rb
+examples/hello/views/hello.erb
+examples/todo/todo.rb
+files/default_index.erb
+files/error.erb
+files/logo.png
+files/not_found.erb
+lib/sinatra.rb
+lib/sinatra/context.rb
+lib/sinatra/dispatcher.rb
+lib/sinatra/dsl.rb
+lib/sinatra/environment.rb
+lib/sinatra/event.rb
+lib/sinatra/irb.rb
+lib/sinatra/loader.rb
+lib/sinatra/logger.rb
+lib/sinatra/options.rb
+lib/sinatra/pretty_url.rb
+lib/sinatra/route.rb
+lib/sinatra/server.rb
+lib/sinatra/test_methods.rb
+lib/sinatra/context/renderer.rb
+lib/sinatra/core_ext/array.rb
+lib/sinatra/core_ext/class.rb
+lib/sinatra/core_ext/hash.rb
+lib/sinatra/core_ext/kernel.rb
+lib/sinatra/core_ext/metaid.rb
+lib/sinatra/core_ext/module.rb
+lib/sinatra/core_ext/symbol.rb
+site/index.html
+site/logo.png
+test/helper.rb
+test/sinatra/dispatcher_test.rb
+test/sinatra/event_test.rb
+test/sinatra/pretty_url_test.rb
+test/sinatra/renderer_test.rb
+test/sinatra/route_test.rb
+test/sinatra/static_files_test.rb
+test/sinatra/url_test.rb
+test/sinatra/static_files/foo.txt
+vendor/erb/init.rb
+vendor/erb/lib/erb.rb
+vendor/haml/init.rb
+vendor/haml/lib/haml.rb
+Rakefile
+Manifest
View
24 RakeFile
@@ -1,5 +1,29 @@
require 'rake/testtask'
require 'ftools'
+require 'hoe'
+
+Version = '0.1.0'
+
+begin
+ require 'rubygems'
+ gem 'echoe'
+ ENV['RUBY_FLAGS'] = ""
+ require 'echoe'
+
+ Echoe.new('sinatra') do |p|
+ p.rubyforge_name = 'sinatra'
+ p.dependencies = ['mongrel >=1.0.1', 'rack >=0.2.0']
+ p.summary = "Sinatra is a classy web-framework dressed in a DSL"
+ p.description = "Sinatra is a classy web-framework dressed in a DSL"
+ p.url = "http://sinatra.rubyforge.org/"
+ p.author = 'Blake Mizerany'
+ p.email = "blake.mizerany@gmail.com"
+ p.test_pattern = 'test/**/*_test.rb'
+ p.include_rakefile = true
+ end
+
+rescue LoadError
+end
task :default => :test
View
6 examples/hello/hello.rb
@@ -1,9 +1,9 @@
$LOAD_PATH.unshift File.dirname(__FILE__) + '/../../lib'
require 'sinatra'
-get '/' do
- "Hello World!"
-end
+# get '/' do
+# "Hello World!"
+# end
get '/erb.xml' do
header 'Content-Type' => 'application/xml'
View
43 files/default_index.erb
@@ -1 +1,42 @@
-Default Index!!!!!!!
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html>
+ <head>
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8">
+ <title>Sinatra has taken the stage!</title>
+ </head>
+
+ <body>
+ <style type="text/css" media="screen">
+ body {
+ color: #333;
+ font-size: 1.5em;
+ }
+
+ #content {
+ margin: 0 auto;
+ text-align: center;
+ width: 500px;
+ }
+
+ #content pre {
+ text-align: left;
+ background-color: #D8D8D8;
+ padding: 10px;
+ }
+ </style>
+ <div id="content">
+ <div id="banner">
+ <img src="http://sinatra.rubyforge.org/logo.png">
+ </div>
+ <div id="content">
+ <h3>Sing this diddy to move on:</h3>
+ <pre>
+get "/" do
+ ... your code here ..
+end</pre>
+ </div>
+ </div>
+ </body>
+</html>
View
BIN files/logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
2 files/not_found.erb
@@ -39,7 +39,7 @@
<div id="content">
<div class='message'>
<h3>Sinatra doesn't know this diddy, but he's a quick study.</h3>
- <p>Add this to your lyrics:</p>
+ <p>Sing this one:</p>
<pre><%= request.request_method.downcase %> '<%= request.path_info %>' do
html "Replace this with your code."
end</pre>
View
87 site/index.html
@@ -0,0 +1,87 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html>
+ <head>
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8">
+ <title>Sinatra : Classy web-development dressed in a DSL</title>
+ </head>
+
+ <body>
+ <style type="text/css" media="screen">
+ body {
+ background-color: #fff;
+ color: #333;
+ font-size: 0.75em;
+ }
+
+ #container {
+ width: 600px;
+ margin: 0 auto;
+ font-size: 1.5em;
+ }
+
+ #container pre {
+ font-size: .8em;
+ background-color: #F5F6C9;
+ width: 100%;
+ }
+
+ #container note {
+ font-size: .7em;
+ }
+
+ #banner {
+ width: 600px;
+ text-align: center;
+ }
+
+ pre {
+ padding: 10px;
+ }
+
+ .clear {
+ clear: both;
+ }
+ </style>
+
+ <div id="container">
+ <div id="banner">
+ <img src='logo.png' />
+ <h2><em>Classy web-development dressed in a DSL</em></h2>
+ </div>
+ <div class="clear"></div>
+ <div>
+ <div>
+ <p>
+ <strong>Install!</strong><br/>
+ <pre>gem install sinatra -y</pre>
+ </p>
+ <p>
+ <strong>Write!</strong> (any filename you wish)<br/>
+ <pre>
+# lyrics.rb
+require 'rubygems'
+require 'sinatra'</pre>
+ <note>yup.. that's it for a sec</note><br />
+ </p>
+ <p>
+ <strong>Run!</strong><br />
+ <pre>ruby lyrics.rb</pre>
+ </p>
+ <p>
+ <strong>Bask!</strong><br />
+ <pre>http://localhost:4567</pre>
+ </p>
+ <p>
+ <strong>Example!</strong>
+ <pre>
+get '/' do
+ "Now that's a fine looking dame!"
+end</pre>
+ </p>
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
View
BIN site/logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a4da442

Please sign in to comment.