From 790cb26f2a4662ad735c64b2b32d2766ccb4887d Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Thu, 9 Jul 2015 16:49:51 -0400 Subject: [PATCH] We basically are reddit now --- app/assets/stylesheets/custom.scss | 5 +++++ app/views/application/_navbar.html.slim | 13 +++++++++++++ app/views/layouts/application.html.erb | 14 -------------- app/views/layouts/application.html.slim | 13 +++++++++++++ config/routes.rb | 2 ++ 5 files changed, 33 insertions(+), 14 deletions(-) create mode 100644 app/views/application/_navbar.html.slim delete mode 100644 app/views/layouts/application.html.erb create mode 100644 app/views/layouts/application.html.slim diff --git a/app/assets/stylesheets/custom.scss b/app/assets/stylesheets/custom.scss index baccee2..b0bbad6 100644 --- a/app/assets/stylesheets/custom.scss +++ b/app/assets/stylesheets/custom.scss @@ -1,2 +1,7 @@ +$navbar-default-brand-color: black; +$navbar-default-bg: #cee3f8; +$navbar-default-link-color: #369; +$navbar-default-link-hover-color: #369; + @import "bootstrap-sprockets"; @import "bootstrap"; diff --git a/app/views/application/_navbar.html.slim b/app/views/application/_navbar.html.slim new file mode 100644 index 0000000..9a2531a --- /dev/null +++ b/app/views/application/_navbar.html.slim @@ -0,0 +1,13 @@ +.navbar.navbar-default.navbar-static-top + .container-fluid + .navbar-header + button.navbar-toggle.collapsed type='button' data-toggle='collapse' data-target='.navbar-collapse' + span.sr-only Toggle navigation + span.icon-bar + span.icon-bar + span.icon-bar + = link_to 'Creddit', root_path, class: 'navbar-brand' + .collapse.navbar-collapse + ul.nav.navbar-nav.navbar-right + li= link_to 'Create Account', new_user_path + diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb deleted file mode 100644 index 995e46b..0000000 --- a/app/views/layouts/application.html.erb +++ /dev/null @@ -1,14 +0,0 @@ - - - - Creddit - <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %> - <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %> - <%= csrf_meta_tags %> - - - -<%= yield %> - - - diff --git a/app/views/layouts/application.html.slim b/app/views/layouts/application.html.slim new file mode 100644 index 0000000..c0935bf --- /dev/null +++ b/app/views/layouts/application.html.slim @@ -0,0 +1,13 @@ +doctype html +html + head + title Creddit + = stylesheet_link_tag 'application', media: 'all' + = javascript_include_tag 'application' + = csrf_meta_tags + + body + == render 'navbar' + + .container-fluid + = yield diff --git a/config/routes.rb b/config/routes.rb index feb0a5b..0b5bce2 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,3 +1,5 @@ Rails.application.routes.draw do resources :users, only: [:new, :create] + + root to: 'users#new' end