Skip to content

Commit

Permalink
Merge pull request #261 from argonne-lcf/turn_off_custom_mobile_nav
Browse files Browse the repository at this point in the history
removed the js for the custom mobile nav
  • Loading branch information
felker authored Oct 16, 2023
2 parents 1a4efa2 + a510788 commit a86730d
Showing 1 changed file with 31 additions and 31 deletions.
62 changes: 31 additions & 31 deletions docs/javascripts/alcf-extra.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,48 +96,48 @@ if (dropdowns.length > 0) {



// Include the mobile dropdowns (unlike above, just writing it all here)
// ----------------------------------------------------------------------------
// // Include the mobile dropdowns (unlike above, just writing it all here)
// // ----------------------------------------------------------------------------


// open/close the big pane
var mobileOpen = document.getElementById('js-mobileOpen');
var mobileClose = document.getElementById('js-mobileClose');
var mobileMenu = document.getElementById('js-mobileMenu');
// // open/close the big pane
// var mobileOpen = document.getElementById('js-mobileOpen');
// var mobileClose = document.getElementById('js-mobileClose');
// var mobileMenu = document.getElementById('js-mobileMenu');

mobileOpen.addEventListener("click", function(e) {
mobileMenu .classList.replace("menu--closed", "menu--open");
});
// mobileOpen.addEventListener("click", function(e) {
// mobileMenu .classList.replace("menu--closed", "menu--open");
// });

mobileClose.addEventListener("click", function(e) {
mobileMenu .classList.replace("menu--open", "menu--closed");
});
// mobileClose.addEventListener("click", function(e) {
// mobileMenu .classList.replace("menu--open", "menu--closed");
// });


// open/close individual menus
// // open/close individual menus

var drawerHeads = document.getElementsByClassName('drawer-head');
// var drawerHeads = document.getElementsByClassName('drawer-head');

Array.prototype.forEach.call(drawerHeads, function(head){
// Array.prototype.forEach.call(drawerHeads, function(head){

head.addEventListener("click", function(e){
var mobmenu = head.dataset.mobmenu;
mobmenu = document.getElementById(mobmenu);
var arrow = this.querySelector(".drawer-arrow");

if (mobmenu.classList.contains('menu--closed')) {
mobmenu.classList.remove('menu--closed');
arrow.innerHTML = "▲"
}
else {
mobmenu.classList.add('menu--closed');
arrow.innerHTML = "▼"
}
// head.addEventListener("click", function(e){
// var mobmenu = head.dataset.mobmenu;
// mobmenu = document.getElementById(mobmenu);
// var arrow = this.querySelector(".drawer-arrow");

// if (mobmenu.classList.contains('menu--closed')) {
// mobmenu.classList.remove('menu--closed');
// arrow.innerHTML = "▲"
// }
// else {
// mobmenu.classList.add('menu--closed');
// arrow.innerHTML = "▼"
// }

});
});
// });
// });

// add listener to each of the links that toggles menus
// // add listener to each of the links that toggles menus



Expand Down

0 comments on commit a86730d

Please sign in to comment.