trappo 0.1.0

Fast and convenient remote server automation and deployment tool
Documentation
$(function(){
    $('html').toggleClass('no-js js');

    // build side menu
    var html = '';

    $('.bs-docs-section h1').each(function () {
        var mainheader = $this = $(this);
        var subheaders = $this.nextUntil('h1', 'h2, h3');

        if (mainheader.length) {
            html += '<li><a href="#' + mainheader[0].id +'">' + mainheader.clone().children().remove().end().text() + '</a>';

            if (subheaders.length) {
                html+= '<ul class="nav">';
                subheaders.each(function() {
                  html +=  '<li><a href="#' + this.id +'">' + $(this).clone().children().remove().end().text() + '</a></li>';
                });
                html+= '</ul>';
            }

            html += '</li>';
        }
    });

    if (html != '') {
        $('.bs-docs-sidenav').html(html);
        $('[role=complementary]').show();
        $('[role=main]').toggleClass('col-md-12 col-md-9');

        $('[role=complementary]').Stickyfill();
    }

    $('body').scrollspy({
        target: ".bs-docs-sidebar"
    });
});

function trianglify(color1, color2) {
    var header = $('#jumbotron-header'),
        t = new Trianglify({
            cellsize: 90,
            noiseIntensity: 0,
            x_gradient: [color1, color2]
        }),
        pattern = t.generate(window.screen.width | header.outerWidth(), header.outerHeight()*1.2);

    header.css('background-image', pattern.dataUrl);
}