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
Jérome Perrin
gitlab-ce
Commits
52accce3
Commit
52accce3
authored
Apr 17, 2017
by
Annabel Dunstone Gray
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add fixed positioning to top level navbar
parent
c266b5f5
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
16 additions
and
8 deletions
+16
-8
app/assets/javascripts/merge_request_tabs.js
app/assets/javascripts/merge_request_tabs.js
+2
-1
app/assets/stylesheets/framework/header.scss
app/assets/stylesheets/framework/header.scss
+3
-0
app/assets/stylesheets/framework/layout.scss
app/assets/stylesheets/framework/layout.scss
+4
-0
app/assets/stylesheets/framework/nav.scss
app/assets/stylesheets/framework/nav.scss
+2
-1
app/assets/stylesheets/framework/sidebar.scss
app/assets/stylesheets/framework/sidebar.scss
+1
-1
app/views/projects/builds/_sidebar.html.haml
app/views/projects/builds/_sidebar.html.haml
+1
-1
app/views/projects/wikis/_sidebar.html.haml
app/views/projects/wikis/_sidebar.html.haml
+1
-1
app/views/shared/issuable/_sidebar.html.haml
app/views/shared/issuable/_sidebar.html.haml
+1
-2
app/views/shared/milestones/_sidebar.html.haml
app/views/shared/milestones/_sidebar.html.haml
+1
-1
No files found.
app/assets/javascripts/merge_request_tabs.js
View file @
52accce3
...
@@ -353,6 +353,7 @@ import BlobForkSuggestion from './blob/blob_fork_suggestion';
...
@@ -353,6 +353,7 @@ import BlobForkSuggestion from './blob/blob_fork_suggestion';
initAffix
()
{
initAffix
()
{
const
$tabs
=
$
(
'
.js-tabs-affix
'
);
const
$tabs
=
$
(
'
.js-tabs-affix
'
);
const
$fixedNav
=
$
(
'
.navbar-gitlab
'
);
// Screen space on small screens is usually very sparse
// Screen space on small screens is usually very sparse
// So we dont affix the tabs on these
// So we dont affix the tabs on these
...
@@ -371,7 +372,7 @@ import BlobForkSuggestion from './blob/blob_fork_suggestion';
...
@@ -371,7 +372,7 @@ import BlobForkSuggestion from './blob/blob_fork_suggestion';
.
affix
({
.
affix
({
offset
:
{
offset
:
{
top
:
()
=>
(
top
:
()
=>
(
$diffTabs
.
offset
().
top
-
$tabs
.
height
()
$diffTabs
.
offset
().
top
-
$tabs
.
height
()
-
$fixedNav
.
height
()
),
),
},
},
})
})
...
...
app/assets/stylesheets/framework/header.scss
View file @
52accce3
...
@@ -30,6 +30,9 @@ header {
...
@@ -30,6 +30,9 @@ header {
background-color
:
$gray-light
;
background-color
:
$gray-light
;
border
:
none
;
border
:
none
;
border-bottom
:
1px
solid
$border-color
;
border-bottom
:
1px
solid
$border-color
;
position
:
fixed
;
top
:
0
;
width
:
100%
;
@media
(
max-width
:
$screen-xs-min
)
{
@media
(
max-width
:
$screen-xs-min
)
{
padding
:
0
16px
;
padding
:
0
16px
;
...
...
app/assets/stylesheets/framework/layout.scss
View file @
52accce3
...
@@ -25,6 +25,10 @@ body {
...
@@ -25,6 +25,10 @@ body {
.content-wrapper
{
.content-wrapper
{
padding-bottom
:
100px
;
padding-bottom
:
100px
;
&
:not
(
.page-with-layout-nav
)
{
margin-top
:
$header-height
;
}
}
}
.container
{
.container
{
...
...
app/assets/stylesheets/framework/nav.scss
View file @
52accce3
...
@@ -291,6 +291,7 @@
...
@@ -291,6 +291,7 @@
border-bottom
:
1px
solid
$border-color
;
border-bottom
:
1px
solid
$border-color
;
transition
:
padding
$sidebar-transition-duration
;
transition
:
padding
$sidebar-transition-duration
;
text-align
:
center
;
text-align
:
center
;
margin-top
:
$header-height
;
.container-fluid
{
.container-fluid
{
position
:
relative
;
position
:
relative
;
...
@@ -428,7 +429,7 @@
...
@@ -428,7 +429,7 @@
top
:
(
$header-height
+
1
)
*
3
;
top
:
(
$header-height
+
1
)
*
3
;
&
.affix
{
&
.affix
{
top
:
0
;
top
:
$header-height
;
}
}
}
}
}
}
...
...
app/assets/stylesheets/framework/sidebar.scss
View file @
52accce3
...
@@ -80,6 +80,6 @@
...
@@ -80,6 +80,6 @@
&
.affix
{
&
.affix
{
position
:
fixed
;
position
:
fixed
;
top
:
0
;
top
:
$header-height
;
;
}
}
}
}
app/views/projects/builds/_sidebar.html.haml
View file @
52accce3
-
builds
=
@build
.
pipeline
.
builds
.
to_a
-
builds
=
@build
.
pipeline
.
builds
.
to_a
%aside
.right-sidebar.right-sidebar-expanded.build-sidebar.js-build-sidebar.js-right-sidebar
{
data:
{
"offset-top"
=>
"1
53
"
,
"spy"
=>
"affix"
}
}
%aside
.right-sidebar.right-sidebar-expanded.build-sidebar.js-build-sidebar.js-right-sidebar
{
data:
{
"offset-top"
=>
"1
01
"
,
"spy"
=>
"affix"
}
}
.block.build-sidebar-header.visible-xs-block.visible-sm-block.append-bottom-default
.block.build-sidebar-header.visible-xs-block.visible-sm-block.append-bottom-default
Job
Job
%strong
##{@build.id}
%strong
##{@build.id}
...
...
app/views/projects/wikis/_sidebar.html.haml
View file @
52accce3
%aside
.right-sidebar.right-sidebar-expanded.wiki-sidebar.js-wiki-sidebar.js-right-sidebar
{
data:
{
"offset-top"
=>
"
102
"
,
"spy"
=>
"affix"
}
}
%aside
.right-sidebar.right-sidebar-expanded.wiki-sidebar.js-wiki-sidebar.js-right-sidebar
{
data:
{
"offset-top"
=>
"
50
"
,
"spy"
=>
"affix"
}
}
.block.wiki-sidebar-header.append-bottom-default
.block.wiki-sidebar-header.append-bottom-default
%a
.gutter-toggle.pull-right.visible-xs-block.visible-sm-block.js-sidebar-wiki-toggle
{
href:
"#"
}
%a
.gutter-toggle.pull-right.visible-xs-block.visible-sm-block.js-sidebar-wiki-toggle
{
href:
"#"
}
=
icon
(
'angle-double-right'
)
=
icon
(
'angle-double-right'
)
...
...
app/views/shared/issuable/_sidebar.html.haml
View file @
52accce3
...
@@ -3,8 +3,7 @@
...
@@ -3,8 +3,7 @@
=
page_specific_javascript_bundle_tag
(
'common_vue'
)
=
page_specific_javascript_bundle_tag
(
'common_vue'
)
=
page_specific_javascript_bundle_tag
(
'sidebar'
)
=
page_specific_javascript_bundle_tag
(
'sidebar'
)
%aside
.right-sidebar.js-right-sidebar
{
data:
{
"offset-top"
=>
"102"
,
"spy"
=>
"affix"
},
class:
sidebar_gutter_collapsed_class
,
'aria-live'
=>
'polite'
}
%aside
.right-sidebar.js-right-sidebar
{
data:
{
"offset-top"
=>
"50"
,
"spy"
=>
"affix"
},
class:
sidebar_gutter_collapsed_class
,
'aria-live'
=>
'polite'
}
.issuable-sidebar
{
data:
{
endpoint:
"#{issuable_json_path(issuable)}"
}
}
-
can_edit_issuable
=
can?
(
current_user
,
:"admin_
#{
issuable
.
to_ability_name
}
"
,
@project
)
-
can_edit_issuable
=
can?
(
current_user
,
:"admin_
#{
issuable
.
to_ability_name
}
"
,
@project
)
.block.issuable-sidebar-header
.block.issuable-sidebar-header
-
if
current_user
-
if
current_user
...
...
app/views/shared/milestones/_sidebar.html.haml
View file @
52accce3
-
affix_offset
=
local_assigns
.
fetch
(
:affix_offset
,
"
102
"
)
-
affix_offset
=
local_assigns
.
fetch
(
:affix_offset
,
"
50
"
)
-
project
=
local_assigns
[
:project
]
-
project
=
local_assigns
[
:project
]
%aside
.right-sidebar.js-right-sidebar
{
data:
{
"offset-top"
=>
affix_offset
,
"spy"
=>
"affix"
},
class:
sidebar_gutter_collapsed_class
,
'aria-live'
=>
'polite'
}
%aside
.right-sidebar.js-right-sidebar
{
data:
{
"offset-top"
=>
affix_offset
,
"spy"
=>
"affix"
},
class:
sidebar_gutter_collapsed_class
,
'aria-live'
=>
'polite'
}
...
...
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