Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/assets/themes/zeppelin/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ body {
font-size: 15px;
}

html {
scroll-padding-top: 60px;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: scroll-padding-top: 60px here and .navbar { height: 60px; } further down both hardcode the same 60px value in two separate places. Would it make sense to tie them together with a CSS custom property (e.g. --navbar-height) so they can't drift apart again — that's basically what caused this bug in the first place?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@world970511 I think we'd better address this issue in this PR. Could you please check this message? 🙏

}

.jumbotron {
background-color: #3071a9;
}
Expand Down
16 changes: 0 additions & 16 deletions docs/assets/themes/zeppelin/js/docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,6 @@ function viewSolution() {
});
}

// A script to fix internal hash links because we have an overlapping top bar.
// Based on https://github.com/twitter/bootstrap/issues/193#issuecomment-2281510
function maybeScrollToHash() {
if (window.location.hash && $(window.location.hash).length) {
var newTop = $(window.location.hash).offset().top - 57;
$(window).scrollTop(newTop);
}
}

$(function() {
codeTabs();
// Display anchor links when hovering over headers. For documentation of the
Expand All @@ -114,10 +105,6 @@ $(function() {
};
anchors.add();

$(window).bind('hashchange', function() {
maybeScrollToHash();
});

$(document).ready(function() {
$('#toc').toc();
});
Expand All @@ -131,7 +118,4 @@ $(function() {
}
});

// Scroll now too in case we had opened the page on a hash, but wait a bit because some browsers
// will try to do *their* initial scroll after running the onReady handler.
$(window).load(function() { setTimeout(function() { maybeScrollToHash(); }, 25); });
});
Loading