Commit d5202cc
Changed files (9)
app
assets
javascripts
stylesheets
app/assets/javascripts/application.js
@@ -12,4 +12,5 @@
//
//= require jquery
//= require jquery_ujs
+//= require bootstrap
//= require_tree .
app/assets/stylesheets/needs.css.scss
@@ -1,3 +1,3 @@
-// Place all the styles related to the needs controller here.
-// They will automatically be included in application.css.
-// You can use Sass (SCSS) here: http://sass-lang.com/
+@import "bootstrap";
+body { padding-top: 60px; }
+@import "bootstrap-responsive";
app/assets/stylesheets/scaffolds.css.scss
@@ -1,69 +0,0 @@
-body {
- background-color: #fff;
- color: #333;
- font-family: verdana, arial, helvetica, sans-serif;
- font-size: 13px;
- line-height: 18px;
-}
-
-p, ol, ul, td {
- font-family: verdana, arial, helvetica, sans-serif;
- font-size: 13px;
- line-height: 18px;
-}
-
-pre {
- background-color: #eee;
- padding: 10px;
- font-size: 11px;
-}
-
-a {
- color: #000;
- &:visited {
- color: #666;
- }
- &:hover {
- color: #fff;
- background-color: #000;
- }
-}
-
-div {
- &.field, &.actions {
- margin-bottom: 10px;
- }
-}
-
-#notice {
- color: green;
-}
-
-.field_with_errors {
- padding: 2px;
- background-color: red;
- display: table;
-}
-
-#error_explanation {
- width: 450px;
- border: 2px solid red;
- padding: 7px;
- padding-bottom: 0;
- margin-bottom: 20px;
- background-color: #f0f0f0;
- h2 {
- text-align: left;
- font-weight: bold;
- padding: 5px 5px 5px 15px;
- font-size: 12px;
- margin: -7px;
- margin-bottom: 0px;
- background-color: #c00;
- color: #fff;
- }
- ul li {
- font-size: 12px;
- list-style: square;
- }
-}
app/views/layouts/_header.html.erb
@@ -0,0 +1,27 @@
+<div class="navbar navbar-fixed-top">
+ <div class="navbar-inner">
+ <div class="container">
+ <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </a>
+ <a class="brand" href="/">Volta</a>
+ <div class="nav-collapse"></div>
+ <ul class="nav pull-right">
+ <% if user_signed_in? %>
+ <li class="dropdown">
+ <a class="dropdown-toggle" data-toggle="dropdown" href="#"><%= current_user.email %><b class="caret"></b></a>
+ <ul class="dropdown-menu">
+ <li> <%= link_to "My Readings", readings_path %> </li>
+ <li class="divider"></li>
+ <li><%= link_to('Logout', destroy_user_session_path, :method => :delete) %></li>
+ </ul>
+ </li>
+ <% else %>
+ <li> <a href="<%= url_for new_user_session_path %>">Sign In</a> </li>
+ <% end %>
+ </ul>
+ </div>
+ </div>
+</div>
app/views/layouts/_messages.html.erb
@@ -0,0 +1,14 @@
+<div class="row">
+ <div class="span12">
+ <% if(flash.any?) -%>
+ <% flash.each do |key, value| -%>
+ <% Array(value).uniq.each do |message| -%>
+ <div class="alert alert-<%= key %>">
+ <a class="close" data-dismiss="alert" href="#">×</a>
+ <%= message %>
+ </div>
+ <% end -%>
+ <% end -%>
+ <% end -%>
+ </div>
+</div>
app/views/layouts/application.html.erb
@@ -1,14 +1,25 @@
<!DOCTYPE html>
-<html>
-<head>
- <title>Yycrebuild</title>
- <%= stylesheet_link_tag "application", :media => "all" %>
- <%= javascript_include_tag "application" %>
- <%= csrf_meta_tags %>
-</head>
-<body>
-
-<%= yield %>
-
-</body>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
+ <title>YYC Rebuild</title>
+ <%= stylesheet_link_tag :application %>
+ <%= yield :head %>
+ <%= csrf_meta_tags %>
+ </head>
+ <body>
+ <%= render "layouts/header" %>
+ <div class="container">
+ <%= render "layouts/messages" %>
+ <%= yield %>
+ </div> <!-- /container -->
+ <%= render "layouts/footer" %>
+ <%= javascript_include_tag :application %>
+ <!--[if lt IE 9]>
+ <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
+ <![endif]-->
+ <%= yield :javascript %>
+ </body>
</html>
Gemfile
@@ -2,6 +2,7 @@ source 'https://rubygems.org'
gem 'rails', '3.2.13'
gem 'devise'
gem 'sqlite3'
+gem 'bootstrap-sass'
group :assets do
gem 'sass-rails', '~> 3.2.3'
Gemfile.lock
@@ -30,6 +30,8 @@ GEM
multi_json (~> 1.0)
arel (3.0.2)
bcrypt-ruby (3.0.1)
+ bootstrap-sass (2.3.2.0)
+ sass (~> 3.2)
builder (3.0.4)
coffee-rails (3.2.2)
coffee-script (>= 2.2.0)
@@ -113,6 +115,7 @@ PLATFORMS
ruby
DEPENDENCIES
+ bootstrap-sass
coffee-rails (~> 3.2.1)
devise
jquery-rails