diff --git a/web/themes/asc_bootstrap/js/scripts.js b/web/themes/asc_bootstrap/js/scripts.js index dc7d5723ba766f3a6124fc81e38645d529efb9f5..7c502683ec8edef6e4a33e0c7afdd7575dd68229 100644 --- a/web/themes/asc_bootstrap/js/scripts.js +++ b/web/themes/asc_bootstrap/js/scripts.js @@ -16,9 +16,29 @@ jQuery(document).ready(function(){ //so user doesn't see accessible menu loading if(jQuery(".a11y-navbar")) { if (window.matchMedia('(max-width: 768px)').matches) { - setTimeout(function(){ jQuery("#main-nav").css({'position':'inherit', 'left':'0px'}); }, 500); + if(jQuery(".view-people-directory").length) { + if((jQuery(".site-department-of-english").length)||(jQuery(".site-department-of-mathematics").length)) { + setTimeout(function(){ jQuery("#main-nav").css({'position':'inherit', 'left':'0px'}); }, 4000); + } + else { + setTimeout(function(){ jQuery("#main-nav").css({'position':'inherit', 'left':'0px'}); }, 3000); + } + } + else { + setTimeout(function(){ jQuery("#main-nav").css({'position':'inherit', 'left':'0px'}); }, 500); + } } else { - setTimeout(function(){ jQuery("#main-nav").css({'position':'sticky', 'left':'0px'}); }, 500); + if(jQuery(".view-people-directory").length) { + if((jQuery(".site-department-of-english").length)||(jQuery(".site-department-of-mathematics").length)) { + setTimeout(function(){ jQuery("#main-nav").css({'position':'sticky', 'left':'0px'}); }, 4000); + } + else { + setTimeout(function(){ jQuery("#main-nav").css({'position':'sticky', 'left':'0px'}); }, 3000); + } + } + else { + setTimeout(function(){ jQuery("#main-nav").css({'position':'sticky', 'left':'0px'}); }, 500); + } } } diff --git a/web/themes/asc_bootstrap/templates/system/page.html.twig b/web/themes/asc_bootstrap/templates/system/page.html.twig index 3bbc6c22e414d4ad15ba70acba36c9681bf79ce8..abd35bc35be7aa74439224fb969f724cd33267b7 100755 --- a/web/themes/asc_bootstrap/templates/system/page.html.twig +++ b/web/themes/asc_bootstrap/templates/system/page.html.twig @@ -50,7 +50,7 @@ {% include directory ~ '/templates/system/includes/_header.twig' %} - <div id="main-nav"> + <div id="main-nav" class="site-{{ site_name|lower|replace({' ': '-'}) }}"> <div class="container"> <nav aria-label="Main"> {{ page.navigation }}