* Add setup and usage docs Signed-off-by: lucperkins <lucperkins@gmail.com> * Finish initial version of setup doc * Add YAML config file for CLI docs * Finish CLI shortcode Signed-off-by: lucperkins <lucperkins@gmail.com> * Fix scrolling on mobile Signed-off-by: lucperkins <lucperkins@gmail.com> * Finish first version of usage doc Signed-off-by: lucperkins <lucperkins@gmail.com> * Remove go install section, modify CSS for CLI docs, and fix typo Signed-off-by: lucperkins <lucperkins@gmail.com>
34 lines
621 B
JavaScript
34 lines
621 B
JavaScript
function anchorJs() {
|
|
if ($('.is-docs-page').length > 0) {
|
|
anchors.options = {
|
|
icon: '#'
|
|
}
|
|
|
|
anchors.add('.cli h2, .content h2, .content h3, .content h4');
|
|
}
|
|
}
|
|
|
|
function scrollFadeInOut(threshold, element) {
|
|
//element.hide();
|
|
|
|
$(window).scroll(function() {
|
|
if ($(this).scrollTop() > threshold) {
|
|
element.fadeIn();
|
|
} else {
|
|
element.fadeOut();
|
|
}
|
|
});
|
|
}
|
|
|
|
function navbarScrollToggle() {
|
|
const navbar = $('.is-home-page .navbar');
|
|
const heroHeight = $('.hero').height();
|
|
|
|
scrollFadeInOut(heroHeight, navbar);
|
|
}
|
|
|
|
$(function() {
|
|
anchorJs();
|
|
navbarScrollToggle();
|
|
});
|