Permalink
Browse files

added logins, logout...

run rails generate devise:views
  • Loading branch information...
1 parent b4e520c commit b219233aacbac4d1fb7073f1c1b15669a463f129 @hoornet committed Nov 25, 2013
View
@@ -19,6 +19,8 @@ end
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0'
+gem 'bootstrap-sass', github: 'thomas-mcdonald/bootstrap-sass', branch: '3'
+
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
View
@@ -1,3 +1,11 @@
+GIT
+ remote: git://github.com/thomas-mcdonald/bootstrap-sass.git
+ revision: 9c6c07f74ff515cf38380b014cfede14a4f0eae4
+ branch: 3
+ specs:
+ bootstrap-sass (3.0.0.0)
+ sass (~> 3.2)
+
GEM
remote: https://rubygems.org/
specs:
@@ -27,6 +35,7 @@ GEM
tzinfo (~> 0.3.37)
arel (4.0.1)
atomic (1.1.14)
+ bcrypt-ruby (3.1.2)
bcrypt-ruby (3.1.2-x86-mingw32)
builder (3.1.4)
coffee-rails (4.0.1)
@@ -121,6 +130,7 @@ PLATFORMS
x86-mingw32
DEPENDENCIES
+ bootstrap-sass!
coffee-rails (~> 4.0.0)
devise
jbuilder (~> 1.2)
@@ -11,3 +11,13 @@
*= require_self
*= require_tree .
*/
+
+@import "bootstrap";
+@import "font-awesome";
+
+// Actual app css
+@import "beaker";
+@import "sidebar";
+@import "footer";
+@import "install_steps";
+
@@ -1,2 +1,32 @@
-<%= link_to "Home", root_path %>
-<%= link_to "About me", about_path %>
+<div class="navbar navbar-fixed-top">
+ <div class="navbar-inner">
+ <div class="container">
+
+ <!-- .btn-navbar is used as the toggle for collapsed navbar content -->
+ <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>
+
+ <!-- Be sure to leave the brand out there if you want it shown -->
+ <%= link_to "One Month Rails", root_path, class: "brand" %>
+
+ <!-- Everything you want hidden at 940px or less, place within here -->
+ <div class="nav-collapse collapse">
+ <ul class="nav">
+ <li><%= link_to "Home", root_path %></li>
+ <li><%= link_to "About", about_path %></li>
+ </ul>
+ <ul class="nav pull-right">
+ <% if user_signed_in? %>
+ <li><%= link_to "Edit profile",edit_user_registration_path %></li>
+ <li><%= link_to "Logout", destroy_user_session_path, method: :delete %></li>
+ <% else %>
+ <li><%= link_to "Login", new_user_session_path %></li>
+ <% end %>
+ </ul>
+ </div>
+ </div>
+ </div>
+</div>
@@ -5,14 +5,15 @@
<%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
<%= javascript_include_tag "application", "data-turbolinks-track" => true %>
<%= csrf_meta_tags %>
+
</head>
<body>
<%= render 'layouts/header' %>
<div class="container">
<% flash.each do |name, msg| %>
- <%= content_tag(:div, msg, class: "asert alert-#{name}") %>
+ <%= content_tag(:div, msg, class: "alert alert-#{name}") %>
<% end %>
<%= yield %>
<%= render 'layouts/footer' %>
@@ -1,9 +1,15 @@
-<h1>Welcome to One month rails</h1>
-<p>You've found the home page for the
- <%= link_to "One month Rails", "http://onemonthrails.com" %>
- application.
-</p>
-<p>
- <%= link_to"Sign up now", "#" %>
-</p>
-
+<% if user_signed_in? %>
+ <h1>You are logged in</h1>
+<% else %>
+ <div class="hero-unit">
+ <h1>Welcome to One month rails</h1>
+ <p>
+ You've found the home page for the
+ <%= link_to "One month Rails", "http://onemonthrails.com" %>
+ application.
+ </p>
+ <p>
+ <%= link_to"Sign up now", new_user_registration_path, class: "btn btn-primary btn-large" %>
+ </p>
+ </div>
+<% end %>

0 comments on commit b219233

Please sign in to comment.