diff options
author | Sam Stephenson <sam@37signals.com> | 2005-11-08 04:26:34 +0000 |
---|---|---|
committer | Sam Stephenson <sam@37signals.com> | 2005-11-08 04:26:34 +0000 |
commit | b661c9603a3d053f940e50fc1b63ff568f9b98f8 (patch) | |
tree | 4bd99f03f1642c5be34b8c553bb2f56df68bac22 /railties/html/index.html | |
parent | c9ae41fe5154224a047efb4c8fccac4549755a0c (diff) | |
download | rails-b661c9603a3d053f940e50fc1b63ff568f9b98f8.tar.gz rails-b661c9603a3d053f940e50fc1b63ff568f9b98f8.tar.bz2 rails-b661c9603a3d053f940e50fc1b63ff568f9b98f8.zip |
Added an omnipresent RailsInfoController with a properties action that delivers an HTML rendering of Rails::Info (but only when local_request? is true). Added a new default index.html which fetches this with Ajax.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2933 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/html/index.html')
-rw-r--r-- | railties/html/index.html | 343 |
1 files changed, 272 insertions, 71 deletions
diff --git a/railties/html/index.html b/railties/html/index.html index d780f8e029..952ee4febb 100644 --- a/railties/html/index.html +++ b/railties/html/index.html @@ -1,78 +1,279 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" - "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> -<head> - <title>Rails: Welcome on board</title> - <style> - body { background-color: #fff; color: #333; } + <head> + <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> + <title>Ruby on Rails: Welcome aboard</title> + <style type="text/css" media="screen"> + body { + margin: 0; + margin-bottom: 25px; + padding: 0; + background-color: #f0f0f0; + font-family: "Lucida Grande", "Bitstream Vera Sans", "Verdana"; + font-size: 13px; + color: #333; + } + + h1 { + font-size: 28px; + color: #000; + } + + a {color: #03c} + a:hover { + background-color: #03c; + color: white; + text-decoration: none; + } + + + #page { + background-color: #f0f0f0; + width: 750px; + margin: 0; + margin-left: auto; + margin-right: auto; + } + + #content { + float: left; + background-color: white; + border: 3px solid #aaa; + border-top: none; + padding: 25px; + width: 500px; + } + + #sidebar { + float: right; + width: 175px; + } - body, p, ol, ul, td { - font-family: verdana, arial, helvetica, sans-serif; - font-size: 12px; - line-height: 18px; - } + #footer { + clear: both; + } + - li { - margin-bottom: 7px; - } + #header, #about, #getting-started { + padding-left: 75px; + padding-right: 30px; + } - pre { - background-color: #eee; - padding: 10px; - font-size: 11px; - } - a { color: #000; } - a:visited { color: #666; } - a:hover { color: #fff; background-color:#000; } - </style> -</head> -<body> + #header { + background-image: url("images/rails.png"); + background-repeat: no-repeat; + background-position: top left; + height: 64px; + } + #header h1, #header h2 {margin: 0} + #header h2 { + color: #888; + font-weight: normal; + font-size: 16px; + } + + + #about h3 { + margin: 0; + margin-bottom: 10px; + font-size: 14px; + } + + #about-content { + background-color: #ffd; + border: 1px solid #fc0; + margin-left: -11px; + } + #about-content table { + margin-top: 10px; + margin-bottom: 10px; + font-size: 11px; + border-collapse: collapse; + } + #about-content td { + padding: 10px; + padding-top: 3px; + padding-bottom: 3px; + } + #about-content td.name {color: #555} + #about-content td.value {color: #000} + + #about-content.failure { + background-color: #fcc; + border: 1px solid #f00; + } + #about-content.failure p { + margin: 0; + padding: 10px; + } + + + #getting-started { + border-top: 1px solid #ccc; + margin-top: 25px; + padding-top: 15px; + } + #getting-started h1 { + margin: 0; + font-size: 20px; + } + #getting-started h2 { + margin: 0; + font-size: 14px; + font-weight: normal; + color: #333; + margin-bottom: 25px; + } + #getting-started ol { + margin-left: 0; + padding-left: 0; + } + #getting-started li { + font-size: 18px; + color: #888; + margin-bottom: 25px; + } + #getting-started li h2 { + margin: 0; + font-weight: normal; + font-size: 18px; + color: #333; + } + #getting-started li p { + color: #555; + font-size: 13px; + } + + + #search { + margin: 0; + padding-top: 10px; + padding-bottom: 10px; + font-size: 11px; + } + #search input { + font-size: 11px; + margin: 2px; + } + #search-text {width: 170px} + + + #sidebar ul { + margin-left: 0; + padding-left: 0; + } + #sidebar ul h3 { + margin-top: 25px; + font-size: 16px; + padding-bottom: 10px; + border-bottom: 1px solid #ccc; + } + #sidebar li { + list-style-type: none; + } + #sidebar ul.links li { + margin-bottom: 5px; + } + + </style> + <script type="text/javascript" src="javascripts/prototype.js"></script> + <script type="text/javascript" src="javascripts/effects.js"></script> + <script type="text/javascript"> + function about() { + if (Element.empty('about-content')) { + new Ajax.Updater('about-content', 'rails_info/properties', { + method: 'get', + onFailure: function() {Element.classNames('about-content').add('failure')}, + onComplete: function() {new Effect.BlindDown('about-content', {duration: 0.25})} + }); + } else { + new Effect[Element.visible('about-content') ? + 'BlindUp' : 'BlindDown']('about-content', {duration: 0.25}); + } + } + + window.onload = function() { + $('search-text').value = ''; + $('search').onsubmit = function() { + $('search-text').value = 'site:rubyonrails.com ' + $F('search-text'); + } + } + </script> + </head> + <body> + <div id="page"> + <div id="sidebar"> + <ul id="sidebar-items"> + <li> + <form id="search" action="http://www.google.com/search" method="get"> + <input type="hidden" name="hl" value="en" /> + <input type="text" id="search-text" name="q" value="site:rubyonrails.com " /> + <input type="submit" value="Search" /> the Rails site + </form> + </li> + + <li> + <h3>Join the community</h3> + <ul class="links"> + <li><a href="http://www.rubyonrails.com/">Ruby on Rails</a></li> + <li><a href="http://weblog.rubyonrails.com/">Official weblog</a></li> + <li><a href="http://lists.rubyonrails.org/">Mailing lists</a></li> + <li><a href="http://wiki.rubyonrails.com/rails/pages/IRC">IRC channel</a></li> + <li><a href="http://wiki.rubyonrails.com/">Wiki</a></li> + <li><a href="http://dev.rubyonrails.com/">Bug tracker</a></li> + </ul> + </li> + + <li> + <h3>Browse the documentation</h3> + <ul class="links"> + <li><a href="http://manuals.rubyonrails.com/">Manuals</a></li> + <li><a href="http://api.rubyonrails.com/">All APIs</a></li> + <li><a href="http://ar.rubyonrails.com/">Active Record</a></li> + <li><a href="http://ap.rubyonrails.com/">Action Pack</a></li> + <li><a href="http://as.rubyonrails.com/">Active Support</a></li> + </ul> + </li> + </ul> + </div> -<h1>Congratulations, you've put Ruby on Rails!</h1> + <div id="content"> + <div id="header"> + <h1>Welcome aboard</h2> + <h2>You’re riding the Rails!</h2> + </div> -<p><b>Before you move on</b>, verify that the following conditions have been met:</p> - -<ol> - <li>The log and public directories must be writable to the web server (<code>chmod -R 775 log</code> and <code>chmod -R 775 public</code>). - <li> - The shebang line in the public/dispatch* files must reference your Ruby installation. <br/> - You might need to change it to <code>#!/usr/bin/env ruby</code> or point directly at the installation. - </li> - <li> - Rails on Apache needs to have the cgi handler and mod_rewrite enabled. <br/> - Somewhere in your httpd.conf, you should have:<br/> - <code>AddHandler cgi-script .cgi</code><br/> - <code>LoadModule rewrite_module libexec/httpd/mod_rewrite.so</code><br/> - <code>AddModule mod_rewrite.c</code> - </li> -</ol> - -<p>Take the following steps to get started:</p> - -<ol> - <li>Create empty development and test databases for your application.<br/> - <small>Recommendation: Use *_development and *_test names, such as basecamp_development and basecamp_test</small><br/> - <small>Warning: Don't point your test database at your development database, it'll destroy the latter on test runs!</small> - <li>Edit config/database.yml with your database settings. - <li>Create controllers and models using the generator in <code>script/generate</code> <br/> - <small>Help: Run the generator with no arguments for documentation</small> - <li>See all the tests run by running <code>rake</code>. - <li>Develop your Rails application! - <li>Setup Apache with <a href="http://www.fastcgi.com">FastCGI</a> (and <a href="http://raa.ruby-lang.org/list.rhtml?name=fcgi">Ruby bindings</a>), if you need better performance - <li>Remove the dispatches you don't use (so if you're on FastCGI, delete/move dispatch.rb, dispatch.cgi and gateway.cgi)</li> -</ol> - -<p> - Trying to setup a default page for Rails using Routes? You'll have to delete this file (public/index.html) to get under way. Then define a new route in <tt>config/routes.rb</tt> of the form: - <pre> map.connect '', :controller => 'wiki/page', :action => 'show', :title => 'Welcome'</pre> -</p> - -<p> - Having problems getting up and running? First try debugging it yourself by looking at the log files. <br/> - Then try the friendly Rails community <a href="http://www.rubyonrails.org">on the web</a> or <a href="http://www.rubyonrails.org/show/IRC">on IRC</a> - (<a href="irc://irc.freenode.net/#rubyonrails">FreeNode#rubyonrails</a>). -</p> - -</body> -</html> + <div id="about"> + <h3><a href="rails_info/properties" onclick="about(); return false">About your application’s environment</a></h3> + <div id="about-content" style="display: none"></div> + </div> + + <div id="getting-started"> + <h1>Getting started</h1> + <h2>Here’s how to get rolling:</h2> + + <ol> + <li> + <h2>Create your databases and edit <tt>database.yml</tt></h2> + <p>Instructions here</p> + </li> + + <li> + <h2>Use <tt>script/generate</tt> to create your models and controllers</h2> + <p>Instructions here</p> + </li> + + <li> + <h2>Set up a default route and remove or rename this file</h2> + <p>Instructions here</p> + </li> + </ol> + </div> + </div> + + <div id="footer"> </div> + </div> + </body> +</html>
\ No newline at end of file |