From d16c521b58ce42763c7f7b93ac7c8524e3048c85 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Mon, 4 Jan 2021 15:57:10 +0100 Subject: [PATCH] Book --- .../Docs-Topics/docs-basics-015-docs-books.json | 15 +++++++++++++++ ...=> docs-basics-016-docs-paragraph-styles.json} | 2 +- ...s-paragraph-styles-024-docs-chapter-style.json | 15 +++++++++++++++ .../UI/Spaces/Docs-Space/DocumentPage.js | 4 ++++ 4 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 Projects/Superalgos/Schemas/Docs-Topics/docs-basics-015-docs-books.json rename Projects/Superalgos/Schemas/Docs-Topics/{docs-basics-015-docs-paragraph-styles.json => docs-basics-016-docs-paragraph-styles.json} (95%) create mode 100644 Projects/Superalgos/Schemas/Docs-Topics/docs-paragraph-styles-024-docs-chapter-style.json diff --git a/Projects/Superalgos/Schemas/Docs-Topics/docs-basics-015-docs-books.json b/Projects/Superalgos/Schemas/Docs-Topics/docs-basics-015-docs-books.json new file mode 100644 index 000000000..faefe0fda --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/docs-basics-015-docs-books.json @@ -0,0 +1,15 @@ +{ + "topic": "Docs Basics", + "pageNumber": "15", + "type": "Docs Books", + "definition": { + "text": "A book is page in the Docs that contains chapters. Chapters points to a Docs Topics and are rendered as the index table of the topic they point to.", + "updated": 1609771773385 + }, + "paragraphs": [ + { + "style": "Text", + "text": "Left click and Edit to enter edit mode and change this text. ENTER to write new paragraphs. ESC to exit edit mode." + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Topics/docs-basics-015-docs-paragraph-styles.json b/Projects/Superalgos/Schemas/Docs-Topics/docs-basics-016-docs-paragraph-styles.json similarity index 95% rename from Projects/Superalgos/Schemas/Docs-Topics/docs-basics-015-docs-paragraph-styles.json rename to Projects/Superalgos/Schemas/Docs-Topics/docs-basics-016-docs-paragraph-styles.json index 9e41030ed..f7c9f1087 100644 --- a/Projects/Superalgos/Schemas/Docs-Topics/docs-basics-015-docs-paragraph-styles.json +++ b/Projects/Superalgos/Schemas/Docs-Topics/docs-basics-016-docs-paragraph-styles.json @@ -1,6 +1,6 @@ { "topic": "Docs Basics", - "pageNumber": "15", + "pageNumber": "16", "type": "Docs Paragraph Styles", "definition": { "text": "Each paragraph at a Docs Page, need to be assigend a style. The most commonly used style is the Docs Text Style.", diff --git a/Projects/Superalgos/Schemas/Docs-Topics/docs-paragraph-styles-024-docs-chapter-style.json b/Projects/Superalgos/Schemas/Docs-Topics/docs-paragraph-styles-024-docs-chapter-style.json new file mode 100644 index 000000000..c0b79711f --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/docs-paragraph-styles-024-docs-chapter-style.json @@ -0,0 +1,15 @@ +{ + "topic": "Docs Paragraph Styles", + "pageNumber": "24", + "type": "Docs Chapter Style", + "definition": { + "text": "This style is used in Docs Books to define a new chapeter for that book. The style renders in the book's page the index of the Docs Topics referenced.", + "updated": 1609771567815 + }, + "paragraphs": [ + { + "style": "Text", + "text": "Left click and Edit to enter edit mode and change this text. ENTER to write new paragraphs. ESC to exit edit mode." + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/UI/Spaces/Docs-Space/DocumentPage.js b/Projects/Superalgos/UI/Spaces/Docs-Space/DocumentPage.js index 42556247b..9d461bee4 100644 --- a/Projects/Superalgos/UI/Spaces/Docs-Space/DocumentPage.js +++ b/Projects/Superalgos/UI/Spaces/Docs-Space/DocumentPage.js @@ -429,6 +429,10 @@ function newSuperalgosDocsDocumentPage() { buildOrderedTopicPageIndex(chapterName) + if (orderedTopicPageIndexArray.length === 0) { + return 'Chapter paragraph style Syntax Error. The Topic ' + chapterName + ' could not be found. Check the Docs Chapter Style Syntax. This error message will dissapear as soon as you fix the problem.' + } + let key = 'auto-generated-paragraph-' + autoGeneratedParagraphIndex paragraph = { style: "Title",