From b200851a51259c99271f491999d8987654d0071d Mon Sep 17 00:00:00 2001 From: Christoph Hartmann Date: Fri, 20 Jan 2017 10:15:38 +0100 Subject: [PATCH] minor code-style fixes Signed-off-by: Christoph Hartmann --- www/source/community.html.slim | 20 ++++-- www/source/index.html.slim | 52 ++++++++++---- www/source/layouts/_nav.slim | 30 ++++---- www/source/layouts/layout.slim | 58 ++++++++------- www/source/stylesheets/_buttons.scss | 12 ++-- www/source/stylesheets/_layout.scss | 95 +++++++++++++------------ www/source/stylesheets/_typography.scss | 8 ++- www/source/tutorials.html.slim | 22 ++++-- 8 files changed, 176 insertions(+), 121 deletions(-) diff --git a/www/source/community.html.slim b/www/source/community.html.slim index f3c991100..d9a835c2f 100644 --- a/www/source/community.html.slim +++ b/www/source/community.html.slim @@ -5,17 +5,21 @@ description: This is where you interact with the InSpec open source community - .row.margin-both-offset .columns.large-6.medium-6 - h2#icon-trigger data-enllax-direction="horizontal" data-enllax-ratio=".1" data-enllax-type="foreground" + + h2#icon-trigger data-enllax-direction="horizontal" data-enllax-ratio=".1" data-enllax-type="foreground" + | Inspec is better with friends. br/ | Let’s build together. hr.strict-left.margin-under h3.clear - | Join us on Slack and get answers fast - P - | Is something unclear or are you just feeling stuck? We're here to help keep you moving. Chat with us on Slack, so we can help you keep moving. - p + + | Join us on Slack and get answers fast + P + | Is something unclear or are you just feeling stuck? We're here to help keep you moving. Chat with us on Slack, so we can help you keep moving. + p | Sign in to slack or request an invite below: +
@@ -58,6 +62,8 @@ description: This is where you interact with the InSpec open source community - a.btn.margin-top-xs href="https://github.com/chef/inspec/issues" Give Feedback p + + //Old Twitter - Hannah /.row / .icon.shadow @@ -65,7 +71,9 @@ description: This is where you interact with the InSpec open source community - /.block-angl.blue-gradient / .section.purp-shade / .row.triangle-shade - / .large-7.medium-7.columns.margin-top-xl.margin-under-xs data-enllax-ratio=".1" data-enllax-type="foreground" + + / .large-7.medium-7.columns.margin-top-xl.margin-under-xs data-enllax-ratio=".1" data-enllax-type="foreground" + / small.t-dk Inspec on Twitter / h2.t-white / | Latest from #inspec diff --git a/www/source/index.html.slim b/www/source/index.html.slim index b178981f5..599f012eb 100644 --- a/www/source/index.html.slim +++ b/www/source/index.html.slim @@ -17,9 +17,11 @@ header.blue-gradient.margin-top-offset .icon.shadow img src="/images/circ-arrow.svg" / + /! Second Content .row.margin-both - .large-9.medium-9.columns data-enllax-direction="horizontal" data-enllax-ratio=".1" data-enllax-type="foreground" + .large-9.medium-9.columns data-enllax-direction="horizontal" data-enllax-ratio=".1" data-enllax-type="foreground" + h2 Automated testing, codified p#icon-trigger | InSpec is an open-source testing framework for infrastructure with a human-readable language for specifying compliance, security and other policy requirements. Easily integrate automated tests that check for adherence to policy into any stage of your deployment pipeline. @@ -61,8 +63,10 @@ header.blue-gradient.margin-top-offset img src="/images/circ-arrow.svg" / .block-angl.blue-gradient .section.purp-shade - .row.relative-top - .large-7.medium-7.columns.margin-top-xl.margin-under-xs data-enllax-ratio=".1" data-enllax-type="foreground" + + .row.relative-top + .large-7.medium-7.columns.margin-top-xl.margin-under-xs data-enllax-ratio=".1" data-enllax-type="foreground" + small.t-dk Inspec for compliance h2.t-white | Transform your compliance and security requirements into simple code @@ -70,17 +74,23 @@ header.blue-gradient.margin-top-offset canvas.particles-js-canvas-el .row .large-5.medium-5.columns.margin-under-xs - h3.t-white + + h3.t-white + i.fa.fa-angle-right.t-dk | Codify agreements p.t-white | Combine profiles and customize them with overlays. Pick controls and define exceptions as code. - h3.t-white + + h3.t-white + i.fa.fa-angle-right.t-dk | Add context to your tests p.t-white | Supports many fields like descriptions, tags, and impact. - h3.t-white + + h3.t-white + i.fa.fa-angle-right.t-dk | Apply to all systems p.t-white @@ -106,7 +116,9 @@ header.blue-gradient.margin-top-offset br/ br/ span.code-attribute.indent describe - | sshd_config + + | sshd_config + span.code-attribute do br/ span.code-attribute.indent its @@ -115,30 +127,38 @@ header.blue-gradient.margin-top-offset span.code-attribute.indent end br/ span.code-attribute end - a.btn.strict-right.t-white.try-demo.mobile-hide Try the Demo + + a.btn.strict-right.t-white.try-demo.mobile-hide Try the Demo /! Next row .row - .large-6.medium-6.columns.margin-under-xs data-enllax-ratio=".1" data-enllax-type="foreground" + .large-6.medium-6.columns.margin-under-xs data-enllax-ratio=".1" data-enllax-type="foreground" + small.t-dk Inspec for infrastructure h2.t-white | Solve your infrastructure testing needs simply and efficiently .row .large-5.medium-5.columns.margin-under-xs - h3.t-white + + h3.t-white i.fa.fa-angle-right.t-dk | Test the desired state p.t-white Match your infrastructure to your expectations. - h3.t-white + h3.t-white + i.fa.fa-angle-right.t-dk | Use simple and expressive code p.t-white | These tests are easy to understand by anyone, reducing friction. - h3.t-white + + h3.t-white + i.fa.fa-angle-right.t-dk | Test any system anywhere p.t-white | Runs locally and remotely. Supports all major operating systems and configurations. - h3.t-white + + h3.t-white + i.fa.fa-angle-right.t-dk | Extensible p.t-white @@ -148,7 +168,9 @@ header.blue-gradient.margin-top-offset .code-example.shadow.relative-top.margin-under code.code-demo span.code-attribute describe - | file('/etc/myap.conf') + + | file('/etc/myap.conf') + span.code-attribute do br/ span.code-attribute.indent it @@ -179,3 +201,5 @@ header.blue-gradient.margin-top-offset br/ span.code-attribute end a.btn.strict-right.t-white.try-demo.mobile-hide Try the Demo + + diff --git a/www/source/layouts/_nav.slim b/www/source/layouts/_nav.slim index c75a66cc0..f91b55cab 100644 --- a/www/source/layouts/_nav.slim +++ b/www/source/layouts/_nav.slim @@ -1,12 +1,14 @@ -nav#main-nav + +nav#main-nav - + #main-nav-ctas a.main-nav--logo href="/" img src="/images/inspec-by-chef-logo.svg" onerror="this.src='/images/inspec-by-chef-logo.png'" - + i.fa.fa-bars.main-nav--toggle.strict-right.show-for-small-only + ul.main-nav--links li.main-nav--link.hide-docs @@ -17,43 +19,45 @@ nav#main-nav span.main-nav--link-text.docs Docs span.fa.fa-angle-right.t-purple.toggle.mobile-show - + + li.main-nav--link.docs--inside--link a href="/docs/reference/cli.html" span.main-nav--link-text inspec executable - + li.main-nav--link.docs--inside--link a href="/docs/reference/profiles.html" span.main-nav--link-text Profiles - + li.main-nav--link.docs--inside--link a href="/docs/reference/resources.html" span.main-nav--link-text Resources - + li.main-nav--link.docs--inside--link a href="/docs/reference/matchers.html" span.main-nav--link-text Matchers - + li.main-nav--link.docs--inside--link a href="/docs/reference/dsl_inspec.html" span.main-nav--link-text InSpec DSL - + li.main-nav--link.docs--inside--link a href="/docs/reference/dsl_resource.html" span.main-nav--link-text Resource DSL - + li.main-nav--link.docs--inside--link a href="/docs/reference/plugin_kitchen_inspec.html" span.main-nav--link-text kitchen-inspec - + li.main-nav--link.docs--inside--link a href="/docs/reference/shell.html" span.main-nav--link-text inspec shell - + li.main-nav--link.docs--inside--link a href="/docs/reference/ruby_usage.html" span.main-nav--link-text Ruby usage - + + li.main-nav--link.hide-docs a href="/community" diff --git a/www/source/layouts/layout.slim b/www/source/layouts/layout.slim index 91a819369..5acdbabab 100644 --- a/www/source/layouts/layout.slim +++ b/www/source/layouts/layout.slim @@ -36,51 +36,54 @@ html == javascript_include_tag "all" + javascript: - + //initiate sticky sidebar from jquery.sticky.js - + $('#sidebar').stick_in_parent(); - + javascript: - + //Parallax Text - + if (window.innerWidth > 760) { //don't parallax on tablet/mobile $(window).enllax(); //initiate parallax on larger screens } - + javascript: - + //Animate HR on scroll + + $(window).scroll(function() { - $(window).scroll(function() { var scroll = $(window).scrollTop(); var objectSelect = $('#icon-trigger'); //parent that triggers scroll var objectPosition = objectSelect.offset().top; if (scroll > objectPosition) { $('hr.first').addClass('stretch') //add class animate class to HR - } + + } }); - + javascript: - + //Animating progress bar for header - + $(document).ready(function(){ - + var getMax = function(){ return $(document).height() - $(window).height(); } - + var getValue = function(){ return $(window).scrollTop(); } - + if('max' in document.createElement('progress')){ // Browser supports progress element var progressBar = $('progress'); - + // Set the Max attr for the first time progressBar.attr({ max: getMax() }); @@ -88,29 +91,29 @@ html // On scroll only Value attr needs to be calculated progressBar.attr({ value: getValue() }); }); - + $(window).resize(function(){ // On resize, both Max/Value attr needs to be calculated progressBar.attr({ max: getMax(), value: getValue() }); - }); + }); } else { - var progressBar = $('.progress-bar'), - max = getMax(), + var progressBar = $('.progress-bar'), + max = getMax(), value, width; - + var getWidth = function(){ // Calculate width in percentage - value = getValue(); + value = getValue(); width = (value/max) * 100; width = width + '%'; return width; } - + var setWidth = function(){ progressBar.css({ width: getWidth() }); } - + $(document).on('scroll', setWidth); $(window).on('resize', function(){ // Need to reset the Max attr @@ -119,9 +122,10 @@ html }); } }); - - + + javascript: + $(document).foundation(); $('.try-demo').click(function(event){ @@ -133,7 +137,7 @@ html $('.inspec-tutorial').hide() }) }); - + javascript: !function(){var analytics=window.analytics=window.analytics||[];if(!analytics.initialize)if(analytics.invoked)window.console&&console.error&&console.error("Segment snippet included twice.");else{analytics.invoked=!0;analytics.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","page","once","off","on"];analytics.factory=function(t){return function(){var e=Array.prototype.slice.call(arguments);e.unshift(t);analytics.push(e);return analytics}};for(var t=0;t