diff --git a/_vendor/github.com/chef/chef-docs-theme/assets/js/swiftype-config.js b/_vendor/github.com/chef/chef-docs-theme/assets/js/swiftype-config.js index c8da65fe3d..0342ae185d 100644 --- a/_vendor/github.com/chef/chef-docs-theme/assets/js/swiftype-config.js +++ b/_vendor/github.com/chef/chef-docs-theme/assets/js/swiftype-config.js @@ -10,13 +10,20 @@ $(document).ready(function() { // Retrieve list of default search product keys from search page HTML and parse into JSON array - var defaultSearchProducts = $('#swiftype-search').data('default-search-keys'); + let defaultSearchProducts = $('#swiftype-search').data('default-search-keys'); - if (defaultSearchProducts) { - var defaultSearchProducts = JSON.stringify(defaultSearchProducts); - var defaultSearchProducts = JSON.parse(defaultSearchProducts); + function returnParsedJson(jsonString) { + if (jsonString) { + let stringifiedJSON = JSON.stringify(jsonString); + let parsedJSON = JSON.parse(stringifiedJSON); + return parsedJSON; + } else { + return null; + } } + let parsedDefaultSearchProducts = returnParsedJson(defaultSearchProducts); + /////////////////////////////////// // // Search Modal functions @@ -84,7 +91,7 @@ $(document).ready(function() { $("input#swiftype-search-top-container-form-input-search").on('click', function (event) { console.log('search') - var searchString = $('input#swiftype-search-top-container-form-input').val(); + const searchString = $('input#swiftype-search-top-container-form-input').val(); window.location.href = "/search/#stq=" + encodeURIComponent(searchString) + '&stp=1'; }); @@ -179,7 +186,7 @@ $(document).ready(function() { }; // Define default products used in search - searchConfig.facets['chef-products'] = defaultSearchProducts; + searchConfig.facets['chef-products'] = parsedDefaultSearchProducts; var resultTemplate = Hogan.compile([ "
  • ", @@ -213,9 +220,9 @@ $(document).ready(function() { // Get all Chef products selected in product checkbox field // If no checkboxes are selected, return the default list of products - var getChefProducts = function(){ + const getChefProducts = function(){ if ($('#swiftype-product-filters :checkbox:checked').length === 0) { - searchConfig.facets['chef-products'] = defaultSearchProducts; + searchConfig.facets['chef-products'] = parsedDefaultSearchProducts; console.log('none checked', $(this)); } else { searchConfig.facets['chef-products'] = $("#swiftype-custom-facets input:checkbox[name='chef-product']:checked, select.search-facet-versions:visible option:selected").map(function() { diff --git a/_vendor/github.com/chef/chef-docs-theme/assets/sass/partials/_sidebar.scss b/_vendor/github.com/chef/chef-docs-theme/assets/sass/partials/_sidebar.scss index 923b78ec30..aa5f74b0ac 100644 --- a/_vendor/github.com/chef/chef-docs-theme/assets/sass/partials/_sidebar.scss +++ b/_vendor/github.com/chef/chef-docs-theme/assets/sass/partials/_sidebar.scss @@ -34,7 +34,7 @@ z-index: 25; overflow-y: scroll; overflow-x: hidden; - // margin: 0 10px; + &.offCanvas{ width: inherit; } @@ -43,7 +43,6 @@ margin-bottom: 30px; > .accordion-menu { - // font-size: 1rem; > li { > a { diff --git a/_vendor/github.com/chef/chef-docs-theme/assets/sass/partials/_swiftype_search.scss b/_vendor/github.com/chef/chef-docs-theme/assets/sass/partials/_swiftype_search.scss index 037f6fde10..88b9616227 100644 --- a/_vendor/github.com/chef/chef-docs-theme/assets/sass/partials/_swiftype_search.scss +++ b/_vendor/github.com/chef/chef-docs-theme/assets/sass/partials/_swiftype_search.scss @@ -154,7 +154,6 @@ padding-right: 10px; width: 100%; flex: 1 1 auto; - // margin-left: 0; margin: 0; li { @@ -184,7 +183,6 @@ } } &.st-result-highlight-product{ - // color:red; display: none; } } @@ -289,10 +287,6 @@ form > input.swiftype-search { width: 80%; } - &-input { - - } - &-autocomplete { margin: 5px 0; display: inline-block; diff --git a/_vendor/modules.txt b/_vendor/modules.txt index 3d9bb07fc5..17d4374487 100644 --- a/_vendor/modules.txt +++ b/_vendor/modules.txt @@ -14,7 +14,7 @@ # github.com/chef/compliance-profiles/docs-chef-io v0.0.0-20241024083927-f5e6fa3425ae # github.com/chef/compliance-remediation-2022/docs-chef-io v0.0.0-20240313054833-ebbc45209efa # github.com/chef/license-service/docs-chef-io v0.0.0-20231117105514-d3f3d53ba2dd -# github.com/chef/chef-docs-theme v0.0.0-20241031214229-5b4650244dc6 +# github.com/chef/chef-docs-theme v0.0.0-20241105194622-6f1c72e4b261 # github.com/FortAwesome/Font-Awesome v0.0.0-20240108205627-a1232e345536 # github.com/cowboy/jquery-hashchange v0.0.0-20100902193700-0310f3847f90 # github.com/twitter/hogan.js v3.0.2+incompatible diff --git a/go.mod b/go.mod index 1fbfc0134c..57ed10ffc2 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.22 require ( github.com/chef/automate/components/docs-chef-io v0.0.0-20240926130942-4b98d9cf92f6 // indirect - github.com/chef/chef-docs-theme v0.0.0-20241031214229-5b4650244dc6 // indirect + github.com/chef/chef-docs-theme v0.0.0-20241105194622-6f1c72e4b261 // indirect github.com/chef/chef-server/docs-chef-io v0.0.0-20240920053744-03b58ff14f46 // indirect github.com/chef/chef-workstation/docs-chef-io v0.0.0-20240809064339-878cb76b2b66 // indirect github.com/chef/compliance-profiles/docs-chef-io v0.0.0-20241024083927-f5e6fa3425ae // indirect diff --git a/go.sum b/go.sum index aacb8795ff..d5a4d7ba59 100644 --- a/go.sum +++ b/go.sum @@ -2,6 +2,8 @@ github.com/chef/automate/components/docs-chef-io v0.0.0-20240926130942-4b98d9cf9 github.com/chef/automate/components/docs-chef-io v0.0.0-20240926130942-4b98d9cf92f6/go.mod h1:juvLC7Rt33YOCgJ5nnfl4rWZRAbSwqjTbWmcAoA0LtU= github.com/chef/chef-docs-theme v0.0.0-20241031214229-5b4650244dc6 h1:yD8dEXVzfVrMwVOMJ1xWLAkOM6ktKI1VF54xF7y8vmo= github.com/chef/chef-docs-theme v0.0.0-20241031214229-5b4650244dc6/go.mod h1:+Jpnv+LXE6dXu2xDcMzMc0RxRGuCPAoFxq5tJ/X6QpQ= +github.com/chef/chef-docs-theme v0.0.0-20241105194622-6f1c72e4b261 h1:eb/iH1PzF+N231g2yZLMdbaELJBaNu//ner27h525hE= +github.com/chef/chef-docs-theme v0.0.0-20241105194622-6f1c72e4b261/go.mod h1:+Jpnv+LXE6dXu2xDcMzMc0RxRGuCPAoFxq5tJ/X6QpQ= github.com/chef/chef-server/docs-chef-io v0.0.0-20240920053744-03b58ff14f46 h1:KKSufg3MDKPPzXN2Nv6vUGhx8LIYmYMo9ByQMFbj8Rk= github.com/chef/chef-server/docs-chef-io v0.0.0-20240920053744-03b58ff14f46/go.mod h1:gMSa25GUHmLimA0gjvRd3hs1buOBqkKPrdHzHvaJauY= github.com/chef/chef-workstation/docs-chef-io v0.0.0-20240809064339-878cb76b2b66 h1:mGSa2uVyyi8bHyluwmmd83UReZR9gqF/roi5v7lnv0s=