Add Version Selector to v1.4 (#4746)

* Add Version Selector to v1.4

* upgrade to newer header

* change include_cached to include

* move head.html to correct location

* remove seo

* add footer-scripts.html

* turn on global nav

* fix docs nav link
This commit is contained in:
Andrew Chen
2017-08-10 17:43:56 -07:00
committed by GitHub
parent 68a6b91536
commit d00396ef79
8 changed files with 676 additions and 130 deletions
+19
View File
@@ -503,3 +503,22 @@ var pushmenu = (function(){
show: show
};
})();
$(function() {
// Make global nav be active based on pathname
if ((location.pathname.split("/")[1]) !== ""){
$('.global-nav').show();
$('.global-nav li a[href^="/' + location.pathname.split("/")[1] + '"]').addClass('active');
}
// If vendor strip doesn't exist add className
if ( !$('#vendorStrip').length > 0 ) {
$('#hero').addClass('bot-bar');
}
// If is not homepage add class to hero section
if (!$('#home').length > 0 ) {
$('#hero').addClass('no-sub');
}
});