Skip to content
Merged
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 asset/css/markbind.css
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ footer {
max-height: 90vh;
}

.position-top {
top: 0;
}

/* Bootstrap small(sm) responsive breakpoint */
@media (max-width: 767.98px) {
.dropdown-menu > li > a {
Expand Down
4 changes: 2 additions & 2 deletions src/Page.js
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ Page.prototype.insertSiteNav = function (pageData) {
}
// Wrap sections
const wrappedSiteNav = `<nav id="${SITE_NAV_ID}" class="navbar navbar-light bg-transparent">\n`
+ '<div class="sticky-top site-nav-spacer viewport-height-90 scrollable slim-scroll">'
+ '<div class="position-sticky position-top site-nav-spacer viewport-height-90 scrollable slim-scroll">'
+ `${siteNavDataSelector.html()}\n`
+ '</div>\n'
+ '</nav>';
Expand Down Expand Up @@ -681,7 +681,7 @@ Page.prototype.buildPageNav = function () {
const pageNavHeadingHTML = this.generatePageNavHeadingHtml();
this.pageSectionsHtml[`#${PAGE_NAV_ID}`] = htmlBeautify(
`<nav id="${PAGE_NAV_ID}" class="navbar navbar-light bg-transparent">\n`
+ '<div class="sticky-top spacer-top viewport-height-90 scrollable slim-scroll">\n'
+ '<div class="position-sticky position-top spacer-top viewport-height-90 scrollable slim-scroll">\n'
+ `${pageNavTitleHtml}\n`
+ '<nav class="nav nav-pills flex-column my-0 small no-flex-wrap">\n'
+ `${pageNavHeadingHTML}\n`
Expand Down
4 changes: 2 additions & 2 deletions test/functional/test_site/expected/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
</header>
<div id="flex-body">
<nav id="site-nav" class="navbar navbar-light bg-transparent">
<div class="sticky-top site-nav-spacer viewport-height-90 scrollable slim-scroll">
<div class="position-sticky position-top site-nav-spacer viewport-height-90 scrollable slim-scroll">
<ul class="px-0 site-nav-list">
<li class="mt-2">
<h2 id="navigation">Navigation<a class="fa fa-anchor" href="#navigation"></a></h2>
Expand Down Expand Up @@ -454,7 +454,7 @@ <h2 class="no-index" id="level-2-header-inside-headingsearchindex-with-no-index-
<h6 class="always-index" id="level-6-header-outside-headingsearchindex-with-always-index-attribute-should-be-indexed">Level 6 header (outside headingSearchIndex) with always-index attribute should be indexed</h6>
</div>
<nav id="page-nav" class="navbar navbar-light bg-transparent">
<div class="sticky-top spacer-top viewport-height-90 scrollable slim-scroll">
<div class="position-sticky position-top spacer-top viewport-height-90 scrollable slim-scroll">
<a class="navbar-brand page-nav-title" href="#">Testing Page Navigation</a>
<nav class="nav nav-pills flex-column my-0 small no-flex-wrap">
<a class="nav-link py-1" href="#variables-that-reference-another-variable">Variables that reference another variable&#x200E;</a>
Expand Down
4 changes: 4 additions & 0 deletions test/functional/test_site/expected/markbind/css/markbind.css
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ footer {
max-height: 90vh;
}

.position-top {
top: 0;
}

/* Bootstrap small(sm) responsive breakpoint */
@media (max-width: 767.98px) {
.dropdown-menu > li > a {
Expand Down
2 changes: 1 addition & 1 deletion test/functional/test_site/expected/testLayouts.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<div id="app">
<div id="flex-body">
<nav id="site-nav" class="navbar navbar-light bg-transparent">
<div class="sticky-top site-nav-spacer viewport-height-90 scrollable slim-scroll">
<div class="position-sticky position-top site-nav-spacer viewport-height-90 scrollable slim-scroll">
<ul class="px-0 site-nav-list">
<li class="mt-2">[Layout Nav]</li>
</ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<div id="app">
<div id="flex-body">
<nav id="site-nav" class="navbar navbar-light bg-transparent">
<div class="sticky-top site-nav-spacer viewport-height-90 scrollable slim-scroll">
<div class="position-sticky position-top site-nav-spacer viewport-height-90 scrollable slim-scroll">
<ul class="px-0 site-nav-list">
<li class="mt-2">[Layout Nav]</li>
</ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<div id="app">
<div id="flex-body">
<nav id="site-nav" class="navbar navbar-light bg-transparent">
<div class="sticky-top site-nav-spacer viewport-height-90 scrollable slim-scroll">
<div class="position-sticky position-top site-nav-spacer viewport-height-90 scrollable slim-scroll">
<ul class="px-0 site-nav-list">
<li class="mt-2"><a href="/test_site_algolia_plugin/index.html" class="site-nav__a current">Home <span aria-hidden="true" class="glyphicon glyphicon-home"></span></a></li>
</ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ footer {
max-height: 90vh;
}

.position-top {
top: 0;
}

/* Bootstrap small(sm) responsive breakpoint */
@media (max-width: 767.98px) {
.dropdown-menu > li > a {
Expand Down