Skip to content
Snippets Groups Projects
Commit 628b49b8 authored by Brian Canini's avatar Brian Canini
Browse files

people page timer

- setting up class for site names
- setting up specific timer for people pages
- setting up specific timer for sites with extra large people pages
parent 68adae31
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
}
}
......
......@@ -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 }}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment