summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-07-11 13:48:50 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-07-11 13:48:50 +0000
commit849985a62dfee0ea32ddd89be1cca78a9ad369a1 (patch)
treedbb584514941422782e4baccd3acc6d74c68426f
parenta66d6a523b0cc2f985ead056a3d39797189ec4be (diff)
parent5c51e4835e59b675ac344840800fe57d7b4749ab (diff)
downloadgitlab-ce-849985a62dfee0ea32ddd89be1cca78a9ad369a1.tar.gz
Merge branch 'ee-login-layout' into 'master'
EE login layout Port login layout from EE See merge request !964
-rw-r--r--app/assets/images/brand_logo.pngbin0 -> 25317 bytes
-rw-r--r--app/assets/stylesheets/sections/login.scss18
-rw-r--r--app/assets/stylesheets/sections/projects.scss4
-rw-r--r--app/helpers/brand_helper.rb23
-rwxr-xr-xapp/views/devise/confirmations/new.html.haml28
-rw-r--r--app/views/devise/passwords/edit.html.haml33
-rwxr-xr-xapp/views/devise/passwords/new.html.haml27
-rw-r--r--app/views/devise/registrations/new.html.haml51
-rw-r--r--app/views/devise/sessions/_new_base.html.haml2
-rw-r--r--app/views/devise/sessions/_new_ldap.html.haml2
-rw-r--r--app/views/devise/sessions/new.html.haml77
-rw-r--r--app/views/devise/shared/_sign_in_link.html.haml5
-rw-r--r--app/views/layouts/devise.html.haml17
-rw-r--r--app/views/public/projects/index.html.haml2
14 files changed, 164 insertions, 125 deletions
diff --git a/app/assets/images/brand_logo.png b/app/assets/images/brand_logo.png
new file mode 100644
index 00000000000..da459c1ec8a
--- /dev/null
+++ b/app/assets/images/brand_logo.png
Binary files differ
diff --git a/app/assets/stylesheets/sections/login.scss b/app/assets/stylesheets/sections/login.scss
index a78a9cd4879..0e9a6a0a392 100644
--- a/app/assets/stylesheets/sections/login.scss
+++ b/app/assets/stylesheets/sections/login.scss
@@ -6,11 +6,13 @@
}
.login-box{
- max-width: 304px;
- position: relative;
- @include border-radius(5px);
- margin: auto;
- background: white;
+ }
+
+ .brand-image {
+ margin-bottom: 20px;
+ img {
+ max-width: 100%;
+ }
}
.login-logo{
@@ -19,7 +21,7 @@
}
.form-control {
- background-color: #f1f1f1;
+ background-color: #F5F5F5;
font-size: 16px;
padding: 14px 10px;
width: 100%;
@@ -41,6 +43,10 @@
margin-bottom:0px;
@include border-radius(0);
}
+
+ &:active, &:focus {
+ background-color: #FFF;
+ }
}
.login-box a.forgot {
diff --git a/app/assets/stylesheets/sections/projects.scss b/app/assets/stylesheets/sections/projects.scss
index 34dd3448f53..c9188fb751c 100644
--- a/app/assets/stylesheets/sections/projects.scss
+++ b/app/assets/stylesheets/sections/projects.scss
@@ -172,8 +172,8 @@ ul.nav.nav-projects-tabs {
}
.public-clone {
- background: #333;
- color: #f5f5f5;
+ background: #EEE;
+ color: #777;
padding: 6px 10px;
margin: 1px;
font-weight: normal;
diff --git a/app/helpers/brand_helper.rb b/app/helpers/brand_helper.rb
new file mode 100644
index 00000000000..68f30522c65
--- /dev/null
+++ b/app/helpers/brand_helper.rb
@@ -0,0 +1,23 @@
+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
diff --git a/app/views/devise/confirmations/new.html.haml b/app/views/devise/confirmations/new.html.haml
index bf634d9de60..08e17490865 100755
--- a/app/views/devise/confirmations/new.html.haml
+++ b/app/views/devise/confirmations/new.html.haml
@@ -1,15 +1,13 @@
-.login-box
- %h3.page-title Resend confirmation instructions
- = form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f|
- .devise-errors
- = devise_error_messages!
- .clearfix.append-bottom-20
- = f.email_field :email, placeholder: 'Email', class: "form-control", required: true
- .clearfix.append-bottom-10
- = f.submit "Resend confirmation instructions", class: 'btn btn-success'
- %hr
- %p
- %span.light
- Already have login and password?
- %strong
- = link_to "Sign in", new_session_path(resource_name)
+.login-box.panel.panel-default
+ .panel-heading
+ %h3.panel-title Resend confirmation instructions
+ .panel-body
+ = form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f|
+ .devise-errors
+ = devise_error_messages!
+ .clearfix.append-bottom-20
+ = f.email_field :email, placeholder: 'Email', class: "form-control", required: true
+ .clearfix.append-bottom-10
+ = f.submit "Resend confirmation instructions", class: 'btn btn-success'
+ .panel-footer
+ = render 'devise/shared/sign_in_link'
diff --git a/app/views/devise/passwords/edit.html.haml b/app/views/devise/passwords/edit.html.haml
index 95c52608e1f..efcd0296176 100644
--- a/app/views/devise/passwords/edit.html.haml
+++ b/app/views/devise/passwords/edit.html.haml
@@ -1,15 +1,18 @@
-= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put, class: "login-box" }) do |f|
- %h3 Change your password
- .devise-errors
- = devise_error_messages!
- = f.hidden_field :reset_password_token
- %div
- = f.password_field :password, class: "form-control top", placeholder: "New password", required: true
- %div
- = f.password_field :password_confirmation, class: "form-control bottom", placeholder: "Confirm new password", required: true
- %div
- .clearfix.append-bottom-10
- = f.submit "Change my password", class: "btn btn-primary"
- = link_to "Sign in", new_session_path(resource_name), class: "btn pull-right"
- %div
- = link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name)
+.login-box.panel.panel-default
+ .panel-heading
+ %h3.panel-title Change your password
+ .panel-body
+ = form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f|
+ .devise-errors
+ = devise_error_messages!
+ = f.hidden_field :reset_password_token
+ %div
+ = f.password_field :password, class: "form-control top", placeholder: "New password", required: true
+ %div
+ = f.password_field :password_confirmation, class: "form-control bottom", placeholder: "Confirm new password", required: true
+ .clearfix.append-bottom-10
+ = f.submit "Change my password", class: "btn btn-primary"
+ .panel-footer
+ %p
+ = link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name)
+ = render 'devise/shared/sign_in_link'
diff --git a/app/views/devise/passwords/new.html.haml b/app/views/devise/passwords/new.html.haml
index 040821ca32a..bf44dee5ad7 100755
--- a/app/views/devise/passwords/new.html.haml
+++ b/app/views/devise/passwords/new.html.haml
@@ -1,14 +1,13 @@
-= form_for(resource, as: resource_name, url: password_path(resource_name), html: { class: "login-box", method: :post }) do |f|
- %h3.page-title Reset password
- .devise-errors
- = devise_error_messages!
- .clearfix.append-bottom-20
- = f.email_field :email, placeholder: "Email", class: "form-control", required: true
- .clearfix.append-bottom-10
- = f.submit "Reset password", class: "btn-primary btn"
- %hr
- %p
- %span.light
- Already have login and password?
- %strong
- = link_to "Sign in", new_session_path(resource_name)
+.login-box.panel.panel-default
+ .panel-heading
+ %h3.panel-title Reset password
+ .panel-body
+ = form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f|
+ .devise-errors
+ = devise_error_messages!
+ .clearfix.append-bottom-20
+ = f.email_field :email, placeholder: "Email", class: "form-control", required: true
+ .clearfix.append-bottom-10
+ = f.submit "Reset password", class: "btn-primary btn"
+ .panel-footer
+ = render 'devise/shared/sign_in_link'
diff --git a/app/views/devise/registrations/new.html.haml b/app/views/devise/registrations/new.html.haml
index 24bc0406544..52d484949b6 100644
--- a/app/views/devise/registrations/new.html.haml
+++ b/app/views/devise/registrations/new.html.haml
@@ -1,24 +1,27 @@
-= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { class: "login-box" }) do |f|
- %h3.page-title Sign Up
- .devise-errors
- = devise_error_messages!
- %div
- = f.text_field :name, class: "form-control top", placeholder: "Name", required: true
- %div
- = f.text_field :username, class: "form-control middle", placeholder: "Username", required: true
- %div
- = f.email_field :email, class: "form-control middle", placeholder: "Email", required: true
- %div
- = f.password_field :password, class: "form-control middle", placeholder: "Password", required: true
- %div
- = f.password_field :password_confirmation, class: "form-control bottom", placeholder: "Confirm password", required: true
- %div
- = f.submit "Sign up", class: "btn-create btn"
- %hr
- %p
- %span.light
- Have an account?
- %strong
- = link_to "Sign in", new_session_path(resource_name)
- %p
- = link_to "Forgot your password?", new_password_path(resource_name)
+.login-box.panel.panel-success
+ .panel-heading
+ %h3.panel-title Sign up
+ .panel-body
+ = form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f|
+ .devise-errors
+ = devise_error_messages!
+ %div
+ = f.text_field :name, class: "form-control top", placeholder: "Name", required: true
+ %div
+ = f.text_field :username, class: "form-control middle", placeholder: "Username", required: true
+ %div
+ = f.email_field :email, class: "form-control middle", placeholder: "Email", required: true
+ %div
+ = f.password_field :password, class: "form-control middle", placeholder: "Password", required: true
+ %div
+ = f.password_field :password_confirmation, class: "form-control bottom", placeholder: "Confirm password", required: true
+ %div
+ = f.submit "Sign up", class: "btn-create btn"
+ .panel-footer
+ %p
+ %span.light
+ Have an account?
+ %strong
+ = link_to "Sign in", new_session_path(resource_name)
+ %p
+ = link_to "Forgot your password?", new_password_path(resource_name)
diff --git a/app/views/devise/sessions/_new_base.html.haml b/app/views/devise/sessions/_new_base.html.haml
index 989fcb4a63f..d26c0c92cb8 100644
--- a/app/views/devise/sessions/_new_base.html.haml
+++ b/app/views/devise/sessions/_new_base.html.haml
@@ -8,7 +8,7 @@
%span Remember me
%div
= 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
= link_to "Forgot your password?", new_password_path(resource_name), class: "btn"
diff --git a/app/views/devise/sessions/_new_ldap.html.haml b/app/views/devise/sessions/_new_ldap.html.haml
index bb1d0a4001f..6c5a878e904 100644
--- a/app/views/devise/sessions/_new_ldap.html.haml
+++ b/app/views/devise/sessions/_new_ldap.html.haml
@@ -2,4 +2,4 @@
= 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"}
%br/
- = submit_tag "LDAP Sign in", class: "btn-create btn"
+ = submit_tag "LDAP Sign in", class: "btn-save btn"
diff --git a/app/views/devise/sessions/new.html.haml b/app/views/devise/sessions/new.html.haml
index 31221ae9c37..f53d6f09daf 100644
--- a/app/views/devise/sessions/new.html.haml
+++ b/app/views/devise/sessions/new.html.haml
@@ -1,43 +1,42 @@
-.login-box
- %h3.page-title Sign in
- - if ldap_enabled? && gitlab_config.signin_enabled
- %ul.nav.nav-tabs
- %li.active
- = link_to 'LDAP', '#tab-ldap', 'data-toggle' => 'tab'
- %li
- = link_to 'Standard', '#tab-signin', 'data-toggle' => 'tab'
- .tab-content
- %div#tab-ldap.tab-pane.active
- = render partial: 'devise/sessions/new_ldap'
- %div#tab-signin.tab-pane
- = render partial: 'devise/sessions/new_base'
+.login-box.panel.panel-primary
+ .panel-heading
+ %h3.panel-title Sign in
+ .panel-body
+ - if ldap_enabled? && gitlab_config.signin_enabled
+ %ul.nav.nav-tabs
+ %li.active
+ = link_to 'LDAP', '#tab-ldap', 'data-toggle' => 'tab'
+ %li
+ = link_to 'Standard', '#tab-signin', 'data-toggle' => 'tab'
+ .tab-content
+ %div#tab-ldap.tab-pane.active
+ = 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
- %span.light
- Don't have an account?
- %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)
+ %span.light Did not receive confirmation email?
+ = link_to "Send again", new_confirmation_path(resource_name)
- - if extra_config.has_key?('sign_in_text')
- %hr
- = markdown(extra_config.sign_in_text)
+ - if extra_config.has_key?('sign_in_text')
+ %hr
+ = markdown(extra_config.sign_in_text)
diff --git a/app/views/devise/shared/_sign_in_link.html.haml b/app/views/devise/shared/_sign_in_link.html.haml
new file mode 100644
index 00000000000..fafc4b82f53
--- /dev/null
+++ b/app/views/devise/shared/_sign_in_link.html.haml
@@ -0,0 +1,5 @@
+%p
+ %span.light
+ Already have login and password?
+ %strong
+ = link_to "Sign in", new_session_path(resource_name)
diff --git a/app/views/layouts/devise.html.haml b/app/views/layouts/devise.html.haml
index 36c682c48a6..4080ef745f8 100644
--- a/app/views/layouts/devise.html.haml
+++ b/app/views/layouts/devise.html.haml
@@ -5,13 +5,16 @@
= render "layouts/flash"
.container
.content
- .center
- %h1 GitLab
- %p.light
- GitLab is open source software to collaborate on code.
- %br
- Sign in or browse for #{link_to "public projects", public_projects_path}.
+ .login-title
+ %h1= brand_title
%hr
.container
.content
- = yield
+ .row
+ .col-md-7
+ .brand-image
+ = brand_image
+ .brand_text
+ = brand_text
+ .col-md-5
+ = yield
diff --git a/app/views/public/projects/index.html.haml b/app/views/public/projects/index.html.haml
index 624ec0b9b95..7d4d94ce42b 100644
--- a/app/views/public/projects/index.html.haml
+++ b/app/views/public/projects/index.html.haml
@@ -45,7 +45,7 @@
%small.access-icon
= internal_icon
Internal
- .pull-right
+ .pull-right.hidden-sm.hidden-xs
%pre.public-clone git clone #{project.http_url_to_repo}
- if project.description.present?