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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
78ff68a2
Commit
78ff68a2
authored
Apr 06, 2018
by
Lukas Eipert
Committed by
Phil Hughes
Apr 06, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish design of domain verification for Gitlab Pages
parent
42849263
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
134 additions
and
47 deletions
+134
-47
app/assets/stylesheets/framework/lists.scss
app/assets/stylesheets/framework/lists.scss
+9
-4
app/assets/stylesheets/framework/typography.scss
app/assets/stylesheets/framework/typography.scss
+5
-0
app/assets/stylesheets/pages/pages.scss
app/assets/stylesheets/pages/pages.scss
+60
-0
app/views/projects/pages/_list.html.haml
app/views/projects/pages/_list.html.haml
+19
-18
app/views/projects/pages/show.html.haml
app/views/projects/pages/show.html.haml
+1
-2
app/views/projects/pages_domains/edit.html.haml
app/views/projects/pages_domains/edit.html.haml
+1
-1
app/views/projects/pages_domains/new.html.haml
app/views/projects/pages_domains/new.html.haml
+1
-1
app/views/projects/pages_domains/show.html.haml
app/views/projects/pages_domains/show.html.haml
+33
-21
changelogs/unreleased/43215-update-design-for-verifying-domains.yml
.../unreleased/43215-update-design-for-verifying-domains.yml
+5
-0
No files found.
app/assets/stylesheets/framework/lists.scss
View file @
78ff68a2
...
@@ -24,6 +24,10 @@
...
@@ -24,6 +24,10 @@
color
:
$list-text-disabled-color
;
color
:
$list-text-disabled-color
;
}
}
&
:not
(
.ui-sort-disabled
)
:hover
{
background
:
$row-hover
;
}
&
.unstyled
{
&
.unstyled
{
&
:hover
{
&
:hover
{
background
:
none
;
background
:
none
;
...
@@ -34,14 +38,15 @@
...
@@ -34,14 +38,15 @@
background-color
:
$list-warning-row-bg
;
background-color
:
$list-warning-row-bg
;
border-color
:
$list-warning-row-border
;
border-color
:
$list-warning-row-border
;
color
:
$list-warning-row-color
;
color
:
$list-warning-row-color
;
}
&
.smoke
{
background-color
:
$gray-light
;
}
&
:hover
{
background
:
$list-warning-row-bg
;
}
&
:not
(
.ui-sort-disabled
)
:hover
{
background
:
$row-hover
;
}
}
&
.smoke
{
background-color
:
$gray-light
;
}
&
:last-child
{
&
:last-child
{
border-bottom
:
0
;
border-bottom
:
0
;
...
...
app/assets/stylesheets/framework/typography.scss
View file @
78ff68a2
...
@@ -289,6 +289,11 @@ body {
...
@@ -289,6 +289,11 @@ body {
&
:last-child
{
&
:last-child
{
margin-bottom
:
0
;
margin-bottom
:
0
;
}
}
&
.with-button
{
line-height
:
34px
;
}
}
}
.page-title-empty
{
.page-title-empty
{
...
...
app/assets/stylesheets/pages/pages.scss
0 → 100644
View file @
78ff68a2
.pages-domain-list
{
&
-item
{
position
:
relative
;
display
:
flex
;
align-items
:
center
;
.domain-status
{
display
:
inline-flex
;
left
:
$gl-padding
;
position
:
absolute
;
}
.domain-name
{
flex-grow
:
1
;
}
}
&
.has-verification-status
>
li
{
padding-left
:
3
*
$gl-padding
;
}
}
.status-badge
{
display
:
inline-flex
;
margin-bottom
:
$gl-padding-8
;
// Most of the following settings "stolen" from btn-sm
// Border radius is overwritten for both
.label
,
.btn
{
padding
:
$gl-padding-4
$gl-padding-8
;
font-size
:
$gl-font-size
;
line-height
:
$gl-btn-line-height
;
border-radius
:
0
;
display
:
flex
;
align-items
:
center
;
}
.btn
svg
{
top
:
auto
;
}
:first-child
{
border-bottom-left-radius
:
$border-radius-default
;
border-top-left-radius
:
$border-radius-default
;
}
:not
(
:first-child
)
{
border-left
:
0
;
}
:last-child
{
border-bottom-right-radius
:
$border-radius-default
;
border-top-right-radius
:
$border-radius-default
;
}
}
app/views/projects/pages/_list.html.haml
View file @
78ff68a2
-
verification_enabled
=
Gitlab
::
CurrentSettings
.
pages_domain_verification_enabled?
-
if
can?
(
current_user
,
:update_pages
,
@project
)
&&
@domains
.
any?
-
if
can?
(
current_user
,
:update_pages
,
@project
)
&&
@domains
.
any?
.panel.panel-default
.panel.panel-default
.panel-heading
.panel-heading
Domains (
#{
@domains
.
count
}
)
Domains (
#{
@domains
.
count
}
)
%ul
.well-list
%ul
.well-list.pages-domain-list
{
class:
(
"has-verification-status"
if
verification_enabled
)
}
-
verification_enabled
=
Gitlab
::
CurrentSettings
.
pages_domain_verification_enabled?
-
@domains
.
each
do
|
domain
|
-
@domains
.
each
do
|
domain
|
%li
%li
.pages-domain-list-item.unstyled
.pull-right
=
link_to
'Details'
,
project_pages_domain_path
(
@project
,
domain
),
class:
"btn btn-sm btn-grouped"
=
link_to
'Remove'
,
project_pages_domain_path
(
@project
,
domain
),
data:
{
confirm:
'Are you sure?'
},
method: :delete
,
class:
"btn btn-remove btn-sm btn-grouped"
.clearfix
-
if
verification_enabled
-
if
verification_enabled
-
tooltip
,
status
=
domain
.
unverified?
?
[
'Unverified'
,
'failed'
]
:
[
'Verified'
,
'success'
]
-
tooltip
,
status
=
domain
.
unverified?
?
[
_
(
'Unverified'
),
'failed'
]
:
[
_
(
'Verified'
)
,
'success'
]
=
link_to
domain
.
url
,
title:
tooltip
,
class:
'has-tooltip'
do
.domain-status.ci-status-icon.has-tooltip
{
class:
"ci-status-icon-#{status}"
,
title:
tooltip
}
=
sprite_icon
(
"status_
#{
status
}
"
,
size:
16
,
css_class:
"has-tooltip ci-status-icon ci-status-icon-
#{
status
}
"
)
=
sprite_icon
(
"status_
#{
status
}
"
,
size:
16
)
=
domain
.
domain
.domain-name
-
else
=
link_to
domain
.
url
do
=
link_to
domain
.
domain
,
domain
.
url
=
domain
.
url
%p
=
icon
(
'external-link'
)
-
if
domain
.
subject
-
if
domain
.
subject
%p
%span
.label.label-gray
Certificate:
#{
domain
.
subject
}
%span
.label.label-gray
Certificate:
#{
domain
.
subject
}
-
if
domain
.
expired?
-
if
domain
.
expired?
%span
.label.label-danger
Expired
%span
.label.label-danger
Expired
%div
=
link_to
'Details'
,
project_pages_domain_path
(
@project
,
domain
),
class:
"btn btn-sm btn-grouped"
=
link_to
'Remove'
,
project_pages_domain_path
(
@project
,
domain
),
data:
{
confirm:
'Are you sure?'
},
method: :delete
,
class:
"btn btn-remove btn-sm btn-grouped"
-
if
verification_enabled
&&
domain
.
unverified?
-
if
verification_enabled
&&
domain
.
unverified?
%li
.warning-row
%li
.warning-row
#{
domain
.
domain
}
is not verified. To learn how to verify ownership, visit your
#{
domain
.
domain
}
is not verified. To learn how to verify ownership, visit your
=
link_to
'domain details'
,
project_pages_domain_path
(
@project
,
domain
)
#{
link_to
'domain details'
,
project_pages_domain_path
(
@project
,
domain
)
}
.
app/views/projects/pages/show.html.haml
View file @
78ff68a2
-
page_title
'Pages'
-
page_title
'Pages'
%h3
.page
_title
%h3
.page
-title.with-button
Pages
Pages
-
if
can?
(
current_user
,
:update_pages
,
@project
)
&&
(
Gitlab
.
config
.
pages
.
external_http
||
Gitlab
.
config
.
pages
.
external_https
)
-
if
can?
(
current_user
,
:update_pages
,
@project
)
&&
(
Gitlab
.
config
.
pages
.
external_http
||
Gitlab
.
config
.
pages
.
external_https
)
=
link_to
new_project_pages_domain_path
(
@project
),
class:
'btn btn-new pull-right'
,
title:
'New Domain'
do
=
link_to
new_project_pages_domain_path
(
@project
),
class:
'btn btn-new pull-right'
,
title:
'New Domain'
do
%i
.fa.fa-plus
New Domain
New Domain
%p
.light
%p
.light
...
...
app/views/projects/pages_domains/edit.html.haml
View file @
78ff68a2
-
add_to_breadcrumbs
"Pages"
,
project_pages_path
(
@project
)
-
add_to_breadcrumbs
"Pages"
,
project_pages_path
(
@project
)
-
breadcrumb_title
@domain
.
domain
-
breadcrumb_title
@domain
.
domain
-
page_title
@domain
.
domain
-
page_title
@domain
.
domain
%h3
.page
_
title
%h3
.page
-
title
=
@domain
.
domain
=
@domain
.
domain
%hr
.clearfix
%hr
.clearfix
%div
%div
...
...
app/views/projects/pages_domains/new.html.haml
View file @
78ff68a2
-
add_to_breadcrumbs
"Pages"
,
project_pages_path
(
@project
)
-
add_to_breadcrumbs
"Pages"
,
project_pages_path
(
@project
)
-
page_title
'New Pages Domain'
-
page_title
'New Pages Domain'
%h3
.page
_
title
%h3
.page
-
title
New Pages Domain
New Pages Domain
%hr
.clearfix
%hr
.clearfix
%div
%div
...
...
app/views/projects/pages_domains/show.html.haml
View file @
78ff68a2
-
add_to_breadcrumbs
"Pages"
,
project_pages_path
(
@project
)
-
add_to_breadcrumbs
"Pages"
,
project_pages_path
(
@project
)
-
breadcrumb_title
@domain
.
domain
-
breadcrumb_title
@domain
.
domain
-
page_title
"
#{
@domain
.
domain
}
"
,
'Pages Domains'
-
page_title
"
#{
@domain
.
domain
}
"
,
'Pages Domains'
-
dns_record
=
"
#{
@domain
.
domain
}
CNAME
#{
@domain
.
project
.
pages_subdomain
}
.
#{
Settings
.
pages
.
host
}
."
-
verification_enabled
=
Gitlab
::
CurrentSettings
.
pages_domain_verification_enabled?
-
verification_enabled
=
Gitlab
::
CurrentSettings
.
pages_domain_verification_enabled?
-
if
verification_enabled
&&
@domain
.
unverified?
-
if
verification_enabled
&&
@domain
.
unverified?
%p
.alert.alert-warning
=
content_for
:flash_message
do
%stro
ng
.alert.alert-warni
ng
This domain is not verified. You will need to verify ownership before
.container-fluid.container-limited
access is enabled.
This domain is not verified. You will need to verify ownership before
access is enabled.
%h3
.page-title
%h3
.page-title.with-button
Pages Domain
=
link_to
'Edit'
,
edit_project_pages_domain_path
(
@project
,
@domain
),
class:
'btn btn-success pull-right'
=
link_to
'Edit'
,
edit_project_pages_domain_path
(
@project
,
@domain
),
class:
'btn btn-success pull-right'
Pages Domain
.table-holder
.table-holder
%table
.table
%table
.table
...
@@ -19,31 +21,41 @@
...
@@ -19,31 +21,41 @@
%td
%td
Domain
Domain
%td
%td
=
link_to
@domain
.
domain
,
@domain
.
url
=
link_to
@domain
.
url
do
=
@domain
.
url
=
icon
(
'external-link'
)
%tr
%tr
%td
%td
DNS
DNS
%td
%td
%p
.input-group
To access this domain create a new DNS record:
=
text_field_tag
:domain_dns
,
dns_record
,
class:
"monospace js-select-on-focus form-control"
,
readonly:
true
%pre
.input-group-btn
#{
@domain
.
domain
}
CNAME
#{
@domain
.
project
.
pages_subdomain
}
.
#{
Settings
.
pages
.
host
}
.
=
clipboard_button
(
target:
'#domain_dns'
,
class:
'btn-default hidden-xs'
)
%p
.help-block
To access this domain create a new DNS record
-
if
verification_enabled
-
if
verification_enabled
-
verification_record
=
"
#{
@domain
.
verification_domain
}
TXT
#{
@domain
.
keyed_verification_code
}
"
%tr
%tr
%td
%td
Verification status
Verification status
%td
%td
%p
=
form_tag
verify_project_pages_domain_path
(
@project
,
@domain
)
do
.status-badge
-
text
,
status
=
@domain
.
unverified?
?
[
_
(
'Unverified'
),
'label-danger'
]
:
[
_
(
'Verified'
),
'label-success'
]
.label
{
class:
status
}
=
text
%button
.btn.has-tooltip
{
type:
"submit"
,
data:
{
container:
'body'
},
title:
_
(
"Retry verification"
)
}
=
sprite_icon
(
'redo'
)
.input-group
=
text_field_tag
:domain_verification
,
verification_record
,
class:
"monospace js-select-on-focus form-control"
,
readonly:
true
.input-group-btn
=
clipboard_button
(
target:
'#domain_verification'
,
class:
'btn-default hidden-xs'
)
%p
.help-block
-
help_link
=
help_page_path
(
'user/project/pages/getting_started_part_three.md'
,
anchor:
'dns-txt-record'
)
-
help_link
=
help_page_path
(
'user/project/pages/getting_started_part_three.md'
,
anchor:
'dns-txt-record'
)
To
#{
link_to
'verify ownership'
,
help_link
}
of your domain, create
To
#{
link_to
'verify ownership'
,
help_link
}
of your domain,
this DNS record:
add the above key to a TXT record within to your DNS configuration.
%pre
#{
@domain
.
verification_domain
}
TXT
#{
@domain
.
keyed_verification_code
}
%p
-
if
@domain
.
verified?
#{
@domain
.
domain
}
has been successfully verified.
-
else
=
button_to
'Verify ownership'
,
verify_project_pages_domain_path
(
@project
,
@domain
),
class:
'btn btn-save btn-sm'
%tr
%tr
%td
%td
...
...
changelogs/unreleased/43215-update-design-for-verifying-domains.yml
0 → 100644
View file @
78ff68a2
---
title
:
Polish design for verifying domains
merge_request
:
17767
author
:
type
:
changed
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