Add skeleton for mobile docs nav

This commit is contained in:
hunicus
2021-12-16 18:24:26 -05:00
parent 9a18019d9d
commit e01ab449cf
4 changed files with 58 additions and 12 deletions

View File

@@ -17,7 +17,9 @@ export class ApiDocsComponent implements OnInit {
code: any;
baseNetworkUrl = '';
@Input() restTabActivated: Boolean;
docsNavPosition = "relative";
desktopDocsNavPosition = "relative";
mobileDocsNavPosition = "relative";
mobileMenuOpen = true;
constructor(
private stateService: StateService,
@@ -39,11 +41,8 @@ export class ApiDocsComponent implements OnInit {
//to toggle fixed menu for desktop navigation
let that = this;
window.addEventListener('scroll', function() {
if( window.pageYOffset > 182 ) {
that.docsNavPosition = "fixed";
} else {
that.docsNavPosition = "relative";
}
that.desktopDocsNavPosition = ( window.pageYOffset > 182 ) ? "fixed" : "relative";
that.mobileDocsNavPosition = ( window.pageYOffset > 182 ) ? "fixed" : "relative";
});
if (document.location.port !== '') {