@eox/pages-theme-esa 0.7.6 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +105 -0
- package/package.json +4 -1
- package/src/Layout.vue +19 -4
- package/src/components/BlogPost.vue +1 -0
- package/src/index.js +1 -0
- package/src/style.css +119 -4
package/README.md
CHANGED
|
@@ -17,3 +17,108 @@ export default {
|
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
See also the [Vitepress Docs](https://vitepress.dev/guide/custom-theme#consuming-a-custom-theme).
|
|
20
|
+
|
|
21
|
+
### Feedback Form
|
|
22
|
+
|
|
23
|
+
**Feedback Form** for collecting user feedback can be enabled by configuring the theme:
|
|
24
|
+
|
|
25
|
+
```javascript
|
|
26
|
+
// themeConfig
|
|
27
|
+
{
|
|
28
|
+
feedback: {
|
|
29
|
+
endpoint: "https://example.com/create-issue?repo=github.com/org/repo" // or repo can be passed in request body by being included in schema such as a hidden field with default value
|
|
30
|
+
schema: {
|
|
31
|
+
"type": "object",
|
|
32
|
+
"title": "Feedback contains URL of current page automatically. Let us know your feedback or issue type.",
|
|
33
|
+
"options": {
|
|
34
|
+
"remove_empty_properties": true,
|
|
35
|
+
"remove_additional_properties": true
|
|
36
|
+
},
|
|
37
|
+
"oneOf": [
|
|
38
|
+
{
|
|
39
|
+
"title": "Feature Request",
|
|
40
|
+
"properties": {
|
|
41
|
+
"type_feature": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"default": "feature",
|
|
44
|
+
"options": {
|
|
45
|
+
"hidden": true
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"title": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"title": "Title"
|
|
51
|
+
},
|
|
52
|
+
"Expected behavior": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"format": "textarea",
|
|
55
|
+
"minLength": 1,
|
|
56
|
+
"options": {
|
|
57
|
+
"inputAttributes": {
|
|
58
|
+
"placeholder": "Describe the new functionality and how it would help you."
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"Contact information or additional comments (optional)": {
|
|
63
|
+
"type": "string"
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"required": [
|
|
67
|
+
"type_feature"
|
|
68
|
+
],
|
|
69
|
+
"additionalProperties": false
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"title": "Issue or Question",
|
|
73
|
+
"properties": {
|
|
74
|
+
"type_catalog": {
|
|
75
|
+
"type": "string",
|
|
76
|
+
"default": "catalog",
|
|
77
|
+
"options": {
|
|
78
|
+
"hidden": true
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"title": {
|
|
82
|
+
"type": "string",
|
|
83
|
+
"title": "Title"
|
|
84
|
+
},
|
|
85
|
+
"Steps to reproduce": {
|
|
86
|
+
"type": "string",
|
|
87
|
+
"format": "textarea",
|
|
88
|
+
"minLength": 1,
|
|
89
|
+
"options": {
|
|
90
|
+
"inputAttributes": {
|
|
91
|
+
"placeholder": "Describe what you tried to do."
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"Expected content": {
|
|
96
|
+
"type": "string",
|
|
97
|
+
"format": "textarea",
|
|
98
|
+
"minLength": 1,
|
|
99
|
+
"options": {
|
|
100
|
+
"inputAttributes": {
|
|
101
|
+
"placeholder": "What would you like to see?"
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"required": [
|
|
107
|
+
"type_catalog"
|
|
108
|
+
],
|
|
109
|
+
"additionalProperties": false
|
|
110
|
+
},
|
|
111
|
+
]
|
|
112
|
+
}, // optional - feedback has a default single text field
|
|
113
|
+
position: "bottom-right", // can be any of bottom-left, top-left, bottom-right, top-right
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
feedback form can be disabled on individual pages via frontmatter configuration
|
|
119
|
+
|
|
120
|
+
```yaml
|
|
121
|
+
---
|
|
122
|
+
feedback: false
|
|
123
|
+
---
|
|
124
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eox/pages-theme-esa",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Vitepress Theme with ESA branding",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -11,5 +11,8 @@
|
|
|
11
11
|
},
|
|
12
12
|
"devDependencies": {
|
|
13
13
|
"@eox/eslint-config": "^2.0.0"
|
|
14
|
+
},
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"@eox/feedback": "^1.1.1"
|
|
14
17
|
}
|
|
15
18
|
}
|
package/src/Layout.vue
CHANGED
|
@@ -106,7 +106,7 @@ onMounted(async () => {
|
|
|
106
106
|
></esa-menu>
|
|
107
107
|
<esa-header></esa-header>
|
|
108
108
|
<esa-navbar
|
|
109
|
-
:brand-logo="theme.logo? withBase(theme.logo) : undefined"
|
|
109
|
+
:brand-logo="theme.logo ? withBase(theme.logo) : undefined"
|
|
110
110
|
:brand-title="site.title"
|
|
111
111
|
.menuItems="theme.nav.map((n) => ({ title: n.text, href: withBase(n.link) }))"
|
|
112
112
|
:enable-login="theme.login"
|
|
@@ -121,10 +121,18 @@ onMounted(async () => {
|
|
|
121
121
|
:background-image="frontmatter.hero.background"
|
|
122
122
|
:underline="frontmatter.hero.tagline"
|
|
123
123
|
:cta="frontmatter.hero.actions?.[0]"
|
|
124
|
-
:cta-link="
|
|
124
|
+
:cta-link="
|
|
125
|
+
frontmatter.hero.actions?.[0]?.link
|
|
126
|
+
? withBase(frontmatter.hero.actions?.[0]?.link)
|
|
127
|
+
: undefined
|
|
128
|
+
"
|
|
125
129
|
:cta-text="frontmatter.hero.actions?.[0]?.text"
|
|
126
130
|
:alt="frontmatter.hero.actions?.[1]"
|
|
127
|
-
:alt-link="
|
|
131
|
+
:alt-link="
|
|
132
|
+
frontmatter.hero.actions?.[1]?.link
|
|
133
|
+
? withBase(frontmatter.hero.actions?.[1]?.link)
|
|
134
|
+
: undefined
|
|
135
|
+
"
|
|
128
136
|
:alt-text="frontmatter.hero.actions?.[1]?.text"
|
|
129
137
|
:image="frontmatter.hero.image"
|
|
130
138
|
></esa-cover>
|
|
@@ -170,6 +178,13 @@ onMounted(async () => {
|
|
|
170
178
|
]
|
|
171
179
|
"
|
|
172
180
|
></esa-footer>
|
|
181
|
+
<ClientOnly v-if="theme.feedback && frontmatter?.feedback !== false">
|
|
182
|
+
<eox-feedback-button
|
|
183
|
+
:endpoint="theme.feedback?.endpoint"
|
|
184
|
+
.schema="theme.feedback?.schema"
|
|
185
|
+
:position="theme.feedback?.position"
|
|
186
|
+
/>
|
|
187
|
+
</ClientOnly>
|
|
173
188
|
<esa-cookies
|
|
174
189
|
link="https://www.esa.int/Services/Cookies_notice"
|
|
175
190
|
style="display: none"
|
|
@@ -177,7 +192,7 @@ onMounted(async () => {
|
|
|
177
192
|
</ClientOnly>
|
|
178
193
|
</template>
|
|
179
194
|
<template #not-found>
|
|
180
|
-
<section class="blue" style="margin-top: var(--vp-nav-height)
|
|
195
|
+
<section class="blue" style="margin-top: var(--vp-nav-height)">
|
|
181
196
|
<h1>404</h1>
|
|
182
197
|
<p>Page not found</p>
|
|
183
198
|
<a class="VPButton cta" :href="withBase('/')">Go to Home</a>
|
|
@@ -36,6 +36,7 @@ onMounted(async () => {
|
|
|
36
36
|
eox-storytelling {
|
|
37
37
|
--header-font-family: NotesESAbold, sans-serif;
|
|
38
38
|
--body-font-family: Arial, sans-serif;
|
|
39
|
+
--color: var(--vp-c-black, #101213);
|
|
39
40
|
margin: var(--vp-nav-height) 0 var(--vp-nav-height) 0;
|
|
40
41
|
background: white;
|
|
41
42
|
color: var(--vp-c-black);
|
package/src/index.js
CHANGED
|
@@ -13,6 +13,7 @@ export default {
|
|
|
13
13
|
app.component("BlogGallery", BlogGallery);
|
|
14
14
|
router.onBeforePageLoad = async (to) => {
|
|
15
15
|
if (!import.meta.env.SSR) {
|
|
16
|
+
import("@eox/feedback");
|
|
16
17
|
if (to.includes("/blog/") && to !== "/blog/" && to !== "/blog/README") {
|
|
17
18
|
// console.log(router.route.data)
|
|
18
19
|
router.route.data = {
|
package/src/style.css
CHANGED
|
@@ -57,15 +57,15 @@ h6,
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
a:not(.VPButton) {
|
|
60
|
-
border-bottom: 0.125rem solid #
|
|
60
|
+
border-bottom: 0.125rem solid #00ae9d;
|
|
61
61
|
padding-bottom: 0.15625rem;
|
|
62
|
-
transition: all .5s ease;
|
|
62
|
+
transition: all 0.5s ease;
|
|
63
63
|
text-decoration: none;
|
|
64
64
|
color: currentColor;
|
|
65
65
|
}
|
|
66
66
|
a:not(.VPButton):hover {
|
|
67
|
-
padding-bottom: .3125rem;
|
|
68
|
-
color: #
|
|
67
|
+
padding-bottom: 0.3125rem;
|
|
68
|
+
color: #00ae9d;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
body {
|
|
@@ -236,3 +236,118 @@ section > p {
|
|
|
236
236
|
.VPFooter {
|
|
237
237
|
display: none;
|
|
238
238
|
}
|
|
239
|
+
eox-feedback-button {
|
|
240
|
+
z-index: calc(var(--vp-z-index-footer) + 1);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
/*
|
|
244
|
+
* Lists
|
|
245
|
+
*/
|
|
246
|
+
section ul,
|
|
247
|
+
section ol,
|
|
248
|
+
.VPPage ul,
|
|
249
|
+
.VPPage ol {
|
|
250
|
+
padding-left: 1.25rem;
|
|
251
|
+
margin: 16px 0;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
section ul,
|
|
255
|
+
.VPPage ul {
|
|
256
|
+
list-style: disc;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
section ol,
|
|
260
|
+
.VPPage ol {
|
|
261
|
+
list-style: decimal;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
section ul ul,
|
|
265
|
+
.VPPage ul ul {
|
|
266
|
+
list-style: circle;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
section ul ul ul,
|
|
270
|
+
.VPPage ul ul ul {
|
|
271
|
+
list-style: square;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
section li + li,
|
|
275
|
+
.VPPage li + li {
|
|
276
|
+
margin-top: 8px;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
section li > ol,
|
|
280
|
+
section li > ul,
|
|
281
|
+
.VPPage li > ol,
|
|
282
|
+
.VPPage li > ul {
|
|
283
|
+
margin: 8px 0 0;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
section li,
|
|
287
|
+
.VPPage li {
|
|
288
|
+
line-height: 1.75rem;
|
|
289
|
+
font-size: 1.125rem;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
/*
|
|
293
|
+
* Tables
|
|
294
|
+
*/
|
|
295
|
+
section table,
|
|
296
|
+
.VPPage table {
|
|
297
|
+
width: 100%;
|
|
298
|
+
border-collapse: collapse;
|
|
299
|
+
margin: 24px 0;
|
|
300
|
+
display: table;
|
|
301
|
+
overflow-x: auto;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
section tr,
|
|
305
|
+
.VPPage tr {
|
|
306
|
+
border-top: 1px solid rgba(255, 255, 255, 0.15);
|
|
307
|
+
transition: background-color 0.3s ease;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
section.white tr,
|
|
311
|
+
section.light-grey tr {
|
|
312
|
+
border-top: 1px solid rgba(0, 0, 0, 0.12);
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
section th,
|
|
316
|
+
section td,
|
|
317
|
+
.VPPage th,
|
|
318
|
+
.VPPage td {
|
|
319
|
+
border: 1px solid rgba(255, 255, 255, 0.15);
|
|
320
|
+
padding: 10px 16px;
|
|
321
|
+
text-align: left;
|
|
322
|
+
font-size: 1rem;
|
|
323
|
+
line-height: 1.5rem;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
section.white th,
|
|
327
|
+
section.white td,
|
|
328
|
+
section.light-grey th,
|
|
329
|
+
section.light-grey td {
|
|
330
|
+
border: 1px solid rgba(0, 0, 0, 0.12);
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
section th,
|
|
334
|
+
.VPPage th {
|
|
335
|
+
font-family: "NotesESAbold", sans-serif;
|
|
336
|
+
font-weight: 600;
|
|
337
|
+
background-color: rgba(255, 255, 255, 0.08);
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
section.white th,
|
|
341
|
+
section.light-grey th {
|
|
342
|
+
background-color: rgba(0, 0, 0, 0.05);
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
section tbody tr:nth-child(2n),
|
|
346
|
+
.VPPage tbody tr:nth-child(2n) {
|
|
347
|
+
background-color: rgba(255, 255, 255, 0.03);
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
section.white tbody tr:nth-child(2n),
|
|
351
|
+
section.light-grey tbody tr:nth-child(2n) {
|
|
352
|
+
background-color: rgba(0, 0, 0, 0.02);
|
|
353
|
+
}
|