diff --git a/Gemfile.lock b/Gemfile.lock index b3cb64d2..66c9d0d0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,6 +1,8 @@ GEM remote: https://rubygems.org/ specs: + action_interceptor (1.1.0) + rails (>= 3.1) actioncable (5.0.7) actionpack (= 5.0.7) nio4r (>= 1.2, < 3.0) @@ -77,6 +79,12 @@ GEM faraday (0.12.2) multipart-post (>= 1.2, < 3) ffi (1.9.23) + fine_print (3.1.0) + action_interceptor (>= 1.0) + jquery-rails + rails (>= 3.1) + responders + squeel font-awesome-sass (5.0.13) sassc (>= 1.11) globalid (0.4.1) @@ -133,6 +141,8 @@ GEM omniauth-twitter (1.4.0) omniauth-oauth (~> 1.1) rack + polyamorous (1.1.0) + activerecord (>= 3.0) popper_js (1.12.9) puma (3.11.4) rack (2.0.5) @@ -169,6 +179,9 @@ GEM rb-fsevent (0.10.3) rb-inotify (0.9.10) ffi (>= 0.5.0, < 2) + responders (2.4.0) + actionpack (>= 4.2.0, < 5.3) + railties (>= 4.2.0, < 5.3) rspec-core (3.7.1) rspec-support (~> 3.7.0) rspec-expectations (3.7.0) @@ -214,6 +227,10 @@ GEM activesupport (>= 4.0) sprockets (>= 3.0.0) sqlite3 (1.3.13) + squeel (1.2.3) + activerecord (>= 3.0) + activesupport (>= 3.0) + polyamorous (~> 1.1.0) tabler-rubygem (0.1.2) autoprefixer-rails (>= 6.0.3) thor (0.20.0) @@ -248,6 +265,7 @@ DEPENDENCIES dotenv-rails factory_bot_rails faker + fine_print font-awesome-sass (~> 5.0.13) jbuilder (~> 2.5) jquery-rails diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 826c736e..bc449f51 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -41,14 +41,6 @@ $background-color: #D1E2FF; $rule-color: lightblue; -.header { - background-color: transparent; -} - -.footer { - background-color: $background-color; -} - .video-container { position: relative; width: 100%; @@ -77,8 +69,23 @@ iframe{ html, body { width: 100%; height: 100%; - background: linear-gradient(180deg, $background-color 50%, white 50%); - background-repeat: no-repeat; + //background: linear-gradient(180deg, $background-color 50%, white 50%); + //background-repeat: no-repeat; + background-color: $background-color; +} + +.wrapper { + min-height:100%; + position:relative; +} + +.footer { + width: 100%; + height: 70px; + position: absolute; + bottom: 0; + left: 0; + text-align: center; } .small-rule { @@ -88,7 +95,7 @@ html, body { } .thumbnail { - height: 60%; + height: 40%; width: auto; } @@ -125,19 +132,6 @@ body[data-controller=landing].app-background { z-index: 999; } -.header { - padding: 20px 40px; - margin-bottom: 160px; - .logo { - max-width: 150px; - max-height: 50px; - } -} - -.footer { - padding: 20px; -} - .center-block { float: none; } diff --git a/app/controllers/main_controller.rb b/app/controllers/main_controller.rb index 5eb1a746..38a8ae1d 100644 --- a/app/controllers/main_controller.rb +++ b/app/controllers/main_controller.rb @@ -1,6 +1,6 @@ class MainController < ApplicationController - before_action :redirect_to_room + #before_action :redirect_to_room # GET / def index diff --git a/app/helpers/sessions_helper.rb b/app/helpers/sessions_helper.rb index 38a76521..df0d909b 100644 --- a/app/helpers/sessions_helper.rb +++ b/app/helpers/sessions_helper.rb @@ -2,7 +2,8 @@ module SessionsHelper # Logs a user into GreenLight. def login(user) session[:user_id] = user.id - redirect_to room_path(user.room.uid) + redirect_to root_path + #redirect_to room_path(user.room.uid) end # Logs current user out of GreenLight. diff --git a/app/models/user.rb b/app/models/user.rb index 520c43be..a664d32b 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -81,6 +81,10 @@ class User < ApplicationRecord end end + def firstname + name.split(' ').first + end + private # Initializes a room for the user. diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index a0bd83ef..18d007ef 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -12,24 +12,28 @@ data-resource="<%= params[:resource] %>" data-current-user="<%= current_user.try(:encrypted_id) %>"> - -
-
- <% flash.each do |name, msg| %> - - <% end %> +
+ + +
+
+ <% flash.each do |name, msg| %> + + <% end %> +
+ + <%= render "shared/header" %> + + <%= yield %> + + <%= render "shared/footer" %> +
- - <%= render "shared/header" %> - - <%= yield %> - - <%= render "shared/footer" %> diff --git a/app/views/main/index.html.erb b/app/views/main/index.html.erb index 8e7a5a0c..c857a42e 100644 --- a/app/views/main/index.html.erb +++ b/app/views/main/index.html.erb @@ -1,16 +1,21 @@
-

Teach Students Online.

-
- <%= render "shared/start_meeting" %> + <% if current_user %> +

<%= "Welcome, #{current_user.firstname}." %>

+ <%= render "shared/modals/create_room_modal" %> + <% else %> +

Teach Students Online.

+ <%= render "shared/modals/video_modal" %> + <% end %> +
+ +
<%= render "shared/features" %>
-<%= render "shared/modals/video_modal" %> - \ No newline at end of file