diff --git a/source/_static/js/instantSearch.js b/source/_static/js/instantSearch.js index 3199a496..6421fa61 100644 --- a/source/_static/js/instantSearch.js +++ b/source/_static/js/instantSearch.js @@ -3,11 +3,6 @@ window.addEventListener("DOMContentLoaded", () => { const searchModalEl = document.getElementById("search"); const root = document.documentElement; - // Get the current doc platform - const activePlatform = document - .getElementsByTagName("meta") - ["docsearch:platform"].getAttribute("content"); - // Set search page title // TODO: Do the right way const pageName = document @@ -103,8 +98,8 @@ window.addEventListener("DOMContentLoaded", () => { initialUiState: { minio: { refinementList: { - platform: [activePlatform], - site: "docs" + site: "docs", + edition: "community", }, }, }, @@ -128,17 +123,6 @@ window.addEventListener("DOMContentLoaded", () => { if (query !== "") { // Make search modal active searchModalEl.classList.add("search--focused"); - - // Clear the filters and select the active platform - setTimeout(() => { - const activeFilterEl = document.querySelector( - ".search__filters__checkbox[value='" + activePlatform + "']" - ); - - if (activeFilterEl && !activeFilterEl.checked) { - activeFilterEl.click(); - } - }, 50); } else { // Clear the filters clearRefinements(); @@ -201,7 +185,6 @@ window.addEventListener("DOMContentLoaded", () => {
${data._highlightResult.hierarchy.lvl1.value}
-
${data.platform}
`; } @@ -219,7 +202,6 @@ window.addEventListener("DOMContentLoaded", () => {
${data._highlightResult.hierarchy.lvl2.value}
-
${data.platform}
${data.hierarchy.lvl1}
@@ -239,7 +221,6 @@ window.addEventListener("DOMContentLoaded", () => {
${data._highlightResult.hierarchy.lvl3.value}
-
${data.platform}
${data.hierarchy.lvl1}
@@ -262,7 +243,6 @@ window.addEventListener("DOMContentLoaded", () => { data._snippetResult.content.value }
-
${data.platform}
${data.hierarchy.lvl1} ${ data.hierarchy.lvl2 @@ -374,24 +354,9 @@ window.addEventListener("DOMContentLoaded", () => { if (e.key === "Enter") { const searchInputEl = document.querySelector(".search__input"); if (searchInputEl.value && document.activeElement === searchInputEl) { - var platform = ""; var environment = location.hostname === "localhost" || location.hostname === "127.0.0.1" ? "dev" : "prod"; - if (activePlatform === "k8s") { - platform = "kubernetes/upstream"; - } else if (activePlatform === "openshift") { - platform = "kubernetes/openshift"; - } else if (activePlatform === "eks") { - platform = "kubernetes/eks"; - } else if (activePlatform === "gke") { - platform = "kubernetes/gke"; - } else if (activePlatform === "aks") { - platform = "kubernetes/aks"; - } else { - platform = activePlatform; - } - - var pathname = environment === "dev" ? "/search.html" : `/docs/minio/${platform}/search.html`; + var pathname = environment === "dev" ? "/search.html" : `/docs/minio/search.html`; setTimeout(() => { window.location.pathname = pathname; diff --git a/source/_static/scss/includes/_search.scss b/source/_static/scss/includes/_search.scss index 277a0e81..07ef9d19 100644 --- a/source/_static/scss/includes/_search.scss +++ b/source/_static/scss/includes/_search.scss @@ -98,6 +98,10 @@ &::placeholder { color: var(--text-muted-color); } + + &:focus { + border-color: darken($neutral-subtle, 5%); + } } .search__reset { @@ -276,17 +280,10 @@ vertical-align: middle; color: var(--text-muted-color); font-size: 0.65rem; - /* display: flex; - align-items: center; */ line-height: 1; - //margin-top: 0.35rem; min-height: 1rem; padding-bottom: 0.1rem; - .search__hits__platform { - margin-top: 0.2rem; - } - & > svg { height: 0.8rem; width: 0.8rem; @@ -310,19 +307,6 @@ place-content: center; } -.search__hits__platform { - font-size: 0.65rem; - color: var(--text-muted-color); - line-height: 1; - border: 1px solid var(--is-hit-platform-border-color); - border-radius: $border-radius; - padding: 0.1rem 0.2rem; - width: fit-content; - margin: 0.4rem 0.35rem 0 0; - display: inline-block; -} - - .search__hits--empty { margin: 0; padding: 0; @@ -454,14 +438,6 @@ margin-top: 1rem; } - .search__form { - border: 1px solid var(--is-search-border-color); - - &:focus-within { - box-shadow: 0 0 0 3px var(--is-search-focus-box-shadow); - } - } - #search-powered-by { position: absolute; top: -2.25rem; @@ -477,30 +453,6 @@ &:not(.ais-Hits--empty) { position: relative; - - &:before { - content: "Search Results"; - padding-left: 0.75rem; - font-size: $font-size-sm; - font-weight: $font-weight-medium; - display: inline-block; - background-color: var(--body-bg); - position: relative; - padding-right: 0.5rem; - z-index: 2; - padding-bottom: 0.5rem; - } - - &:after { - content: ""; - height: 1px; - position: absolute; - top: 1rem; - left: 0; - width: 100%; - z-index: 1; - background-color: var(--theme-light-bg); - } } } diff --git a/source/_templates/head.html b/source/_templates/head.html index 754aefe9..4fa6001b 100644 --- a/source/_templates/head.html +++ b/source/_templates/head.html @@ -1,5 +1,6 @@ +