search
This commit is contained in:
1 parent
80f17010c0
commit
9419c15564
2 files changed
+65
-20
No files matched your search
@@ -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;
|
||||
}
|
||||
@@ -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 + '<div id="docs-main-title-div"><center><img src="Images/superalgos-logo.png" class="docs-image-logo-search" width=400></center>'
|
||||
HTML = HTML + '<center><div class="docs-font-normal docs-search-box"><input class="docs-search-input"></input></div></center>'
|
||||
HTML = HTML + '</div>'
|
||||
HTML = HTML + '<div id="docs-search-page-div">'
|
||||
HTML = HTML + '<center><img src="Images/superalgos-logo.png" class="docs-image-logo-search" width=400></center>'
|
||||
HTML = HTML + '<center><div class="docs-font-normal docs-search-box"><input class="docs-search-input" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"></input></div></center>'
|
||||
HTML = HTML + '</div>'
|
||||
let docsSpaceDiv = document.getElementById('docs-space-div')
|
||||
docsSpaceDiv.innerHTML = HTML + addFooter()
|
||||
detectEnterOnSearchBox()
|
||||
}
|
||||
|
||||
function renderSearchResultsPage() {
|
||||
let HTML = ''
|
||||
HTML = HTML + '<div id="docs-search-results-div">'
|
||||
HTML = HTML + '<p>'
|
||||
HTML = HTML + '<img src="Images/superalgos-logo.png" class="docs-image-logo-search-results" width=200>'
|
||||
HTML = HTML + '<div class="docs-font-normal docs-search-results-box">'
|
||||
HTML = HTML + '<input class="docs-search-input" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"></input>'
|
||||
HTML = HTML + '</p>'
|
||||
HTML = HTML + '</div>'
|
||||
HTML = HTML + '</div>'
|
||||
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) {
|
||||
|
||||
Reference in new issue
Block a user