Difference between revisions of "Template:Team:Aachen/Footer"
(12 intermediate revisions by 2 users not shown) | |||
Line 47: | Line 47: | ||
$(".headline_bg").ready(function () { | $(".headline_bg").ready(function () { | ||
− | + | if (IsTourSite() == true) { | |
− | + | var heading = $('.headline').html(); | |
− | + | } | |
− | + | else { | |
− | + | var heading = $("#firstHeading").html().replace('<span dir="auto">', '').replace("</span>", ""); | |
− | + | } | |
− | + | var siteUrl = window.location.href; | |
− | + | switch (heading.trim()) | |
− | + | { | |
− | + | case "Team:Aachen/Software": | |
− | + | heading = "Team:Aachen/Lab/Bioreactor/Software"; | |
− | + | siteUrl = siteUrl.replace("Team:Aachen/Software", "Team:Aachen/Lab/Bioreactor/Software"); | |
− | + | break; | |
− | + | case "Team:Aachen/Modeling": | |
− | + | heading = "Team:Aachen/Lab/Modeling"; | |
− | + | siteUrl = siteUrl.replace("Team:Aachen/Modeling", "Team:Aachen/Lab/Modeling"); | |
− | + | break; | |
− | + | } | |
− | + | var splits = heading.split("/"); | |
− | + | var pages = siteUrl.split('/'); | |
+ | var output = '<span class="hidden-xs hidden-sm">'; | ||
+ | for (i = 0; i < splits.length - 1; i++) { | ||
+ | if (splits[i].trim() != "Team:Aachen")//do not attach the link for the landing page | ||
+ | { | ||
+ | switch (splits[i]) { | ||
+ | case "Notebook": output += splits[i] + " / "; break; // do not link to these level-1-pages | ||
+ | case "Documentation": break; | ||
+ | default: | ||
+ | output += '<a href="' + pages.slice(0, pages.length - splits.length + 1 + i).join('/') + '">' + splits[i] + '</a> / '; | ||
} | } | ||
} | } | ||
− | + | } | |
− | + | output += '</span>' + splits[splits.length - 1].replace("Team:Aachen", "iGEM Aachen"); | |
− | + | $(".headline_fill").html(output); | |
− | + | $(".hl_shadow").html(output); | |
+ | return false; | ||
}); | }); | ||
</script> | </script> | ||
Line 108: | Line 118: | ||
}); | }); | ||
</script> | </script> | ||
+ | |||
<!--Mousover for Menu--> | <!--Mousover for Menu--> | ||
<script> | <script> | ||
− | + | var t; | |
− | + | $(".dropdown-menu li.dropdown").on("mouseenter", function () { | |
− | + | $('.ac-submenu').hide(); | |
− | + | $(this).find( ".dropdown-menu").show(); | |
− | + | }); | |
− | + | ||
− | + | $(".ac-submenu").on("mouseleave", function () { | |
+ | t = setTimeout(function () { | ||
+ | $(".ac-submenu").hide(); | ||
+ | }, 1000); | ||
+ | }); | ||
+ | $(".ac-submenu").on("mouseenter", function () { | ||
+ | clearTimeout(t); | ||
}); | }); | ||
</script> | </script> |
Latest revision as of 03:45, 19 September 2015