diff --git a/app/assets/images/g-normal.png b/app/assets/images/g-normal.png new file mode 100644 index 00000000..b8d4958e Binary files /dev/null and b/app/assets/images/g-normal.png differ diff --git a/app/assets/images/twitter_signin_logo.png b/app/assets/images/twitter_signin_logo.png new file mode 100644 index 00000000..17d213ba Binary files /dev/null and b/app/assets/images/twitter_signin_logo.png differ diff --git a/app/assets/stylesheets/landing.scss b/app/assets/stylesheets/landing.scss index 06900393..6d592f1d 100644 --- a/app/assets/stylesheets/landing.scss +++ b/app/assets/stylesheets/landing.scss @@ -21,6 +21,10 @@ width: 200px; padding: 0; } + .login-text { + font-size: 16px; + padding-right: 5px; + } } .rooms { diff --git a/app/assets/stylesheets/sessions.scss b/app/assets/stylesheets/sessions.scss new file mode 100644 index 00000000..bafc7bbc --- /dev/null +++ b/app/assets/stylesheets/sessions.scss @@ -0,0 +1,7 @@ +.login { + .center-panel { + .center-panel-size { + max-width: 400px + } + } +} diff --git a/app/assets/stylesheets/shared.scss b/app/assets/stylesheets/shared.scss index e6d8d0ca..9b4f9e6e 100644 --- a/app/assets/stylesheets/shared.scss +++ b/app/assets/stylesheets/shared.scss @@ -26,7 +26,7 @@ html, body { background: #ffffff; } -.app-background { +.background { height: 350px; width: 100%; background: asset-url('greenlight_background'); @@ -35,6 +35,10 @@ html, body { background-repeat: no-repeat; } +body[data-controller=landing].app-background { + @extend .background; +} + body[data-controller=landing][data-action=rooms].app-background { background-image: asset-url('bg_personal_room'); } @@ -61,14 +65,14 @@ body[data-controller=landing][data-action=rooms].app-background { padding: 20px; } +.center-block { + float: none; +} .center-panel { - .center-block { - float: none; - } .center-panel-size { max-width: 900px } - .center-panel-conent-size { + .center-panel-content-size { max-width: 800px; } @@ -114,3 +118,42 @@ body[data-controller=landing][data-action=rooms].app-background { .popover { max-width: none; } + +a.signin-link { + &:hover, &:focus { + cursor: pointer; + text-decoration: none; + } +} + +.signin-link { + .signin-icon { + vertical-align: middle; + width: 35px; + height: 35px; + } + .signin-button { + background: white; + width: 250px; + border: thin solid #888; + border-radius: 2px; + white-space: nowrap; + padding: 5px; + margin-bottom: 14px; + } + .signin-icon-wrapper { + display: inline-block; + width: 40px; + } + .signin-text-wrapper { + display: inline-block; + width: 200px; + } + .signin-text { + font-family: 'Roboto', sans-serif; + vertical-align: middle; + font-size: 14px; + font-weight: bold; + color: #444; + } +} diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb index c09a982e..e78b87cc 100644 --- a/app/controllers/sessions_controller.rb +++ b/app/controllers/sessions_controller.rb @@ -15,6 +15,10 @@ # with BigBlueButton; if not, see . class SessionsController < ApplicationController + + def new + end + def create @user = User.from_omniauth(request.env['omniauth.auth']) session[:user_id] = @user.id diff --git a/app/views/landing/_rooms_center_panel.html.erb b/app/views/landing/_rooms_center_panel.html.erb index f1aa431c..47fa3252 100644 --- a/app/views/landing/_rooms_center_panel.html.erb +++ b/app/views/landing/_rooms_center_panel.html.erb @@ -28,7 +28,7 @@ with BigBlueButton; if not, see . <% end %> <%= render layout: 'shared/center_panel' do %> -
+
<% if admin? %> <%= render 'shared/meeting_url', hidden: false %> <% else %> diff --git a/app/views/landing/index.html.erb b/app/views/landing/index.html.erb index e1b44c6c..43844364 100644 --- a/app/views/landing/index.html.erb +++ b/app/views/landing/index.html.erb @@ -33,12 +33,18 @@ with BigBlueButton; if not, see .
<%= render layout: 'shared/center_panel' do %> -
+
<%= render 'shared/meeting_url', hidden: false %> <%= render 'shared/join_form' %>
<% end %>
+ +
diff --git a/app/views/landing/meetings.html.erb b/app/views/landing/meetings.html.erb index 0426a276..68ba27a8 100644 --- a/app/views/landing/meetings.html.erb +++ b/app/views/landing/meetings.html.erb @@ -36,7 +36,7 @@ with BigBlueButton; if not, see .
<%= render layout: 'shared/center_panel' do %> -
+
<%= render 'shared/meeting_url', hidden: true %> <%= render 'shared/join_form' %>
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 966aab86..ca6114c9 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -23,6 +23,7 @@ with BigBlueButton; if not, see . <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %> <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %> + @@ -35,35 +36,9 @@ with BigBlueButton; if not, see . <%= link_to image_tag("bbb-logo.png", :alt => "BigBlueButton", :class => "logo"), root_path %> - + <% unless params[:controller] == 'sessions' && params[:action] == 'new' %> + <%= render 'shared/signup' %> + <% end %>
diff --git a/app/views/sessions/new.erb b/app/views/sessions/new.erb new file mode 100644 index 00000000..b3dde2ed --- /dev/null +++ b/app/views/sessions/new.erb @@ -0,0 +1,43 @@ +<% content_for :title do %> +
+

<%= t('log_in') %>

+
+<% end %> + + diff --git a/app/views/shared/_signup.html.erb b/app/views/shared/_signup.html.erb new file mode 100644 index 00000000..0530e157 --- /dev/null +++ b/app/views/shared/_signup.html.erb @@ -0,0 +1,13 @@ + diff --git a/config/locales/en-us.yml b/config/locales/en-us.yml index 998678ac..ceb2652d 100644 --- a/config/locales/en-us.yml +++ b/config/locales/en-us.yml @@ -89,7 +89,6 @@ en-US: phrase1: "One of your recordings has just been made available." phrase2: "Access the following website to view it and publish to other users: %{url}" subject: "Your recording is ready!" - oauth_signup: Signup for customized meetings past_recordings: Past Recordings footer_html: "%{greenlight_link} build %{version}, Powered by %{bbb_link}" presentation: Presentation @@ -97,6 +96,8 @@ en-US: published: Published return_to_room: Return to your personal room session_url_explanation: The meeting will be taking place using the following URL + signin_text: Log in with %{provider} + login_description: Login for customized sessions start: Start start_meeting: Start Meeting your_personal_room: Your Personal Room diff --git a/config/routes.rb b/config/routes.rb index 5c89477d..83d238c0 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -19,6 +19,7 @@ Rails.application.routes.draw do mount ActionCable.server => '/cable' resources :users, only: [:edit, :update] + get '/users/login', to: 'sessions#new' get '/users/logout', to: 'sessions#destroy', as: :user_logout match '/auth/:provider/callback', to: 'sessions#create', via: [:get, :post]