diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index b5ecd7a..fb4d341 100755 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -17,8 +17,13 @@ -<%= render "layouts/shared/header" %> -<%= render "layouts/shared/sidebar" %> +<% if current_user %> + <%= render "layouts/shared/header" %> + <%= render "layouts/shared/sidebar" %> +<% else %> + <%= render "layouts/tutorial/header" %> + <%= render "layouts/tutorial/sidebar" %> +<% end %>
<%= yield %> diff --git a/app/views/layouts/tutorial/_header.html.erb b/app/views/layouts/tutorial/_header.html.erb new file mode 100644 index 0000000..6a9c0a3 --- /dev/null +++ b/app/views/layouts/tutorial/_header.html.erb @@ -0,0 +1,19 @@ + +
+ + <% if not current_user %> +
    +
  • + <%= button_to "signup", "#", {:class => "btn btn-primary", :method => "get"} %> +
  • +
+
    +
  • + <%= button_to "login", login_path, {:class => "btn", :method => "get"} %> +
  • +
+ <% else %> + + <% end %> + +
\ No newline at end of file diff --git a/app/views/layouts/tutorial/_sidebar.html.erb b/app/views/layouts/tutorial/_sidebar.html.erb new file mode 100644 index 0000000..0829777 --- /dev/null +++ b/app/views/layouts/tutorial/_sidebar.html.erb @@ -0,0 +1,163 @@ + + + diff --git a/app/views/sessions/new.html.erb b/app/views/sessions/new.html.erb index e69de29..874c426 100755 --- a/app/views/sessions/new.html.erb +++ b/app/views/sessions/new.html.erb @@ -0,0 +1,26 @@ +
+
+
+
+ +
+
+
\ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index 1440356..7df1d99 100755 --- a/config/routes.rb +++ b/config/routes.rb @@ -2,7 +2,7 @@ Railsgoat::Application.routes.draw do get "users/new" -get "login" => "sessions/new" +get "login" => "sessions#new" resources :sessions do