Commit 849985a6 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'ee-login-layout' into 'master'

EE login layout

Port login layout from EE

See merge request !964
parents a66d6a52 5c51e483
app/assets/images/brand_logo.png

24.7 KB

...@@ -6,11 +6,13 @@ ...@@ -6,11 +6,13 @@
} }
.login-box{ .login-box{
max-width: 304px; }
position: relative;
@include border-radius(5px); .brand-image {
margin: auto; margin-bottom: 20px;
background: white; img {
max-width: 100%;
}
} }
.login-logo{ .login-logo{
...@@ -19,7 +21,7 @@ ...@@ -19,7 +21,7 @@
} }
.form-control { .form-control {
background-color: #f1f1f1; background-color: #F5F5F5;
font-size: 16px; font-size: 16px;
padding: 14px 10px; padding: 14px 10px;
width: 100%; width: 100%;
...@@ -41,6 +43,10 @@ ...@@ -41,6 +43,10 @@
margin-bottom:0px; margin-bottom:0px;
@include border-radius(0); @include border-radius(0);
} }
&:active, &:focus {
background-color: #FFF;
}
} }
.login-box a.forgot { .login-box a.forgot {
......
...@@ -172,8 +172,8 @@ ul.nav.nav-projects-tabs { ...@@ -172,8 +172,8 @@ ul.nav.nav-projects-tabs {
} }
.public-clone { .public-clone {
background: #333; background: #EEE;
color: #f5f5f5; color: #777;
padding: 6px 10px; padding: 6px 10px;
margin: 1px; margin: 1px;
font-weight: normal; font-weight: normal;
......
module BrandHelper
def brand_title
'GitLab Community Edition'
end
def brand_image
image_tag 'brand_logo.png'
end
def brand_text
default_text =<<eos
### GitLab is open source software to collaborate on code.
Manage git repositories with fine grained access controls that keep your code secure.
Perform code reviews and enhance collaboration with merge requests.
Each project can also have an issue tracker and a wiki.
Used by more than 100,000 organizations, GitLab is the most popular solution to manage git repositories on-premises.
Read more about GitLab at [about.gitlab.com](https://about.gitlab.com/).
eos
markdown default_text
end
end
.login-box .login-box.panel.panel-default
%h3.page-title Resend confirmation instructions .panel-heading
= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %h3.panel-title Resend confirmation instructions
.devise-errors .panel-body
= devise_error_messages! = form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f|
.clearfix.append-bottom-20 .devise-errors
= f.email_field :email, placeholder: 'Email', class: "form-control", required: true = devise_error_messages!
.clearfix.append-bottom-10 .clearfix.append-bottom-20
= f.submit "Resend confirmation instructions", class: 'btn btn-success' = f.email_field :email, placeholder: 'Email', class: "form-control", required: true
%hr .clearfix.append-bottom-10
%p = f.submit "Resend confirmation instructions", class: 'btn btn-success'
%span.light .panel-footer
Already have login and password? = render 'devise/shared/sign_in_link'
%strong
= link_to "Sign in", new_session_path(resource_name)
= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put, class: "login-box" }) do |f| .login-box.panel.panel-default
%h3 Change your password .panel-heading
.devise-errors %h3.panel-title Change your password
= devise_error_messages! .panel-body
= f.hidden_field :reset_password_token = form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f|
%div .devise-errors
= f.password_field :password, class: "form-control top", placeholder: "New password", required: true = devise_error_messages!
%div = f.hidden_field :reset_password_token
= f.password_field :password_confirmation, class: "form-control bottom", placeholder: "Confirm new password", required: true %div
%div = f.password_field :password, class: "form-control top", placeholder: "New password", required: true
.clearfix.append-bottom-10 %div
= f.submit "Change my password", class: "btn btn-primary" = f.password_field :password_confirmation, class: "form-control bottom", placeholder: "Confirm new password", required: true
= link_to "Sign in", new_session_path(resource_name), class: "btn pull-right" .clearfix.append-bottom-10
%div = f.submit "Change my password", class: "btn btn-primary"
= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) .panel-footer
%p
= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name)
= render 'devise/shared/sign_in_link'
= form_for(resource, as: resource_name, url: password_path(resource_name), html: { class: "login-box", method: :post }) do |f| .login-box.panel.panel-default
%h3.page-title Reset password .panel-heading
.devise-errors %h3.panel-title Reset password
= devise_error_messages! .panel-body
.clearfix.append-bottom-20 = form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f|
= f.email_field :email, placeholder: "Email", class: "form-control", required: true .devise-errors
.clearfix.append-bottom-10 = devise_error_messages!
= f.submit "Reset password", class: "btn-primary btn" .clearfix.append-bottom-20
%hr = f.email_field :email, placeholder: "Email", class: "form-control", required: true
%p .clearfix.append-bottom-10
%span.light = f.submit "Reset password", class: "btn-primary btn"
Already have login and password? .panel-footer
%strong = render 'devise/shared/sign_in_link'
= link_to "Sign in", new_session_path(resource_name)
= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { class: "login-box" }) do |f| .login-box.panel.panel-success
%h3.page-title Sign Up .panel-heading
.devise-errors %h3.panel-title Sign up
= devise_error_messages! .panel-body
%div = form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f|
= f.text_field :name, class: "form-control top", placeholder: "Name", required: true .devise-errors
%div = devise_error_messages!
= f.text_field :username, class: "form-control middle", placeholder: "Username", required: true %div
%div = f.text_field :name, class: "form-control top", placeholder: "Name", required: true
= f.email_field :email, class: "form-control middle", placeholder: "Email", required: true %div
%div = f.text_field :username, class: "form-control middle", placeholder: "Username", required: true
= f.password_field :password, class: "form-control middle", placeholder: "Password", required: true %div
%div = f.email_field :email, class: "form-control middle", placeholder: "Email", required: true
= f.password_field :password_confirmation, class: "form-control bottom", placeholder: "Confirm password", required: true %div
%div = f.password_field :password, class: "form-control middle", placeholder: "Password", required: true
= f.submit "Sign up", class: "btn-create btn" %div
%hr = f.password_field :password_confirmation, class: "form-control bottom", placeholder: "Confirm password", required: true
%p %div
%span.light = f.submit "Sign up", class: "btn-create btn"
Have an account? .panel-footer
%strong %p
= link_to "Sign in", new_session_path(resource_name) %span.light
%p Have an account?
= link_to "Forgot your password?", new_password_path(resource_name) %strong
= link_to "Sign in", new_session_path(resource_name)
%p
= link_to "Forgot your password?", new_password_path(resource_name)
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
%span Remember me %span Remember me
%div %div
= hidden_field_tag 'return_to', params[:return_to] = hidden_field_tag 'return_to', params[:return_to]
= f.submit "Sign in", class: "btn-create btn" = f.submit "Sign in", class: "btn-save btn"
.pull-right .pull-right
= link_to "Forgot your password?", new_password_path(resource_name), class: "btn" = link_to "Forgot your password?", new_password_path(resource_name), class: "btn"
...@@ -2,4 +2,4 @@ ...@@ -2,4 +2,4 @@
= text_field_tag :username, nil, {class: "form-control top", placeholder: "LDAP Login", autofocus: "autofocus"} = text_field_tag :username, nil, {class: "form-control top", placeholder: "LDAP Login", autofocus: "autofocus"}
= password_field_tag :password, nil, {class: "form-control bottom", placeholder: "Password"} = password_field_tag :password, nil, {class: "form-control bottom", placeholder: "Password"}
%br/ %br/
= submit_tag "LDAP Sign in", class: "btn-create btn" = submit_tag "LDAP Sign in", class: "btn-save btn"
.login-box .login-box.panel.panel-primary
%h3.page-title Sign in .panel-heading
- if ldap_enabled? && gitlab_config.signin_enabled %h3.panel-title Sign in
%ul.nav.nav-tabs .panel-body
%li.active - if ldap_enabled? && gitlab_config.signin_enabled
= link_to 'LDAP', '#tab-ldap', 'data-toggle' => 'tab' %ul.nav.nav-tabs
%li %li.active
= link_to 'Standard', '#tab-signin', 'data-toggle' => 'tab' = link_to 'LDAP', '#tab-ldap', 'data-toggle' => 'tab'
.tab-content %li
%div#tab-ldap.tab-pane.active = link_to 'Standard', '#tab-signin', 'data-toggle' => 'tab'
= render partial: 'devise/sessions/new_ldap' .tab-content
%div#tab-signin.tab-pane %div#tab-ldap.tab-pane.active
= render partial: 'devise/sessions/new_base' = render partial: 'devise/sessions/new_ldap'
%div#tab-signin.tab-pane
= render partial: 'devise/sessions/new_base'
- elsif ldap_enabled?
= render partial: 'devise/sessions/new_ldap'
- elsif gitlab_config.signin_enabled
= render partial: 'devise/sessions/new_base'
- else
%div
No authentication methods configured.
= render 'devise/sessions/oauth_providers' if Gitlab.config.omniauth.enabled && devise_mapping.omniauthable?
.panel-footer
- if gitlab_config.signup_enabled
%p
%span.light
Don't have an account?
%strong
= link_to "Sign up", new_registration_path(resource_name)
- elsif ldap_enabled?
= render partial: 'devise/sessions/new_ldap'
- elsif gitlab_config.signin_enabled
= render partial: 'devise/sessions/new_base'
- else
%div
No authentication methods configured.
= render 'devise/sessions/oauth_providers' if Gitlab.config.omniauth.enabled && devise_mapping.omniauthable?
%hr
- if gitlab_config.signup_enabled
%p %p
%span.light %span.light Did not receive confirmation email?
Don't have an account? = link_to "Send again", new_confirmation_path(resource_name)
%strong
= link_to "Sign up", new_registration_path(resource_name)
%p
%span.light Did not receive confirmation email?
= link_to "Send again", new_confirmation_path(resource_name)
- if extra_config.has_key?('sign_in_text') - if extra_config.has_key?('sign_in_text')
%hr %hr
= markdown(extra_config.sign_in_text) = markdown(extra_config.sign_in_text)
%p
%span.light
Already have login and password?
%strong
= link_to "Sign in", new_session_path(resource_name)
...@@ -5,13 +5,16 @@ ...@@ -5,13 +5,16 @@
= render "layouts/flash" = render "layouts/flash"
.container .container
.content .content
.center .login-title
%h1 GitLab %h1= brand_title
%p.light
GitLab is open source software to collaborate on code.
%br
Sign in or browse for #{link_to "public projects", public_projects_path}.
%hr %hr
.container .container
.content .content
= yield .row
.col-md-7
.brand-image
= brand_image
.brand_text
= brand_text
.col-md-5
= yield
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
%small.access-icon %small.access-icon
= internal_icon = internal_icon
Internal Internal
.pull-right .pull-right.hidden-sm.hidden-xs
%pre.public-clone git clone #{project.http_url_to_repo} %pre.public-clone git clone #{project.http_url_to_repo}
- if project.description.present? - if project.description.present?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment