This is an automated email from the ASF dual-hosted git repository. zregvart pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel-website.git
The following commit(s) were added to refs/heads/master by this push: new 2311a8a fix issues with search results 2311a8a is described below commit 2311a8a4297d847471675d73eddf9548ae4223f2 Author: aashnajena <jenaaas...@gmail.com> AuthorDate: Wed Apr 8 19:28:44 2020 +0530 fix issues with search results --- antora-ui-camel/src/css/header.css | 5 +++++ antora-ui-camel/src/js/vendor/algoliasearch.bundle.js | 9 +++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/antora-ui-camel/src/css/header.css b/antora-ui-camel/src/css/header.css index 5fd4cc3..6a1aeb1 100644 --- a/antora-ui-camel/src/css/header.css +++ b/antora-ui-camel/src/css/header.css @@ -466,6 +466,11 @@ body { padding-top: 0.3rem; } +.no_search_results { + padding: 0.5rem 1rem; + font-weight: bold; +} + .algolia-docsearch-suggestion--highlight { font-weight: bold; color: var(--color-jet-50); diff --git a/antora-ui-camel/src/js/vendor/algoliasearch.bundle.js b/antora-ui-camel/src/js/vendor/algoliasearch.bundle.js index 1d41894..743092d 100644 --- a/antora-ui-camel/src/js/vendor/algoliasearch.bundle.js +++ b/antora-ui-camel/src/js/vendor/algoliasearch.bundle.js @@ -46,7 +46,12 @@ const data = hits.reduce((data, hit) => { const d = {} d.url = hit.url - d.breadcrumbs = Object.values(hit.hierarchy).slice(1).filter((lvl) => lvl !== null).join(' » ') + var breadcrumbs = Object.values(hit.hierarchy).slice(1).filter((lvl) => lvl !== null).join(' » ') + if (breadcrumbs !== '') { + d.breadcrumbs = breadcrumbs + } else { + d.breadcrumbs = hit.hierarchy.lvl0 + } if (hit._snippetResult !== undefined) { d.snippet = hit._snippetResult.content.value } else { @@ -65,7 +70,7 @@ .then((data) => { if (Object.entries(data).length === 0 && data.constructor === Object) { return ` - <header>Nothing Found</header> + <header class="no_search_results">Nothing Found</header> ` } else { return `