summaryrefslogblamecommitdiff
path: root/js/setNavBarState.ts
blob: cfcc50974fa76d96c4b8196c50b74e0d97fe65ae (plain) (tree)
1
2
3
4
5
6
7
8
9








                                                                              
                                                              



                                                                       
enum NavBarState {
	Visible,
	Hidden,
}

function setNavBarState(state: NavBarState) {
	console.log("setting navigation bar to `" + NavBarState[state] + "`");

	let nav_bar   = document.getElementById("navBar")!;
	let hamburger = document.getElementById("hamburger")!;

	nav_bar.setAttribute("data-state", NavBarState[state]);
	hamburger.setAttribute("data-navBarState", NavBarState[state]);
}