summaryrefslogblamecommitdiff
path: root/js/setNavBarState.ts
blob: 04058f75213aca57ccbc3c061150e5b10e1e1ad6 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14













                                                                              
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]);
}