Merge branch 'master' into front-end
This commit is contained in:
commit
e7b4b74c00
Binary file not shown.
After Width: | Height: | Size: 1.6 MiB |
|
@ -18,3 +18,4 @@
|
||||||
body {
|
body {
|
||||||
background-color: $background;
|
background-color: $background;
|
||||||
}
|
}
|
||||||
|
@import "devise/index";
|
||||||
|
|
|
@ -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;
|
||||||
|
}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
// Import your components CSS files here.
|
// Import your components CSS files here.
|
||||||
@import "alert";
|
@import "alert";
|
||||||
@import "navbar";
|
@import "navbar";
|
||||||
|
@import "banner";
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
@import 'login';
|
|
@ -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%;
|
||||||
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
class ApplicationController < ActionController::Base
|
class ApplicationController < ActionController::Base
|
||||||
protect_from_forgery with: :exception
|
protect_from_forgery with: :exception
|
||||||
before_action :authenticate_user!
|
# before_action :authenticate_user!
|
||||||
protect_from_forgery unless: -> { request.format.json? } # Only accept json
|
protect_from_forgery unless: -> { request.format.json? } # Only accept json
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,9 +1,12 @@
|
||||||
class PagesController < ApplicationController
|
class PagesController < ApplicationController
|
||||||
skip_before_action :authenticate_user!, only: [:call]
|
# skip_before_action :authenticate_user!, only: [:call]
|
||||||
|
|
||||||
def call
|
def call
|
||||||
end
|
end
|
||||||
|
|
||||||
def index
|
def index
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def home
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
<h2>Sign up</h2>
|
<div class="login-container">
|
||||||
|
<div class="login-content">
|
||||||
|
<h2>Sign up</h2>
|
||||||
|
|
||||||
<%= simple_form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
|
<%= simple_form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
|
||||||
<%= f.error_notification %>
|
<%= f.error_notification %>
|
||||||
|
|
||||||
<div class="form-inputs">
|
<div class="form-inputs">
|
||||||
|
@ -18,8 +20,10 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-actions">
|
<div class="form-actions">
|
||||||
<%= f.button :submit, "Sign up" %>
|
<%= f.button :submit, "Sign up", class: "login btn btn-primary" %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%= render "devise/shared/links" %>
|
<%= render "devise/shared/links" %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
<h2>Log in</h2>
|
<div class="login-container">
|
||||||
|
<div class="login-content">
|
||||||
|
<h2>Log in</h2>
|
||||||
|
|
||||||
<%= simple_form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
|
<%= simple_form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
|
||||||
<div class="form-inputs">
|
<div class="form-inputs">
|
||||||
<%= f.input :email,
|
<%= f.input :email,
|
||||||
required: false,
|
required: false,
|
||||||
|
@ -13,8 +15,10 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-actions">
|
<div class="form-actions">
|
||||||
<%= f.button :submit, "Log in" %>
|
<%= f.button :submit, "Log in", class: "login btn btn-primary" %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%= render "devise/shared/links" %>
|
<%= render "devise/shared/links" %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
||||||
<%- if devise_mapping.registerable? && controller_name != 'registrations' %>
|
<%- if devise_mapping.registerable? && controller_name != 'registrations' %>
|
||||||
<%= link_to "Sign up", new_registration_path(resource_name) %><br />
|
<%#= link_to "Sign up", new_registration_path(resource_name) %><!-- <br /> -->
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
||||||
<%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %>
|
<%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %>
|
||||||
|
|
|
@ -3,14 +3,14 @@
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||||
<title>TODO</title>
|
<title>Polyglot</title>
|
||||||
<%= csrf_meta_tags %>
|
<%= csrf_meta_tags %>
|
||||||
<%= action_cable_meta_tag %>
|
<%= action_cable_meta_tag %>
|
||||||
<%= stylesheet_link_tag 'application', media: 'all' %>
|
<%= stylesheet_link_tag 'application', media: 'all' %>
|
||||||
<%#= stylesheet_pack_tag 'application', media: 'all' %> <!-- Uncomment if you import CSS in app/javascript/packs/application.js -->
|
<%#= stylesheet_pack_tag 'application', media: 'all' %> <!-- Uncomment if you import CSS in app/javascript/packs/application.js -->
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<%= render 'shared/navbar' %>
|
<%= render 'shared/navbar' unless params["action"] == "home"%>
|
||||||
<%= render 'shared/flashes' %>
|
<%= render 'shared/flashes' %>
|
||||||
<%= yield %>
|
<%= yield %>
|
||||||
<%= javascript_include_tag 'application' %>
|
<%= javascript_include_tag 'application' %>
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
<div class="banner" style="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('<%= image_path 'phone.jpg' %>');">
|
||||||
|
<div class="banner-content">
|
||||||
|
<h1>Make a call</h1>
|
||||||
|
<p>Communicate in different languages</p>
|
||||||
|
<p>and receive real-time translated</p>
|
||||||
|
<p> subtitles in your native tongue.</p>
|
||||||
|
<p>
|
||||||
|
<span id="banner-typed-text"></span>
|
||||||
|
</p>
|
||||||
|
<%= link_to "Sign Up",new_user_registration_path, class: "btn btn-primary btn-lg" %>
|
||||||
|
<%= link_to "Login", new_user_session_path, class: "btn btn-primary btn-lg" %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<% unless current_user.nil? %>
|
||||||
|
|
||||||
|
<% end %>
|
|
@ -1,10 +1,14 @@
|
||||||
Rails.application.routes.draw do
|
Rails.application.routes.draw do
|
||||||
get 'video_sessions/create'
|
get 'video_sessions/create'
|
||||||
devise_for :users
|
devise_for :users, path: '', path_names: { sign_out: 'logout'}
|
||||||
root to: 'pages#call'
|
devise_scope :user do
|
||||||
|
get '/logout', to: 'devise/sessions#destroy'
|
||||||
|
end
|
||||||
|
root to: 'pages#home'
|
||||||
get '/contacts', to: 'pages#index'
|
get '/contacts', to: 'pages#index'
|
||||||
post '/sessions', to: 'video_sessions#create'
|
post '/sessions', to: 'video_sessions#create'
|
||||||
|
|
||||||
mount ActionCable.server, at: '/cable'
|
mount ActionCable.server, at: '/cable'
|
||||||
# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
|
# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
|
||||||
|
get '/home', to: 'pages#home'
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue