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
65a175bb
Commit
65a175bb
authored
May 16, 2016
by
Annabel Dunstone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove arrows from mobile scroll fade out
parent
84fee47a
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
74 additions
and
68 deletions
+74
-68
app/assets/javascripts/layout_nav.js.coffee
app/assets/javascripts/layout_nav.js.coffee
+8
-16
app/assets/stylesheets/framework/nav.scss
app/assets/stylesheets/framework/nav.scss
+21
-13
app/assets/stylesheets/framework/sidebar.scss
app/assets/stylesheets/framework/sidebar.scss
+1
-1
app/helpers/nav_helper.rb
app/helpers/nav_helper.rb
+4
-0
app/views/layouts/nav/_group.html.haml
app/views/layouts/nav/_group.html.haml
+38
-37
app/views/layouts/nav/_profile.html.haml
app/views/layouts/nav/_profile.html.haml
+2
-1
No files found.
app/assets/javascripts/layout_nav.js.coffee
View file @
65a175bb
class
@
LayoutNav
class
@
LayoutNav
$
(
document
).
ready
->
$
->
$
(
'#scrolling-tabs'
).
on
'scroll'
,
->
$
(
'#scrolling-tabs'
).
on
'scroll'
,
->
cur
=
$
(
this
).
scrollLeft
()
currentPosition
=
$
(
this
).
scrollLeft
()
if
cur
==
0
return
if
currentPosition
==
0
return
if
$
(
'.nav-control'
).
length
maxPosition
=
$
(
this
)[
0
].
scrollWidth
-
$
(
this
).
parent
().
width
()
+
59
else
else
max
=
289
maxPosition
=
$
(
this
)[
0
].
scrollWidth
-
$
(
this
).
parent
().
width
()
console
.
log
"MAX:"
+
max
console
.
log
"CUR:"
+
cur
$
(
'.fade-out'
).
toggleClass
(
'end-scroll'
,
currentPosition
is
maxPosition
)
if
cur
==
max
$
(
'.fa-arrow-right'
).
addClass
(
'end-scroll'
)
$
(
'.nav-links'
).
addClass
(
'end-scroll'
)
else
$
(
'.fa-arrow-right'
).
removeClass
(
'end-scroll'
)
$
(
'.nav-links'
).
removeClass
(
'end-scroll'
)
return
$
(
'#scrolling-tabs'
).
trigger
'scroll'
return
app/assets/stylesheets/framework/nav.scss
View file @
65a175bb
...
@@ -256,14 +256,18 @@
...
@@ -256,14 +256,18 @@
display
:
none
;
display
:
none
;
}
}
.fa
-arrow-righ
t
{
.fa
de-ou
t
{
display
:
none
;
opacity
:
1
;
position
:
absolute
;
position
:
absolute
;
color
:
#7e7c7c
;
bottom
:
10px
;
bottom
:
11px
;
right
:
0
;
right
:
0
;
padding
:
10px
10px
10px
25px
;
width
:
43px
;
height
:
35px
;
-webkit-transform
:
translateZ
(
0
);
background
:
-webkit-linear-gradient
(
left
,
rgba
(
250
,
250
,
250
,
0
.4
)
,
$background-color
45%
);
background
:
-webkit-linear-gradient
(
left
,
rgba
(
250
,
250
,
250
,
0
.4
)
,
$background-color
45%
);
background
:
-o-linear-gradient
(
left
,
rgba
(
250
,
250
,
250
,
0
.4
)
,
$background-color
45%
);
background
:
-moz-linear-gradient
(
left
,
rgba
(
250
,
250
,
250
,
0
.4
)
,
$background-color
45%
);
background
:
linear-gradient
(
left
,
rgba
(
250
,
250
,
250
,
0
.4
)
,
$background-color
45%
);
&
.end-scroll
{
&
.end-scroll
{
opacity
:
0
;
opacity
:
0
;
...
@@ -272,10 +276,7 @@
...
@@ -272,10 +276,7 @@
}
}
@media
(
max-width
:
790px
)
{
@media
(
max-width
:
790px
)
{
margin-right
:
19px
;
.fade-out
{
.fa-arrow-right
{
display
:
block
;
transition-duration
:
.3s
;
transition-duration
:
.3s
;
}
}
}
}
...
@@ -300,13 +301,20 @@
...
@@ -300,13 +301,20 @@
color
:
$gl-icon-color
;
color
:
$gl-icon-color
;
}
}
}
}
}
&
.end-scroll
{
.nav-control
{
margin-right
:
0
;
.fade-out
{
transition-duration
:
.3s
;
right
:
58px
;
@media
(
min-width
:
$screen-xs-max
)
{
right
:
67px
;
}
@media
(
max-width
:
$screen-xs-min
)
{
right
:
0
;
}
}
}
}
}
}
}
.page-with-layout-nav
{
.page-with-layout-nav
{
...
...
app/assets/stylesheets/framework/sidebar.scss
View file @
65a175bb
...
@@ -324,7 +324,7 @@
...
@@ -324,7 +324,7 @@
.layout-nav
{
.layout-nav
{
@media
(
max-width
:
$screen-xs-min
)
{
@media
(
max-width
:
$screen-xs-min
)
{
padding-right
:
0
;
;
padding-right
:
0
;
}
}
@media
(
min-width
:
$screen-xs-min
)
and
(
max-width
:
$screen-md-min
)
{
@media
(
min-width
:
$screen-xs-min
)
and
(
max-width
:
$screen-md-min
)
{
...
...
app/helpers/nav_helper.rb
View file @
65a175bb
...
@@ -51,4 +51,8 @@ module NavHelper
...
@@ -51,4 +51,8 @@ module NavHelper
def
layout_dropdown_class
def
layout_dropdown_class
"controls-dropdown-visible"
if
current_user
"controls-dropdown-visible"
if
current_user
end
end
def
nav_control_class
"nav-control"
if
current_user
end
end
end
app/views/layouts/nav/_group.html.haml
View file @
65a175bb
=
render
'layouts/nav/group_settings'
%div
{
class:
nav_control_class
}
=
render
'layouts/nav/group_settings'
%ul
.nav-links
#scrolling-tabs
%ul
.nav-links
#scrolling-tabs
=
nav_link
(
path:
'groups#show'
,
html_options:
{
class:
'home'
})
do
=
nav_link
(
path:
'groups#show'
,
html_options:
{
class:
'home'
})
do
=
link_to
group_path
(
@group
),
title:
'Home'
do
=
link_to
group_path
(
@group
),
title:
'Home'
do
=
icon
(
'group fw'
)
=
icon
(
'group fw'
)
%span
%span
Group
Group
=
nav_link
(
path:
'groups#activity'
)
do
=
nav_link
(
path:
'groups#activity'
)
do
=
link_to
activity_group_path
(
@group
),
title:
'Activity'
do
=
link_to
activity_group_path
(
@group
),
title:
'Activity'
do
=
icon
(
'dashboard fw'
)
=
icon
(
'dashboard fw'
)
%span
%span
Activity
Activity
=
nav_link
(
controller:
[
:group
,
:milestones
])
do
=
nav_link
(
controller:
[
:group
,
:milestones
])
do
=
link_to
group_milestones_path
(
@group
),
title:
'Milestones'
do
=
link_to
group_milestones_path
(
@group
),
title:
'Milestones'
do
=
icon
(
'clock-o fw'
)
=
icon
(
'clock-o fw'
)
%span
%span
Milestones
Milestones
=
nav_link
(
path:
'groups#issues'
)
do
=
nav_link
(
path:
'groups#issues'
)
do
=
link_to
issues_group_path
(
@group
),
title:
'Issues'
do
=
link_to
issues_group_path
(
@group
),
title:
'Issues'
do
=
icon
(
'exclamation-circle fw'
)
=
icon
(
'exclamation-circle fw'
)
%span
%span
Issues
Issues
-
issues
=
IssuesFinder
.
new
(
current_user
,
group_id:
@group
.
id
,
state:
'opened'
).
execute
-
issues
=
IssuesFinder
.
new
(
current_user
,
group_id:
@group
.
id
,
state:
'opened'
).
execute
%span
.badge.count
=
number_with_delimiter
(
issues
.
count
)
%span
.badge.count
=
number_with_delimiter
(
issues
.
count
)
=
nav_link
(
path:
'groups#merge_requests'
)
do
=
nav_link
(
path:
'groups#merge_requests'
)
do
=
link_to
merge_requests_group_path
(
@group
),
title:
'Merge Requests'
do
=
link_to
merge_requests_group_path
(
@group
),
title:
'Merge Requests'
do
=
icon
(
'tasks fw'
)
=
icon
(
'tasks fw'
)
%span
%span
Merge Requests
Merge Requests
-
merge_requests
=
MergeRequestsFinder
.
new
(
current_user
,
group_id:
@group
.
id
,
state:
'opened'
).
execute
-
merge_requests
=
MergeRequestsFinder
.
new
(
current_user
,
group_id:
@group
.
id
,
state:
'opened'
).
execute
%span
.badge.count
=
number_with_delimiter
(
merge_requests
.
count
)
%span
.badge.count
=
number_with_delimiter
(
merge_requests
.
count
)
=
nav_link
(
controller:
[
:group_members
])
do
=
nav_link
(
controller:
[
:group_members
])
do
=
link_to
group_group_members_path
(
@group
),
title:
'Members'
do
=
link_to
group_group_members_path
(
@group
),
title:
'Members'
do
=
icon
(
'users fw'
)
=
icon
(
'users fw'
)
%span
%span
Members
Members
=
icon
(
'arrow-right'
)
.fade-out
app/views/layouts/nav/_profile.html.haml
View file @
65a175bb
%ul
.nav-links
%ul
.nav-links
#scrolling-tabs
=
nav_link
(
path:
'profiles#show'
,
html_options:
{
class:
'home'
})
do
=
nav_link
(
path:
'profiles#show'
,
html_options:
{
class:
'home'
})
do
=
link_to
profile_path
,
title:
'Profile Settings'
do
=
link_to
profile_path
,
title:
'Profile Settings'
do
=
icon
(
'user fw'
)
=
icon
(
'user fw'
)
...
@@ -47,3 +47,4 @@
...
@@ -47,3 +47,4 @@
=
icon
(
'history fw'
)
=
icon
(
'history fw'
)
%span
%span
Audit Log
Audit Log
.fade-out
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