From 660a16cb0afcaff893d1c4b058da11823a36853a Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Mon, 12 Apr 2021 18:42:03 +0200 Subject: [PATCH 1/2] Allow a "warning" to be displayed on top #13 --- README.md | 4 +++- src/DocGen.vue | 44 ++++++++++++++++++++++++++++++++++++++++++++ src/config.js | 4 +++- 3 files changed, 50 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 171f016..89801b3 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,9 @@ You can simply create an HTML file and change the `document` and `apiVersion` (s // Categorize the processes in the menu if set to true, otherwise show a plain list // categorize: true, // Show/Hide table of contents, links and search box - // showTableOfContents: true + // showTableOfContents: true, + // A message that is shown to users + // notice: '' } }) }); diff --git a/src/DocGen.vue b/src/DocGen.vue index f9b4663..b73439a 100644 --- a/src/DocGen.vue +++ b/src/DocGen.vue @@ -39,6 +39,10 @@
+
+ + +
@@ -49,6 +53,7 @@ import axios from 'axios'; import Utils from '@openeo/vue-components/utils'; import BaseConfig from './config.js'; +import Description from '@openeo/vue-components/components/Description.vue'; import LinkList from '@openeo/vue-components/components/LinkList.vue'; import Process from '@openeo/vue-components/components/Process.vue'; import Processes from '@openeo/vue-components/components/Processes.vue'; @@ -59,6 +64,7 @@ import { MigrateProcesses } from '@openeo/js-commons'; export default { name: 'DocGen', components: { + Description, LinkList, Process, Processes, @@ -97,10 +103,15 @@ export default { uncategorizedName: { type: String, default: BaseConfig.uncategorizedName, + }, + notice: { + type: String, + default: BaseConfig.notice } }, data() { return { + hideNotice: false, searchTerm: '', allCollapsedState: true, hasResults: true, @@ -317,6 +328,39 @@ export default { color: black; } +.docgen .notice { + margin: 0rem 3rem 1rem 2rem; + padding: 1rem 3.5rem 1rem 1rem; + border: 1px solid transparent; + border-radius: .25rem; + position: fixed; + bottom: 0; + color: #856404; + background-color: #fff3cd; + border-color: #856404; +} +.docgen .notice p:last-of-type { + margin-bottom: 0; +} +.docgen .notice .close { + position: absolute; + top: 0; + right: 0; + font-size: 1.5em; + padding: 0.5rem; + margin: 0.5rem; + font-weight: 700; + line-height: 1; + opacity: .5; + background-color: transparent; + border: 0; + color: inherit; + cursor: pointer; +} +.docgen .notice .close:hover { + opacity: 1; + outline: 0; +} .docgen .categories h2 { display: block; diff --git a/src/config.js b/src/config.js index 9559dbd..8c07609 100644 --- a/src/config.js +++ b/src/config.js @@ -17,6 +17,8 @@ export default { // Whether 'Download JSON' buttons are displayed or not provideDownload: true, // Show/Hide table of contents, links and search box - showTableOfContents: true + showTableOfContents: true, + // A message that is shown to users + notice: '' }; \ No newline at end of file From 156427c9780e3ad47b6b4c1afd0ab59890554a27 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Mon, 12 Apr 2021 18:45:16 +0200 Subject: [PATCH 2/2] v1.2.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e46bf44..242c8dd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@openeo/processes-docgen", - "version": "1.1.3", + "version": "1.2.0", "author": "openEO Consortium", "contributors": [ {