Skip to content
Snippets Groups Projects
Commit ba6e5985 authored by Annabel Dunstone Gray's avatar Annabel Dunstone Gray
Browse files

Add fixed positioning to top level navbar

Former-commit-id: 52accce3
parent b607638d
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -353,6 +353,7 @@ import BlobForkSuggestion from './blob/blob_fork_suggestion';
 
initAffix() {
const $tabs = $('.js-tabs-affix');
const $fixedNav = $('.navbar-gitlab');
 
// Screen space on small screens is usually very sparse
// So we dont affix the tabs on these
Loading
Loading
@@ -371,7 +372,7 @@ import BlobForkSuggestion from './blob/blob_fork_suggestion';
.affix({
offset: {
top: () => (
$diffTabs.offset().top - $tabs.height()
$diffTabs.offset().top - $tabs.height() - $fixedNav.height()
),
},
})
Loading
Loading
Loading
Loading
@@ -30,6 +30,9 @@ header {
background-color: $gray-light;
border: none;
border-bottom: 1px solid $border-color;
position: fixed;
top: 0;
width: 100%;
 
@media (max-width: $screen-xs-min) {
padding: 0 16px;
Loading
Loading
Loading
Loading
@@ -25,6 +25,10 @@ body {
 
.content-wrapper {
padding-bottom: 100px;
&:not(.page-with-layout-nav) {
margin-top: $header-height;
}
}
 
.container {
Loading
Loading
Loading
Loading
@@ -291,6 +291,7 @@
border-bottom: 1px solid $border-color;
transition: padding $sidebar-transition-duration;
text-align: center;
margin-top: $header-height;
 
.container-fluid {
position: relative;
Loading
Loading
@@ -428,7 +429,7 @@
top: ($header-height + 1) * 3;
 
&.affix {
top: 0;
top: $header-height;
}
}
}
Loading
Loading
Loading
Loading
@@ -80,6 +80,6 @@
 
&.affix {
position: fixed;
top: 0;
top: $header-height;;
}
}
- builds = @build.pipeline.builds.to_a
 
%aside.right-sidebar.right-sidebar-expanded.build-sidebar.js-build-sidebar.js-right-sidebar{ data: { "offset-top" => "153", "spy" => "affix" } }
%aside.right-sidebar.right-sidebar-expanded.build-sidebar.js-build-sidebar.js-right-sidebar{ data: { "offset-top" => "101", "spy" => "affix" } }
.block.build-sidebar-header.visible-xs-block.visible-sm-block.append-bottom-default
Job
%strong ##{@build.id}
Loading
Loading
%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
%a.gutter-toggle.pull-right.visible-xs-block.visible-sm-block.js-sidebar-wiki-toggle{ href: "#" }
= icon('angle-double-right')
Loading
Loading
Loading
Loading
@@ -3,8 +3,7 @@
= page_specific_javascript_bundle_tag('common_vue')
= 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' }
.issuable-sidebar{ data: { endpoint: "#{issuable_json_path(issuable)}" } }
%aside.right-sidebar.js-right-sidebar{ data: { "offset-top" => "50", "spy" => "affix" }, class: sidebar_gutter_collapsed_class, 'aria-live' => 'polite' }
- can_edit_issuable = can?(current_user, :"admin_#{issuable.to_ability_name}", @project)
.block.issuable-sidebar-header
- if current_user
Loading
Loading
- affix_offset = local_assigns.fetch(:affix_offset, "102")
- affix_offset = local_assigns.fetch(:affix_offset, "50")
- 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' }
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment