diff --git a/app/assets/images/phone.jpg b/app/assets/images/phone.jpg new file mode 100644 index 0000000..1f5174a Binary files /dev/null and b/app/assets/images/phone.jpg differ diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 8229f30..c325189 100755 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -18,3 +18,4 @@ body { background-color: $background; } +@import "devise/index"; diff --git a/app/assets/stylesheets/components/_banner.scss b/app/assets/stylesheets/components/_banner.scss new file mode 100644 index 0000000..b4fb557 --- /dev/null +++ b/app/assets/stylesheets/components/_banner.scss @@ -0,0 +1,24 @@ +.banner { + color: white; + text-align: center; + height: 100vh; + /* if you have a 70px navbar => height: calc(100vh - 70px); */ + background-size: cover !important; + display: flex; + align-items: center; + justify-content: center; +} +.banner h1 { + font-size: 60px; + font-weight: bold; + text-shadow: 0px 1px rgba(0, 0, 0, 0.2); + color: #F0FFFF; +} +.banner p { + font-size: 30px; + font-weight: lighter; + color: #F0FFFF; + opacity: 0.8; + margin-bottom: 20px; +} + diff --git a/app/assets/stylesheets/components/_index.scss b/app/assets/stylesheets/components/_index.scss index d60407a..3b518a7 100644 --- a/app/assets/stylesheets/components/_index.scss +++ b/app/assets/stylesheets/components/_index.scss @@ -1,3 +1,4 @@ // Import your components CSS files here. @import "alert"; @import "navbar"; +@import "banner"; diff --git a/app/assets/stylesheets/devise/_index.scss b/app/assets/stylesheets/devise/_index.scss new file mode 100644 index 0000000..57338a7 --- /dev/null +++ b/app/assets/stylesheets/devise/_index.scss @@ -0,0 +1 @@ +@import 'login'; diff --git a/app/assets/stylesheets/devise/_login.scss b/app/assets/stylesheets/devise/_login.scss new file mode 100644 index 0000000..702f4ce --- /dev/null +++ b/app/assets/stylesheets/devise/_login.scss @@ -0,0 +1,40 @@ +.login-container { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + width: 100%; + height: 100vh; + position: absolute; + background-image: + linear-gradient( + -225deg, + rgba(5,25,55,0.3) 0%, + rgba(68,73,101,0.3), + rgba(128,129,149,0.3), + rgba(191,190,200,0.3), + rgba(255,255,255,0.3) + 50%), + url('https://unsplash.com/photos/jay5BqVyf5A'); + + + + .login-content { + position: relative; + top: -10vh; + padding: 50px; + background-color: white; + width: 25vw; + border-radius: 3px; + box-shadow: 1px 1px 10px rgba(0,0,0, 0.21); + + h2 { + color: $primary; + } + } +} + +.login { + // color: $primary; + width:100%; +} diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 9264647..a0dedd0 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -1,5 +1,5 @@ class ApplicationController < ActionController::Base protect_from_forgery with: :exception - before_action :authenticate_user! + # before_action :authenticate_user! protect_from_forgery unless: -> { request.format.json? } # Only accept json end diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb index 6c59475..8aa4a2a 100644 --- a/app/controllers/pages_controller.rb +++ b/app/controllers/pages_controller.rb @@ -1,9 +1,12 @@ class PagesController < ApplicationController - skip_before_action :authenticate_user!, only: [:call] + # skip_before_action :authenticate_user!, only: [:call] def call end def index end + + def home + end end diff --git a/app/views/devise/registrations/new.html.erb b/app/views/devise/registrations/new.html.erb index 8eeba8c..07ec4dd 100644 --- a/app/views/devise/registrations/new.html.erb +++ b/app/views/devise/registrations/new.html.erb @@ -1,25 +1,29 @@ -

Sign up

+
+
+

Sign up

-<%= simple_form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %> - <%= f.error_notification %> + <%= simple_form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %> + <%= f.error_notification %> -
- <%= f.input :email, - required: true, - autofocus: true , - input_html: { autocomplete: "email" }%> - <%= f.input :password, - required: true, - hint: ("#{@minimum_password_length} characters minimum" if @minimum_password_length), - input_html: { autocomplete: "new-password" } %> - <%= f.input :password_confirmation, - required: true, - input_html: { autocomplete: "new-password" } %> +
+ <%= f.input :email, + required: true, + autofocus: true , + input_html: { autocomplete: "email" }%> + <%= f.input :password, + required: true, + hint: ("#{@minimum_password_length} characters minimum" if @minimum_password_length), + input_html: { autocomplete: "new-password" } %> + <%= f.input :password_confirmation, + required: true, + input_html: { autocomplete: "new-password" } %> +
+ +
+ <%= f.button :submit, "Sign up", class: "login btn btn-primary" %> +
+ <% end %> + + <%= render "devise/shared/links" %>
- -
- <%= f.button :submit, "Sign up" %> -
-<% end %> - -<%= render "devise/shared/links" %> +
diff --git a/app/views/devise/sessions/new.html.erb b/app/views/devise/sessions/new.html.erb index e542e61..799901f 100644 --- a/app/views/devise/sessions/new.html.erb +++ b/app/views/devise/sessions/new.html.erb @@ -1,20 +1,24 @@ -

Log in

+
+ diff --git a/app/views/devise/shared/_links.html.erb b/app/views/devise/shared/_links.html.erb index e6a3e41..a87593a 100644 --- a/app/views/devise/shared/_links.html.erb +++ b/app/views/devise/shared/_links.html.erb @@ -3,7 +3,7 @@ <% end -%> <%- if devise_mapping.registerable? && controller_name != 'registrations' %> - <%= link_to "Sign up", new_registration_path(resource_name) %>
+ <%#= link_to "Sign up", new_registration_path(resource_name) %> <% end -%> <%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %> diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 895afbd..6202e07 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -3,14 +3,14 @@ - TODO + Polyglot <%= csrf_meta_tags %> <%= action_cable_meta_tag %> <%= stylesheet_link_tag 'application', media: 'all' %> <%#= stylesheet_pack_tag 'application', media: 'all' %> - <%= render 'shared/navbar' %> + <%= render 'shared/navbar' unless params["action"] == "home"%> <%= render 'shared/flashes' %> <%= yield %> <%= javascript_include_tag 'application' %> diff --git a/app/views/pages/home.html.erb b/app/views/pages/home.html.erb new file mode 100644 index 0000000..97289e0 --- /dev/null +++ b/app/views/pages/home.html.erb @@ -0,0 +1,17 @@ + + +<% unless current_user.nil? %> + +<% end %> diff --git a/config/routes.rb b/config/routes.rb index 57b0c74..38d448f 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,10 +1,14 @@ Rails.application.routes.draw do get 'video_sessions/create' - devise_for :users - root to: 'pages#call' + devise_for :users, path: '', path_names: { sign_out: 'logout'} + devise_scope :user do + get '/logout', to: 'devise/sessions#destroy' + end + root to: 'pages#home' get '/contacts', to: 'pages#index' post '/sessions', to: 'video_sessions#create' mount ActionCable.server, at: '/cable' # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html + get '/home', to: 'pages#home' end