inspec/www/source/layouts/layout.slim

317 lines
9.5 KiB
Text
Raw Normal View History

2016-09-11 23:26:00 +00:00
doctype html
html
head
meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible"
meta charset="utf-8"
meta content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" name="viewport"
2016-09-23 21:51:01 +00:00
link href="/favicon.png" rel="icon" type="image/png"
link href="/favicon.ico" rel="icon"
title = current_page.data.title || "Chef InSpec"
Inspec 3.0 (#3512) * Remove deprecated yumrepo. (#3435) * Remove deprecations for cli `--format` and metadata.rb (#3452) * Remove deprecated database_helpers stderr/stdout methods. Update deprecation text for processes/apache. * Remove deprecations for `--format` and metadata.rb Remove deprecated `format` code. Remove deprecated code test and change json-config format test to use reporter. Remove deprecated metadata.rb code Remove deprecation notice for old supports syntax. Deprecate metadata.rb from source_reader Remove rubocop disables as they are no longer required for this code block. Remove deprecated legacy metadata.rb mock profiles. Remove deprecated metadata.rb profile tests. Remove deprecated yumrepo test. * Allow inspec-3.0 branch to be tested. * Allow appveyor to test inspec-3.0 branch * Change runner tests to use reporter rather than format. Remove deprecated `supports: linux` tests. * Remove skip from inherited profiles from showing up in reporting (breaking change) (#3332) * Skip loading dependency profiles if they are unsupported on the current platform. Skip loading dependencies if they are unsupported on the current platform. Wrap our log and next in a conditional checking if the platform is supported. Change a `if !` into a `unless` Check if the backend is a Train Mock Connection and if so say that the profile does support the platform. While iterating through tests being loaded skip when the platform is unsupported. We now log a WARN when a profile is skipped due to unsupported platform, so lets check that. Modified existing test to log that there are 0 skipped tests, instead of 2. Add functional test that loads profile-support-skip with a json reporter to check that our controls are not loaded and that stderr contains our warning. * Rather than iterating through each test return before recursion if the platform is unsupported. * Resolve tests using a supported platform different from testing platform Add a control to `test/unit/mock/profiles/complete-profile` that would work on any OS with a Internet connection. This allows the profile to execute on any OS with success. `filesystem_spec.rb` was a control that would only work on Linux and some BSD's. We want profile tests to consistently work across development and testing platforms, and not get 'skipped' in some cases. Travis-CI tests on Linux, Inspec Dev team uses Linux and MacOS, Appveyor tests on Windows Also Updated `file_provider_test.rb` for `complete-profile` content changes. If you `MockLoader.load_profile` on a unsupported platform you might not hit the usual skip. Lets handle situations where the tests array in Profile#load_checks_params could be nil. * Use safe navigation rather than checking if tests is nil. Update tests to point to unsupported_inspec and account for WARN changes. Make unsupported_inspec profile support os-family 'unsupported_inspec' * Fix skip bug when using include/require controls. (#3487) * Fix skip bug when using include/require controls. * fix test and feedback. * Remove need for UUID detection for Automate report (#3507) * Add json metadata for skipped profiles (#3495) * Add skip metadata to json reports * Unify skip messages. * Update with status field. * Add testing. * Fix tests. * lint * Add skip exit codes for profile skips. * Update website for 3.0 launch Add `plugins` to sidebar. Change 2.0 -> 3.0 in slim files. Update 3.0 features list. * Fix comments * Update float to numeric. * Change Float to numeric. * updated feature list and impact doc * Change "What's new in InSpec 3.0" -> "Announcing InSpec 3.0" * Bump VERSION to 3.0.0 (#3511) * Remove 3.0 testing checks. * Fix azure link.
2018-10-15 22:25:27 +00:00
meta name= "description" content = current_page.data.description
2016-09-11 23:26:00 +00:00
link rel='stylesheet' type='text/css' href='/css/inspec_tutorial.css'
link rel='stylesheet' type='text/css' href='/stylesheets/vendor/fontawesome.min.css'
2016-09-11 23:26:00 +00:00
== stylesheet_link_tag :site
body class="#{page_classes}"
= partial "layouts/global-message"
2016-09-21 00:11:41 +00:00
.container
= partial "layouts/nav"
2016-09-11 23:26:00 +00:00
2016-09-21 00:11:41 +00:00
main#main-content
== yield
= partial "layouts/footer"
script src='https://buttons.github.io/buttons.js'
script src='/scripts/inspec_tutorial.js'
script src='/dist/inspec_tutorial.js'
script src='/javascripts/vendor/jquery.min.js'
script src='https://s3.amazonaws.com/menumaker/menumaker.min.js'
2016-09-23 13:26:22 +00:00
div inspec-tutorial="true" class="inspec-tutorial" hidden="true"
= "Loading"
== javascript_include_tag "all"
javascript:
function initSlideGroup(group) {
var prev = -1;
var links = $(group).find('a')
links.click(function(e) {
e.stopPropagation()
links.removeClass('selected')
$(this).addClass('selected')
var idx = $(this).index();
if(prev == idx) return;
prev = idx;
$('.slider .view.slide-in').removeClass('slide-in').addClass('slide-out')
var el = $('.slider .view')[idx]
if(el == null) {
console.log("No element for slider index "+idx)
return
}
$(el).removeClass('slide-out').removeClass('hidden').addClass('slide-in')
})
if(links[0] != null) links[0].click();
}
function initSliders() {
$('.slider .view').addClass('hidden')
var groups = $('.slider .selectors')
groups.each(function(idx){
initSlideGroup(this)
})
}
//run code colors
$(document).ready(function() {
initSliders()
$('pre code').each(function(i, block) {
hljs.highlightBlock(block);
});
});
//copy to clipboard
function copyToClipboard(element) {
var $temp = $("<input>");
$("body").append($temp);
$temp.val($(element).text()).select();
document.execCommand("copy");
$temp.remove();
}
$('#copy').hover(function() {
$('#install').toggleClass("text-focus");
});
$('#copy').click(function() {
$(this).removeClass("fa-copy");
$(this).addClass("fa-check");
setTimeout(() => {
$(this).removeClass('fa-check').addClass('fa-copy');
}, 1500);
});
// homepage content slider
// tutorial content slider
$(function() {
$(".collapseContent").hide();
$(".collapsebtn").addClass("fa-plus-square");
$('.collapseToggle').click(function() {
var el = $(this).parent().find('.collapseContent')
el.slideToggle("fast")
// $('.collapseContent').slideToggle("fast");
var btn = $(this).find('.collapsebtn')
if(btn.hasClass('fa-minus-square')) {
btn.addClass('fa-plus-square')
btn.removeClass('fa-minus-square')
} else {
btn.addClass('fa-minus-square')
btn.removeClass('fa-plus-square')
}
});
});
// scroll spy animations
var $slide_left = $('.slide-left');
var $slide_right = $('.slide-right');
var $slide_up = $('.slide-up');
var $slide_up_slow = $('.slide-up-slow');
var $window = $(window);
function check_if_in_view() {
var window_height = $window.height();
var window_top_position = $window.scrollTop();
var window_bottom_position = (window_top_position + window_height);
$.each($slide_left, function() {
var $element = $(this);
var element_height = $element.outerHeight();
var element_top_position = $element.offset().top;
var element_bottom_position = (element_top_position + element_height);
//check to see if this current container is within viewport
if ((element_bottom_position >= window_top_position) &&
(element_top_position <= window_bottom_position)) {
$element.addClass('in-view');
} else {
$element.removeClass('in-view');
}
});
$.each($slide_right, function() {
var $element = $(this);
var element_height = $element.outerHeight();
var element_top_position = $element.offset().top;
var element_bottom_position = (element_top_position + element_height);
//check to see if this current container is within viewport
if ((element_bottom_position >= window_top_position) &&
(element_top_position <= window_bottom_position)) {
$element.addClass('in-view');
} else {
$element.removeClass('in-view');
}
});
$.each($slide_up, function() {
var $element = $(this);
var element_height = $element.outerHeight();
var element_top_position = $element.offset().top;
var element_bottom_position = (element_top_position + element_height);
//check to see if this current container is within viewport
if ((element_bottom_position >= window_top_position) &&
(element_top_position <= window_bottom_position)) {
$element.addClass('in-view');
} else {
$element.removeClass('in-view');
}
});
$.each($slide_up_slow, function() {
var $element = $(this);
var element_height = $element.outerHeight();
var element_top_position = $element.offset().top;
var element_bottom_position = (element_top_position + element_height);
//check to see if this current container is within viewport
if ((element_bottom_position >= window_top_position) &&
(element_top_position <= window_bottom_position)) {
$element.addClass('in-view');
} else {
$element.removeClass('in-view');
}
});
}
$window.on('scroll resize', check_if_in_view);
$window.trigger('scroll');
//scroll to top
$(document).ready(function(){
$(window).scroll(function(){
if ($(this).scrollTop() > 100) {
$('.scrollToTop').fadeIn();
} else {
$('.scrollToTop').fadeOut();
}
});
$('.scrollToTop').click(function(){
$('html, body').animate({scrollTop : 0},800);
return false;
});
// scrolling to resource sections
$(".resources-button").click(function() {
var dst = $(this).attr("href")
$(".resources-button").removeClass("btn-purple").addClass("btn-purple-o")
$(this).addClass("btn-purple").removeClass("btn-purple-o")
$("html, body").animate({
scrollTop: $(dst).offset().top - 105
}, 1000);
});
});
//scrolling code box
var div = $('#scrolled');
setInterval(function(){
var pos = div.scrollTop();
div.scrollTop(pos + 2);
}, 200);
2017-01-07 04:53:01 +00:00
//Animating progress bar for header
2017-01-06 21:21:45 +00:00
$(document).ready(function(){
2017-01-06 21:21:45 +00:00
var getMax = function(){
return $(document).height() - $(window).height();
}
2017-01-06 21:21:45 +00:00
var getValue = function(){
return $(window).scrollTop();
}
2017-01-06 21:21:45 +00:00
if('max' in document.createElement('progress')){
// Browser supports progress element
var progressBar = $('progress');
2017-01-06 21:21:45 +00:00
// Set the Max attr for the first time
progressBar.attr({ max: getMax() });
$(document).on('scroll', function(){
// On scroll only Value attr needs to be calculated
progressBar.attr({ value: getValue() });
});
2017-01-06 21:21:45 +00:00
$(window).resize(function(){
// On resize, both Max/Value attr needs to be calculated
progressBar.attr({ max: getMax(), value: getValue() });
});
2017-01-06 21:21:45 +00:00
}
else {
var progressBar = $('.progress-bar'),
max = getMax(),
2017-01-06 21:21:45 +00:00
value, width;
2017-01-06 21:21:45 +00:00
var getWidth = function(){
// Calculate width in percentage
value = getValue();
2017-01-06 21:21:45 +00:00
width = (value/max) * 100;
width = width + '%';
return width;
}
2017-01-06 21:21:45 +00:00
var setWidth = function(){
progressBar.css({ width: getWidth() });
}
2017-01-06 21:21:45 +00:00
$(document).on('scroll', setWidth);
$(window).on('resize', function(){
// Need to reset the Max attr
max = getMax();
setWidth();
});
}
});
javascript:
$(document).foundation();
2016-09-23 13:26:22 +00:00
$('.try-demo').click(function(event){
event.stopPropagation();
$('.inspec-tutorial').show()
2016-09-26 12:32:27 +00:00
window.dispatchEvent(new Event('resizeTerminal'));
2016-09-23 13:26:22 +00:00
$('.quit-inspec-tutorial').click(function(event){
event.stopPropagation();
$('.inspec-tutorial').hide()
})
});
== javascript_include_tag "segment"