Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
d02a22ba
Commit
d02a22ba
authored
Jan 07, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Redesign signin/singup pages
parent
757df014
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
148 additions
and
107 deletions
+148
-107
app/assets/stylesheets/sections/login.scss
app/assets/stylesheets/sections/login.scss
+57
-32
app/helpers/application_helper.rb
app/helpers/application_helper.rb
+5
-0
app/views/devise/sessions/_new_base.html.haml
app/views/devise/sessions/_new_base.html.haml
+1
-1
app/views/devise/sessions/_new_ldap.html.haml
app/views/devise/sessions/_new_ldap.html.haml
+0
-1
app/views/devise/sessions/new.html.haml
app/views/devise/sessions/new.html.haml
+12
-40
app/views/devise/shared/_oauth_box.html.haml
app/views/devise/shared/_oauth_box.html.haml
+2
-2
app/views/devise/shared/_signin_box.html.haml
app/views/devise/shared/_signin_box.html.haml
+25
-0
app/views/devise/shared/_signup_box.html.haml
app/views/devise/shared/_signup_box.html.haml
+17
-0
app/views/layouts/_public_head_panel.html.haml
app/views/layouts/_public_head_panel.html.haml
+7
-6
app/views/layouts/devise.html.haml
app/views/layouts/devise.html.haml
+22
-25
No files found.
app/assets/stylesheets/sections/login.scss
View file @
d02a22ba
/* Login Page */
/* Login Page */
.login-page
{
.login-page
{
h1
{
.container
{
font-size
:
3em
;
max-width
:
960px
;
font-weight
:
200
;
}
}
.login-box
{
.navbar-gitlab
.container
{
padding
:
0
15px
;
max-width
:
none
;
.login-heading
h3
{
font-weight
:
300
;
line-height
:
2
;
}
}
.login-foot
er
{
.brand-hold
er
{
margin-top
:
10
px
;
font-size
:
18
px
;
}
line-height
:
1
.5
;
.btn
{
p
{
padding
:
12px
!
important
;
color
:
#888
;
@extend
.btn-block
;
}
}
h1
:first-child
{
font-weight
:
normal
;
margin-bottom
:
30px
;
}
}
.brand-image
{
img
{
img
{
max-width
:
100%
;
max-width
:
100%
;
margin-bottom
:
2
0px
;
margin-bottom
:
3
0px
;
}
}
&
.default-brand-image
{
a
{
margin
:
0
80px
;
font-weight
:
bold
;
}
}
}
}
.login-logo
{
.login-box
{
margin
:
10px
0
30px
0
;
background
:
#fafafa
;
display
:
block
;
border-radius
:
10px
;
box-shadow
:
0
0px
2px
#CCC
;
padding
:
15px
;
.login-heading
h3
{
font-weight
:
300
;
line-height
:
1
.5
;
margin
:
0
;
display
:
none
;
}
.login-footer
{
margin-top
:
10px
;
}
a
.forgot
{
float
:
right
;
padding-top
:
6px
}
.nav
.active
a
{
background
:
transparent
;
}
}
}
.form-control
{
.form-control
{
background-color
:
#F5F5F5
;
font-size
:
14px
;
font-size
:
16px
;
padding
:
10px
8px
;
padding
:
14px
10px
;
width
:
100%
;
width
:
100%
;
height
:
auto
;
height
:
auto
;
...
@@ -68,11 +86,6 @@
...
@@ -68,11 +86,6 @@
}
}
}
}
.login-box
a
.forgot
{
float
:
right
;
padding-top
:
6px
}
.devise-errors
{
.devise-errors
{
h2
{
h2
{
font-size
:
14px
;
font-size
:
14px
;
...
@@ -80,7 +93,19 @@
...
@@ -80,7 +93,19 @@
}
}
}
}
.brand-holder
{
.remember-me
{
border-right
:
1px
solid
#EEE
;
margin-top
:
-10px
;
label
{
font-weight
:
normal
;
}
}
}
@media
(
max-width
:
$screen-xs-max
)
{
.login-page
{
.col-sm-5.pull-right
{
float
:
none
!
important
;
}
}
}
}
}
app/helpers/application_helper.rb
View file @
d02a22ba
...
@@ -305,4 +305,9 @@ module ApplicationHelper
...
@@ -305,4 +305,9 @@ module ApplicationHelper
profile_key_path
(
key
)
profile_key_path
(
key
)
end
end
end
end
def
redirect_from_root?
request
.
env
[
'rack.session'
][
'user_return_to'
]
==
'/'
end
end
end
app/views/devise/sessions/_new_base.html.haml
View file @
d02a22ba
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
=
f
.
text_field
:login
,
class:
"form-control top"
,
placeholder:
"Username or Email"
,
autofocus:
"autofocus"
=
f
.
text_field
:login
,
class:
"form-control top"
,
placeholder:
"Username or Email"
,
autofocus:
"autofocus"
=
f
.
password_field
:password
,
class:
"form-control bottom"
,
placeholder:
"Password"
=
f
.
password_field
:password
,
class:
"form-control bottom"
,
placeholder:
"Password"
-
if
devise_mapping
.
rememberable?
-
if
devise_mapping
.
rememberable?
.
clearfix.append-bottom-10
.
remember-me
%label
.checkbox.remember_me
{
for:
"user_remember_me"
}
%label
.checkbox.remember_me
{
for:
"user_remember_me"
}
=
f
.
check_box
:remember_me
=
f
.
check_box
:remember_me
%span
Remember me
%span
Remember me
...
...
app/views/devise/sessions/_new_ldap.html.haml
View file @
d02a22ba
=
form_tag
(
user_omniauth_callback_path
(
provider
),
id:
'new_ldap_user'
)
do
=
form_tag
(
user_omniauth_callback_path
(
provider
),
id:
'new_ldap_user'
)
do
=
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
/
=
button_tag
"LDAP Sign in"
,
class:
"btn-save btn"
=
button_tag
"LDAP Sign in"
,
class:
"btn-save btn"
app/views/devise/sessions/new.html.haml
View file @
d02a22ba
.login-box
%div
.login-heading
=
render
'devise/shared/signin_box'
%h3
Sign in
.login-body
-
if
ldap_enabled?
%ul
.nav.nav-tabs
-
@ldap_servers
.
each_with_index
do
|
server
,
i
|
%li
{
class:
(
:active
if
i
.
zero?
)}
=
link_to
server
[
'label'
],
"#tab-
#{
server
[
'provider_name'
]
}
"
,
'data-toggle'
=>
'tab'
-
if
gitlab_config
.
signin_enabled
%li
=
link_to
'Standard'
,
'#tab-signin'
,
'data-toggle'
=>
'tab'
.tab-content
-
@ldap_servers
.
each_with_index
do
|
server
,
i
|
%div
.tab-pane
{
id:
"tab-#{server['provider_name']}"
,
class:
(
:active
if
i
.
zero?
)}
=
render
'devise/sessions/new_ldap'
,
provider:
server
[
'provider_name'
]
-
if
gitlab_config
.
signin_enabled
%div
#tab-signin
.tab-pane
=
render
'devise/sessions/new_base'
-
elsif
gitlab_config
.
signin_enabled
-
if
Gitlab
.
config
.
omniauth
.
enabled
&&
devise_mapping
.
omniauthable?
=
render
'devise/sessions/new_base'
.prepend-top-20
-
else
=
render
'devise/shared/oauth_box'
%div
No authentication methods configured.
=
render
'devise/sessions/oauth_providers'
if
Gitlab
.
config
.
omniauth
.
enabled
&&
devise_mapping
.
omniauthable?
.login-footer
-
if
gitlab_config
.
signup_enabled
-
if
gitlab_config
.
signup_enabled
%p
.prepend-top-20
%span
.light
=
render
'devise/shared/signup_box'
Don't have an account?
%strong
=
link_to
"Sign up"
,
new_registration_path
(
resource_name
)
.clearfix.prepend-top-20
%p
%p
%span
.light
Did not receive confirmation email?
%span
.light
Did not receive confirmation email?
=
link_to
"Send again"
,
new_confirmation_path
(
resource_name
)
=
link_to
"Send again"
,
new_confirmation_path
(
resource_name
)
-
if
extra_config
.
has_key?
(
'sign_in_text'
)
%hr
=
markdown
(
extra_config
.
sign_in_text
)
app/views/devise/s
essions/_oauth_providers
.html.haml
→
app/views/devise/s
hared/_oauth_box
.html.haml
View file @
d02a22ba
-
providers
=
additional_providers
-
providers
=
additional_providers
-
if
providers
.
present?
-
if
providers
.
present?
.
bs-callout.bs-callout-info
{
:'data-no-turbolink'
=>
'data-no-turbolink'
}
.
login-box
{
:'data-no-turbolink'
=>
'data-no-turbolink'
}
%span
Sign in with
:
%span
Sign in with
-
providers
.
each
do
|
provider
|
-
providers
.
each
do
|
provider
|
%span
%span
-
if
default_providers
.
include?
(
provider
)
-
if
default_providers
.
include?
(
provider
)
...
...
app/views/devise/shared/_signin_box.html.haml
0 → 100644
View file @
d02a22ba
.login-box
.login-heading
%h3
Sign in
.login-body
-
if
ldap_enabled?
%ul
.nav.nav-tabs
-
@ldap_servers
.
each_with_index
do
|
server
,
i
|
%li
{
class:
(
:active
if
i
.
zero?
)}
=
link_to
server
[
'label'
],
"#tab-
#{
server
[
'provider_name'
]
}
"
,
'data-toggle'
=>
'tab'
-
if
gitlab_config
.
signin_enabled
%li
=
link_to
'Standard'
,
'#tab-signin'
,
'data-toggle'
=>
'tab'
.tab-content
-
@ldap_servers
.
each_with_index
do
|
server
,
i
|
%div
.tab-pane
{
id:
"tab-#{server['provider_name']}"
,
class:
(
:active
if
i
.
zero?
)}
=
render
'devise/sessions/new_ldap'
,
provider:
server
[
'provider_name'
]
-
if
gitlab_config
.
signin_enabled
%div
#tab-signin
.tab-pane
=
render
'devise/sessions/new_base'
-
elsif
gitlab_config
.
signin_enabled
=
render
'devise/sessions/new_base'
-
else
%div
No authentication methods configured.
app/views/devise/shared/_signup_box.html.haml
0 → 100644
View file @
d02a22ba
.login-box
.login-heading
%h3
Sign up
.login-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
.form-group
#password-strength
=
f
.
password_field
:password
,
class:
"form-control bottom"
,
id:
"user_password_sign_up"
,
placeholder:
"Password"
,
required:
true
%div
=
f
.
submit
"Sign up"
,
class:
"btn-create btn"
app/views/layouts/_public_head_panel.html.haml
View file @
d02a22ba
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
%span
.sr-only
Toggle navigation
%span
.sr-only
Toggle navigation
%i
.fa.fa-bars
%i
.fa.fa-bars
-
unless
current_controller?
(
'sessions'
)
.pull-right.hidden-xs
.pull-right.hidden-xs
=
link_to
"Sign in"
,
new_session_path
(
:user
,
redirect_to_referer:
'yes'
),
class:
'btn btn-sign-in btn-new'
=
link_to
"Sign in"
,
new_session_path
(
:user
,
redirect_to_referer:
'yes'
),
class:
'btn btn-sign-in btn-new'
...
...
app/views/layouts/devise.html.haml
View file @
d02a22ba
!!! 5
!!! 5
%html
{
lang:
"en"
}
%html
{
lang:
"en"
}
=
render
"layouts/head"
=
render
"layouts/head"
%body
.ui_basic.login-page
%body
.ui_mars.login-page.application
.container
=
render
"layouts/broadcast"
.content
=
render
"layouts/public_head_panel"
,
title:
''
.login-title
.container.navless-container
%h1
=
brand_title
=
render
'shared/outdated_browser'
%hr
.container
.content
.content
-
unless
redirect_from_root?
=
render
"layouts/flash"
=
render
"layouts/flash"
.row
.row.prepend-top-20
.col-md-7.brand-holder
.col-sm-5.pull-right
=
yield
.col-sm-7.brand-holder.pull-left
%h1
=
brand_title
-
if
brand_item
-
if
brand_item
.brand-image
=
brand_image
=
brand_image
.brand_text
=
brand_text
=
brand_text
-
else
-
else
.brand-image.default-brand-image.hidden-sm.hidden-xs
%h3
Open source software to collaborate on code
=
image_tag
'brand_logo.png'
.brand_text.hidden-xs
%h2
Open source software to collaborate on code
%p
.lead
%p
Manage git repositories with fine grained access controls that keep your code secure.
Manage git repositories with fine grained access controls that keep your code secure.
Perform code reviews and enhance collaboration with merge requests.
Perform code reviews and enhance collaboration with merge requests.
Each project can also have an issue tracker and a wiki.
Each project can also have an issue tracker and a wiki.
.col-md-5
-
if
extra_config
.
has_key?
(
'sign_in_text'
)
=
yield
=
markdown
(
extra_config
.
sign_in_text
)
%hr
%hr
.container
.container
.footer-links
.footer-links
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment