Skip to content

Commit ed09332

Browse files
committed
Merge remote-tracking branch 'origin/development' into master, v1.2.0
2 parents 2861263 + 156427c commit ed09332

File tree

4 files changed

+51
-3
lines changed

4 files changed

+51
-3
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ You can simply create an HTML file and change the `document` and `apiVersion` (s
4040
// Categorize the processes in the menu if set to true, otherwise show a plain list
4141
// categorize: true,
4242
// Show/Hide table of contents, links and search box
43-
// showTableOfContents: true
43+
// showTableOfContents: true,
44+
// A message that is shown to users
45+
// notice: ''
4446
}
4547
})
4648
});

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@openeo/processes-docgen",
3-
"version": "1.1.3",
3+
"version": "1.2.0",
44
"author": "openEO Consortium",
55
"contributors": [
66
{

src/DocGen.vue

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@
3939
</section>
4040
</aside>
4141
<main class="content-container" :class="{toc: showTableOfContents}">
42+
<div class="notice" v-if="!hideNotice && notice">
43+
<Description :description="notice" />
44+
<button type="button" class="close" title="Close" @click="hideNotice = true">×</button>
45+
</div>
4246
<Process v-for="process in processes" :key="process.id" :process="process" :provideDownload="provideDownload" :sort="false" processUrl="#${}" />
4347
</main>
4448
</div>
@@ -49,6 +53,7 @@
4953
import axios from 'axios';
5054
import Utils from '@openeo/vue-components/utils';
5155
import BaseConfig from './config.js';
56+
import Description from '@openeo/vue-components/components/Description.vue';
5257
import LinkList from '@openeo/vue-components/components/LinkList.vue';
5358
import Process from '@openeo/vue-components/components/Process.vue';
5459
import Processes from '@openeo/vue-components/components/Processes.vue';
@@ -59,6 +64,7 @@ import { MigrateProcesses } from '@openeo/js-commons';
5964
export default {
6065
name: 'DocGen',
6166
components: {
67+
Description,
6268
LinkList,
6369
Process,
6470
Processes,
@@ -97,10 +103,15 @@ export default {
97103
uncategorizedName: {
98104
type: String,
99105
default: BaseConfig.uncategorizedName,
106+
},
107+
notice: {
108+
type: String,
109+
default: BaseConfig.notice
100110
}
101111
},
102112
data() {
103113
return {
114+
hideNotice: false,
104115
searchTerm: '',
105116
allCollapsedState: true,
106117
hasResults: true,
@@ -317,6 +328,39 @@ export default {
317328
color: black;
318329
}
319330
331+
.docgen .notice {
332+
margin: 0rem 3rem 1rem 2rem;
333+
padding: 1rem 3.5rem 1rem 1rem;
334+
border: 1px solid transparent;
335+
border-radius: .25rem;
336+
position: fixed;
337+
bottom: 0;
338+
color: #856404;
339+
background-color: #fff3cd;
340+
border-color: #856404;
341+
}
342+
.docgen .notice p:last-of-type {
343+
margin-bottom: 0;
344+
}
345+
.docgen .notice .close {
346+
position: absolute;
347+
top: 0;
348+
right: 0;
349+
font-size: 1.5em;
350+
padding: 0.5rem;
351+
margin: 0.5rem;
352+
font-weight: 700;
353+
line-height: 1;
354+
opacity: .5;
355+
background-color: transparent;
356+
border: 0;
357+
color: inherit;
358+
cursor: pointer;
359+
}
360+
.docgen .notice .close:hover {
361+
opacity: 1;
362+
outline: 0;
363+
}
320364
321365
.docgen .categories h2 {
322366
display: block;

src/config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ export default {
1717
// Whether 'Download JSON' buttons are displayed or not
1818
provideDownload: true,
1919
// Show/Hide table of contents, links and search box
20-
showTableOfContents: true
20+
showTableOfContents: true,
21+
// A message that is shown to users
22+
notice: ''
2123

2224
};

0 commit comments

Comments
 (0)