diff --git a/docs/_static/css/coveo_custom.css b/docs/_static/css/coveo_custom.css new file mode 100644 index 00000000000..8eec37c1653 --- /dev/null +++ b/docs/_static/css/coveo_custom.css @@ -0,0 +1,45 @@ +:root { + --atomic-primary: rgb(var(--ost-color-navbar-background)); + --atomic-primary-light: rgb(var(--ost-color-sst-dropdown-background-active)); + --atomic-border-radius-md: 0.1rem; + --atomic-border-radius-lg: 0.2rem; + --atomic-border-radius-xl: 0.3rem; +} + +::part(result-list-grid-clickable-container) { + border: 1px solid lightgray; + border-radius: var(--atomic-border-radius-md); +} + +.view-selector-container { + grid-area: atomic-section-facets; + display: flex; + align-items: center; + column-gap: 0.5rem; +} + +.view-selector-container .view-selector, +.view-selector-container .view-selector:hover, +.view-selector-container .view-selector:active, +.view-selector-container .view-selector:focus { + border: none; + background-color: none; + background: none; + outline: none; + padding: 4px 12px; + font-size: 14px; + display: flex; + grid-gap: 8px; + align-items: center; + justify-content: center; +} + +.view-selector-container .view-selector i { + margin: 0; +} + +.view-selector-container .view-selector.selected { + border-bottom: 2px solid rgb(var(--ost-color-navbar-background)); + font-weight: 700; + color: rgb(var(--ost-color-navbar-background)); +} diff --git a/docs/_static/js/custom.js b/docs/_static/js/custom.js index 51f9eb605c5..a208c2c7362 100644 --- a/docs/_static/js/custom.js +++ b/docs/_static/js/custom.js @@ -281,3 +281,58 @@ function initSplide() { }); splide.mount(); } + +// ---------- COVEO SEARCH ----------- +function selectResultViewType(type, gridButton, listButton) { + type === "grid" ? gridButton.click() : listButton.click(); +} + +function addViewTypeListeners() { + const resultViewTypeFromLs = window.localStorage.getItem('atomicResultViewType'); + let list = document.getElementById("atomic-result-list"); + var viewSelectorGrid = document.getElementById("view-selector-grid"); + viewSelectorGrid.addEventListener('click', function () { + list.display = "grid"; + window.localStorage.setItem('atomicResultViewType', "grid"); + viewSelectorGrid.classList.add('selected'); + viewSelectorList.classList.remove('selected'); + selectResultViewType("grid", viewSelectorGrid, viewSelectorList); + }); + var viewSelectorList = document.getElementById("view-selector-list"); + viewSelectorList.addEventListener('click', function () { + list.display = "list"; + window.localStorage.setItem('atomicResultViewType', "list"); + viewSelectorList.classList.add('selected'); + viewSelectorGrid.classList.remove('selected'); + selectResultViewType("list", viewSelectorGrid, viewSelectorList); + }); + selectResultViewType(resultViewTypeFromLs || "grid", viewSelectorGrid, viewSelectorList); +} + +document.addEventListener('DOMContentLoaded', function () { + (async () => { + await customElements.whenDefined("atomic-search-interface"); + const searchInterfaceSa = document.querySelector("#sa-search"); + const searchInterface = document.querySelector("#search"); + if (searchInterfaceSa) { + let ver = getCurrentVersion(); + if (ver) { + searchInterfaceSa.innerHTML = searchInterfaceSa.innerHTML.replace('search.html', 'search.html#f-ovversion=' + ver); + } + await searchInterfaceSa.initialize({ + accessToken: "xx1f2aebd3-4307-4632-aeea-17c13378b237", + organizationId: "intelcorporationnonproduction2ybdyblf7", + }); + searchInterfaceSa.executeFirstSearch(); + } + if (searchInterface) { + await searchInterface.initialize({ + accessToken: "xx1f2aebd3-4307-4632-aeea-17c13378b237", + organizationId: "intelcorporationnonproduction2ybdyblf7", + }); + searchInterface.executeFirstSearch(); + } + addViewTypeListeners(); + })(); +}) +// ----------------------------------- diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html index 6793f261ca5..e85f73556dd 100644 --- a/docs/_templates/layout.html +++ b/docs/_templates/layout.html @@ -5,8 +5,12 @@ + + + + @@ -28,4 +32,3 @@ {% endblock %} - diff --git a/docs/_templates/search-field.html b/docs/_templates/search-field.html index 4ed6c3803df..f4e9d142cb4 100644 --- a/docs/_templates/search-field.html +++ b/docs/_templates/search-field.html @@ -1,4 +1,6 @@ - +
+ + + + +
\ No newline at end of file diff --git a/docs/_templates/search.html b/docs/_templates/search.html index 7b9b218860e..9902e9fe71b 100644 --- a/docs/_templates/search.html +++ b/docs/_templates/search.html @@ -1,31 +1,143 @@ {%- extends "layout.html" %} {% set title = _('Search') %} -{%- block scripts %} + +{%- block content %} + {# Added to support a banner with an alert #} + + + {% block docs_navbar %} {{ super() }} - - - +
+

OpenVINO 2022.1 has introduced OpenVINO API 2.0. For more information on transition steps from the previous API, see the transition guide

+ +
+ + {% endblock %} + + {% block body %} + + + + + + + + + + + +
+ + +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ {% endblock %} + + {%- block scripts_end %} + {{ _webpack.body_post() }} + {%- endblock %} + {%- endblock %} -{% block body %} -

{{ _('Search') }}

-

- Search Results... -

-
- {% block scriptwarning %} -
- -
- {% endblock %} - {% block searchbox %} -
- - - -
- {% endblock %} - {% block searchresults %} -
-
- {% endblock %} -{% endblock %} diff --git a/docs/openvino_custom_sphinx_sitemap/openvino_custom_sphinx_sitemap.egg-info/PKG-INFO b/docs/openvino_custom_sphinx_sitemap/openvino_custom_sphinx_sitemap.egg-info/PKG-INFO index 32657500683..4d4fc538936 100644 --- a/docs/openvino_custom_sphinx_sitemap/openvino_custom_sphinx_sitemap.egg-info/PKG-INFO +++ b/docs/openvino_custom_sphinx_sitemap/openvino_custom_sphinx_sitemap.egg-info/PKG-INFO @@ -3,3 +3,5 @@ Name: openvino-custom-sphinx-sitemap Version: 0.0.1 Summary: Extends sphinx-sitemap plugin with additional sitemap metadata Requires-Python: >=3.9 +Requires-Dist: sphinx>=4.5.0 +Requires-Dist: sphinx-sitemap>=2.2.0 diff --git a/docs/openvino_sphinx_theme/openvino_sphinx_theme/templates/search-field.html b/docs/openvino_sphinx_theme/openvino_sphinx_theme/templates/search-field.html index 6d69674e970..f4e9d142cb4 100644 --- a/docs/openvino_sphinx_theme/openvino_sphinx_theme/templates/search-field.html +++ b/docs/openvino_sphinx_theme/openvino_sphinx_theme/templates/search-field.html @@ -1,16 +1,6 @@ -
-
-
- -
- -
-
\ No newline at end of file +
+ + + + +
\ No newline at end of file