Editing other paragraph styles

This commit is contained in:
Luis Fernando Molina committed 2020-12-10 12:25:34 +01:00
1 parent bf32d6aae6
commit 3f91936c57
6 files changed
+2732 -2397

No files matched your search

+98
View File
@@ -124,4 +124,102 @@
width: 100%;
height: 25%;
z-index:100;
}
.docs-alert-note {
color: #31708f;
background-color: #d9edf7;
border-color: #bce8f1;
padding: 15px;
border: 1px solid transparent;
border-radius: 4px;
margin: 20px 0;
width: 95%;
}
.docs-alert-success {
color: #3c763d;
background-color: #dff0d8;
border-color: #d6e9c6;
padding: 15px;
border: 1px solid transparent;
border-radius: 4px;
margin: 20px 0;
width: 95%;
}
.docs-alert-important {
color: #8a6d3b;
background-color: #fcf8e3;
border-color: #faebcc;
padding: 15px;
border: 1px solid transparent;
border-radius: 4px;
margin: 20px 0;
width: 95%;
}
.docs-alert-warning {
color: #a94442;
background-color: #f2dede;
border-color: #ebccd1;
padding: 15px;
border: 1px solid transparent;
border-radius: 4px;
margin: 20px 0;
width: 95%;
}
.docs-callout {
padding: 20px;
margin: 20px 0;
border: 1px solid #eee;
border-left-width: 5px;
border-radius: 3px;
border-left-color: #bcd643;
font-weight: 500;
width: 100%;
}
.docs-note-circle:before {
content:"\f05a"
}
.docs-check-square-o:before {
content:"\f046"
}
.docs-exclamation-circle:before {
content:"\f06a"
}
.docs-warning-sign:before,.fa-exclamation-triangle:before {
content:"\f06a"
}
.docs-fa {
font:normal normal normal 14px/1 FontAwesome;
font-size:inherit;
text-rendering:auto;
-webkit-font-smoothing:antialiased;
-moz-osx-font-smoothing:grayscale
}
.docs-font-small {
font:normal normal normal 14px/1 "segoeui";
font-size:inherit;
text-rendering:auto;
-webkit-font-smoothing:antialiased;
-moz-osx-font-smoothing:grayscale;
line-height: 150%
}
li > .docs-font-small {
margin-bottom:7px;
}
div.docs-font-small {
margin-bottom:7px;
}
+6 -4
View File
@@ -109,10 +109,12 @@
<ul id="menu">
<li class="menu-item" onClick="window.contextMenu.editParagraph()">Edit Paragraph</li>
<li class="menu-item" onClick="window.contextMenu.addParagraph()">Add Paragraph</li>
<li class="menu-item" onClick="window.contextMenu.code()">Code</li>
<li class="menu-item" onClick="window.contextMenu.note()">Note</li>
<li class="menu-item" onClick="window.contextMenu.warning()">Warning</li>
<li class="menu-item" onClick="window.contextMenu.important()">Important</li>
<li class="menu-item" onClick="window.contextMenu.code()">Turn into JS Code</li>
<li class="menu-item" onClick="window.contextMenu.code()">Turn into JSON Code</li>
<li class="menu-item" onClick="window.contextMenu.note()">Turn into Note</li>
<li class="menu-item" onClick="window.contextMenu.warning()">Turn into Warning</li>
<li class="menu-item" onClick="window.contextMenu.important()">Turn into Important</li>
<li class="menu-item" onClick="window.contextMenu.important()">Turn into Success</li>
</ul>
</body>
+3 -2
View File
@@ -126,11 +126,12 @@ try {
console.log('Http Interface ..................... Listening at port ' + global.env.HTTP_INTERFACE_PORT)
console.log('')
console.log("You are running Superalgos Beta 7 SP 1")
console.log("You are running Superalgos Beta 8")
console.log('')
console.log("What's new? The following was implemented here:")
console.log('')
console.log('Multi-Project Infrastructure ....... This allow us to integrate crypto projects into Superalgos. Note that with this upgrade you will need to download and calculate market data again.')
console.log('Task Server Upgraded ............... This allow us to integrate crypto projects into the Task Server, opening the door to new types of bots defined at other projects.')
console.log('In-App Documentation Improved ...... This allow users to improve the docs and also to document other integrated projects.')
console.log('')
console.log("What's next? At the development pipeline we have:")
console.log('')
File diff suppressed because it is too large. Load diff
@@ -66,10 +66,24 @@ function newSuperalgosDocSpace() {
function showHTMLTextArea() {
if (selectedParagraph === undefined) { return }
let extraClassName = ''
if (selectedParagraph.id.indexOf('note') >= 0) {
extraClassName = ' ' + 'docs-alert-note'
}
if (selectedParagraph.id.indexOf('success') >= 0) {
extraClassName = ' ' + 'docs-alert-success'
}
if (selectedParagraph.id.indexOf('important') >= 0) {
extraClassName = ' ' + 'docs-alert-important'
}
if (selectedParagraph.id.indexOf('warning') >= 0) {
extraClassName = ' ' + 'docs-alert-warning'
}
textArea = document.createElement('textarea');
textArea.id = "textArea";
textArea.spellcheck = false;
textArea.className = "docs-text-area"
textArea.className = "docs-text-area"+ extraClassName
textArea.style.height = selectedParagraphHeight
textArea.value = selectedParagraphData
selectedParagraph.innerHTML = ""
@@ -221,12 +235,33 @@ function newSuperalgosDocSpace() {
if (paragraphNode.id === undefined || paragraphNode.id.indexOf('paragraph') < 0) {
paragraphNode = paragraphNode.parentNode
}
if (paragraphNode.id === undefined || paragraphNode.id.indexOf('paragraph') < 0) {
return false
}
selectedParagraphData = paragraphNode.innerText
/*
Depending on the Style of Paragraph we will need to remove
some info from the innerText.
*/
if (paragraphNode.id.indexOf('definition') >= 0) {
selectedParagraphData = paragraphNode.innerText
}
if (paragraphNode.id.indexOf('text') >= 0) {
selectedParagraphData = paragraphNode.innerText
}
if (paragraphNode.id.indexOf('note') >= 0) {
selectedParagraphData = paragraphNode.innerText.substring(6, paragraphNode.innerText.length)
}
if (paragraphNode.id.indexOf('success') >= 0) {
selectedParagraphData = paragraphNode.innerText.substring(5, paragraphNode.innerText.length)
}
if (paragraphNode.id.indexOf('important') >= 0) {
selectedParagraphData = paragraphNode.innerText.substring(11, paragraphNode.innerText.length)
}
if (paragraphNode.id.indexOf('warning') >= 0) {
selectedParagraphData = paragraphNode.innerText.substring(10, paragraphNode.innerText.length)
}
selectedParagraph = paragraphNode
selectedParagraphHeight = paragraphNode.getClientRects()[0].height
return true
@@ -292,8 +327,51 @@ function newSuperalgosDocSpace() {
if (nodeDocsDefinition.content !== undefined) {
for (let i = 0; i < nodeDocsDefinition.content.length; i++) {
let paragraph = nodeDocsDefinition.content[i]
key = 'content-paragraph-' + i
HTML = HTML + '<p><div id="' + key + '">' + addToolTips(renderingNode, paragraph.text) + '</div></p>'
let innerHTML = addToolTips(renderingNode, paragraph.text)
let styleClass = ''
let prefix = ''
let role = ''
let key = 'content-paragraph-' + i
switch (paragraph.style) {
case 'Text': {
styleClass = ''
prefix = ''
role = ''
key = key + '-text'
break
}
case 'Note': {
styleClass = 'class="docs-font-small docs-alert-note"'
prefix = '<i class="docs-fa docs-note-circle"></i> <b>Note:</b>'
role = 'role="alert"'
key = key + '-note'
break
}
case 'Success': {
styleClass = 'class="docs-font-small docs-alert-success"'
prefix = '<i class="docs-fa docs-check-square-o"></i> <b>Tip:</b>'
role = 'role="alert"'
key = key + '-sucess'
break
}
case 'Important': {
styleClass = 'class="docs-font-small docs-alert-important"'
prefix = '<i class="docs-fa docs-warning-sign"></i> <b>Important:</b>'
role = 'role="alert"'
key = key + '-important'
break
}
case 'Warning': {
styleClass = 'class="docs-font-small docs-alert-warning"'
prefix = '<i class="docs-fa docs-warning-sign"></i> <b>Warning:</b>'
role = 'role="alert"'
key = key + '-warning'
break
}
}
HTML = HTML + '<p><div id="' + key + '" ' + styleClass + ' ' + role + '">' + prefix + ' ' + innerHTML + '</div></p>'
docSchemaParagraphMap.set(key, paragraph)
}
}
@@ -483,19 +561,19 @@ function newSuperalgosDocSpace() {
function cleanPhrase(phrase) {
return phrase.replace(',', '')
.replace(';', '')
.replace('(', '')
.replace(')', '')
.replace('-', '')
.replace('_', '')
.replace('.', '')
.replace('[', '')
.replace(']', '')
.replace('{', '')
.replace('}', '')
.replace('/', '')
.replace('>', '')
.replace('<', '')
.replace(';', '')
.replace('(', '')
.replace(')', '')
.replace('-', '')
.replace('_', '')
.replace('.', '')
.replace('[', '')
.replace(']', '')
.replace('{', '')
.replace('}', '')
.replace('/', '')
.replace('>', '')
.replace('<', '')
}
}
return taggedText
+1 -1
View File
@@ -11,7 +11,7 @@ if (
console.log('Superalgos')
console.log('')
console.log('VERSION: Beta 7 SP 1')
console.log('VERSION: Beta 8')
console.log('')
console.log('WEB: https://www.superalgos.org')
console.log('')