index.html 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  1. <!DOCTYPE html>
  2. <!--
  3. ! Excerpted from "Agile Web Development with Rails",
  4. ! published by The Pragmatic Bookshelf.
  5. ! Copyrights apply to this code. It may not be used to create training material,
  6. ! courses, books, articles, and the like. Contact us if you are in doubt.
  7. ! We make no guarantees that this code is fit for any purpose.
  8. ! Visit http://www.pragmaticprogrammer.com/titles/rails4 for more book information.
  9. -->
  10. <html>
  11. <head>
  12. <title>Ruby on Rails: Welcome aboard</title>
  13. <style type="text/css" media="screen">
  14. body {
  15. margin: 0;
  16. margin-bottom: 25px;
  17. padding: 0;
  18. background-color: #f0f0f0;
  19. font-family: "Lucida Grande", "Bitstream Vera Sans", "Verdana";
  20. font-size: 13px;
  21. color: #333;
  22. }
  23. h1 {
  24. font-size: 28px;
  25. color: #000;
  26. }
  27. a {color: #03c}
  28. a:hover {
  29. background-color: #03c;
  30. color: white;
  31. text-decoration: none;
  32. }
  33. #page {
  34. background-color: #f0f0f0;
  35. width: 750px;
  36. margin: 0;
  37. margin-left: auto;
  38. margin-right: auto;
  39. }
  40. #content {
  41. float: left;
  42. background-color: white;
  43. border: 3px solid #aaa;
  44. border-top: none;
  45. padding: 25px;
  46. width: 500px;
  47. }
  48. #sidebar {
  49. float: right;
  50. width: 175px;
  51. }
  52. #footer {
  53. clear: both;
  54. }
  55. #header, #about, #getting-started {
  56. padding-left: 75px;
  57. padding-right: 30px;
  58. }
  59. #header {
  60. background-image: url("/assets/rails.png");
  61. background-repeat: no-repeat;
  62. background-position: top left;
  63. height: 64px;
  64. }
  65. #header h1, #header h2 {margin: 0}
  66. #header h2 {
  67. color: #888;
  68. font-weight: normal;
  69. font-size: 16px;
  70. }
  71. #about h3 {
  72. margin: 0;
  73. margin-bottom: 10px;
  74. font-size: 14px;
  75. }
  76. #about-content {
  77. background-color: #ffd;
  78. border: 1px solid #fc0;
  79. margin-left: -55px;
  80. margin-right: -10px;
  81. }
  82. #about-content table {
  83. margin-top: 10px;
  84. margin-bottom: 10px;
  85. font-size: 11px;
  86. border-collapse: collapse;
  87. }
  88. #about-content td {
  89. padding: 10px;
  90. padding-top: 3px;
  91. padding-bottom: 3px;
  92. }
  93. #about-content td.name {color: #555}
  94. #about-content td.value {color: #000}
  95. #about-content ul {
  96. padding: 0;
  97. list-style-type: none;
  98. }
  99. #about-content.failure {
  100. background-color: #fcc;
  101. border: 1px solid #f00;
  102. }
  103. #about-content.failure p {
  104. margin: 0;
  105. padding: 10px;
  106. }
  107. #getting-started {
  108. border-top: 1px solid #ccc;
  109. margin-top: 25px;
  110. padding-top: 15px;
  111. }
  112. #getting-started h1 {
  113. margin: 0;
  114. font-size: 20px;
  115. }
  116. #getting-started h2 {
  117. margin: 0;
  118. font-size: 14px;
  119. font-weight: normal;
  120. color: #333;
  121. margin-bottom: 25px;
  122. }
  123. #getting-started ol {
  124. margin-left: 0;
  125. padding-left: 0;
  126. }
  127. #getting-started li {
  128. font-size: 18px;
  129. color: #888;
  130. margin-bottom: 25px;
  131. }
  132. #getting-started li h2 {
  133. margin: 0;
  134. font-weight: normal;
  135. font-size: 18px;
  136. color: #333;
  137. }
  138. #getting-started li p {
  139. color: #555;
  140. font-size: 13px;
  141. }
  142. #sidebar ul {
  143. margin-left: 0;
  144. padding-left: 0;
  145. }
  146. #sidebar ul h3 {
  147. margin-top: 25px;
  148. font-size: 16px;
  149. padding-bottom: 10px;
  150. border-bottom: 1px solid #ccc;
  151. }
  152. #sidebar li {
  153. list-style-type: none;
  154. }
  155. #sidebar ul.links li {
  156. margin-bottom: 5px;
  157. }
  158. .filename {
  159. font-style: italic;
  160. }
  161. </style>
  162. <script type="text/javascript">
  163. function about() {
  164. info = document.getElementById('about-content');
  165. if (window.XMLHttpRequest)
  166. { xhr = new XMLHttpRequest(); }
  167. else
  168. { xhr = new ActiveXObject("Microsoft.XMLHTTP"); }
  169. xhr.open("GET","rails/info/properties",false);
  170. xhr.send("");
  171. info.innerHTML = xhr.responseText;
  172. info.style.display = 'block'
  173. }
  174. </script>
  175. </head>
  176. <body>
  177. <div id="page">
  178. <div id="sidebar">
  179. <ul id="sidebar-items">
  180. <li>
  181. <h3>Browse the documentation</h3>
  182. <ul class="links">
  183. <li><a href="http://guides.rubyonrails.org/">Rails Guides</a></li>
  184. <li><a href="http://api.rubyonrails.org/">Rails API</a></li>
  185. <li><a href="http://www.ruby-doc.org/core/">Ruby core</a></li>
  186. <li><a href="http://www.ruby-doc.org/stdlib/">Ruby standard library</a></li>
  187. </ul>
  188. </li>
  189. </ul>
  190. </div>
  191. <div id="content">
  192. <div id="header">
  193. <h1>Welcome aboard</h1>
  194. <h2>You&rsquo;re riding Ruby on Rails!</h2>
  195. </div>
  196. <div id="about">
  197. <h3><a href="rails/info/properties" onclick="about(); return false">About your application&rsquo;s environment</a></h3>
  198. <div id="about-content" style="display: none"></div>
  199. </div>
  200. <div id="getting-started">
  201. <h1>Getting started</h1>
  202. <h2>Here&rsquo;s how to get rolling:</h2>
  203. <ol>
  204. <li>
  205. <h2>Use <code>rails generate</code> to create your models and controllers</h2>
  206. <p>To see all available options, run it without parameters.</p>
  207. </li>
  208. <li>
  209. <h2>Set up a default route and remove <span class="filename">public/index.html</span></h2>
  210. <p>Routes are set up in <span class="filename">config/routes.rb</span>.</p>
  211. </li>
  212. <li>
  213. <h2>Create your database</h2>
  214. <p>Run <code>rake db:create</code> to create your database. If you're not using SQLite (the default), edit <span class="filename">config/database.yml</span> with your username and password.</p>
  215. </li>
  216. </ol>
  217. </div>
  218. </div>
  219. <div id="footer">&nbsp;</div>
  220. </div>
  221. </body>
  222. </html>