merge master to 1.10, with fixes (#7682)

This commit is contained in:
Jennifer Rondeau
2018-03-08 14:03:55 -05:00
committed by k8s-ci-robot
parent bb8c59a640
commit 44b51d6056
548 changed files with 11634 additions and 318622 deletions
+30
View File
@@ -0,0 +1,30 @@
$( document ).ready(function() {
function scrollToHash(hash) {
if (hash.length > 0) {
$('html, body').animate({
scrollTop: $(`#${hash}`).offset().top
}, 500);
}
}
$('#content h2').each(function(index) {
var title = $(this).text();
var id = $(this).attr("id");
// inject headers into user journeys table-of-contents (buttons)
$("#user-journeys-toc").append(`<a href="#section-${index + 1}"><div class="docButton">${index + 1}. ${title}</div></a>`)
// replace content headers with styled banners
$(this).replaceWith(`<div class="anchor" id="section-${index + 1}"></div><div class="docssectionheaders" id="${id}"><span class="numberCircle"><span><br><br>${index + 1}</span></span>&nbsp;&nbsp;${title}</div>`)
});
$('div#user-journeys-toc a').each(function() {
$(this).click(function() {
var target = $(this).attr("href").replace("#", "");
scrollToHash(target);
});
});
// jump to section in URL now that anchors are created
scrollToHash(window.location.hash.substr(1));
});