diff --git a/Client/WebServer/css/docs.css b/Client/WebServer/css/docs.css index 7326a3c79..f548bbd41 100644 --- a/Client/WebServer/css/docs.css +++ b/Client/WebServer/css/docs.css @@ -369,11 +369,11 @@ z-index: 1; } .docs-collapsible-code-content { - padding: 0 18px; - display: none; - margin-left: 0px; - z-index: 1; - } +padding: 0 18px; +display: none; +margin-left: 0px; +z-index: 1; +} .docs-collapsible-element:after { content: '\02795'; /* Unicode character for "plus" sign (+) */ @@ -471,20 +471,37 @@ margin-bottom: 25px; } .docs-search-box { - width: 700px; - height: 60px; - margin-top: 50px; - margin-bottom: 600px; - border-radius: 30px; - border: 1px solid #dedede; +width: 700px; +height: 60px; +margin-top: 50px; +margin-bottom: 600px; +border-radius: 30px; +border: 1px solid #dedede; } .docs-search-input { - width: 600px; +width: 600px; +height: 60px; +font: 400 25px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; +color: #6b6b6b; +line-height: 200%; +border: none; +outline: none; +} + +/* Search Results Page */ +.docs-image-logo-search-results { +margin: auto; +margin-top: 25px; +margin-bottom: 25px; +margin-left: 25px; +} + +.docs-search-results-box { + width: 700px; height: 60px; - font: 400 25px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; - color: #6b6b6b; - line-height: 200%; - border: none; - outline: none; + margin-top: 50px; + margin-bottom: 100px; + border-radius: 30px; + border: 1px solid #dedede; } \ No newline at end of file diff --git a/Projects/Superalgos/UI/Spaces/Docs-Space/DocsSpace.js b/Projects/Superalgos/UI/Spaces/Docs-Space/DocsSpace.js index fa35fa7c6..1adfb579c 100644 --- a/Projects/Superalgos/UI/Spaces/Docs-Space/DocsSpace.js +++ b/Projects/Superalgos/UI/Spaces/Docs-Space/DocsSpace.js @@ -38,6 +38,7 @@ function newSuperalgosDocSpace() { let nodeAppDefinition let nodeDocsDefinition let menuLabelsMap = new Map() + let searchPhrase return thisObject @@ -514,11 +515,38 @@ function newSuperalgosDocSpace() { function renderSearchPage() { let HTML = '' - HTML = HTML + '
' - HTML = HTML + '
' - HTML = HTML + '
' + HTML = HTML + '
' + HTML = HTML + '
' + HTML = HTML + '
' + HTML = HTML + '
' let docsSpaceDiv = document.getElementById('docs-space-div') docsSpaceDiv.innerHTML = HTML + addFooter() + detectEnterOnSearchBox() + } + + function renderSearchResultsPage() { + let HTML = '' + HTML = HTML + '
' + HTML = HTML + '

' + HTML = HTML + '' + HTML = HTML + '

' + HTML = HTML + '' + HTML = HTML + '

' + HTML = HTML + '
' + HTML = HTML + '
' + let docsSpaceDiv = document.getElementById('docs-space-div') + docsSpaceDiv.innerHTML = HTML + addFooter() + detectEnterOnSearchBox() + } + + function detectEnterOnSearchBox() { + const element = document.getElementsByClassName("docs-search-input")[0] + element.addEventListener("keyup", function (event) { + if (event.key === "Enter" || event.keyCode === 13) { + let searchPhrase = element.value + renderSearchResultsPage() + } + }); } function scrollToElement(htmlElementId) {