@eox/pages-theme-eox 1.0.0 → 1.1.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/CHANGELOG.md +17 -0
- package/README.md +40 -1
- package/cypress/support/mocks/helpers.js +15 -0
- package/package.json +1 -1
- package/src/components/CookieBanner.vue +19 -6
- package/src/components/CookieSettings.vue +35 -27
- package/src/components/DataTable.vue +5 -1
- package/src/components/FeatureSection.vue +8 -4
- package/src/components/Footer.cy.js +58 -0
- package/src/components/Footer.vue +10 -18
- package/src/components/MobileNavDropdown.vue +6 -5
- package/src/components/NavBar.cy.js +37 -0
- package/src/components/NavBar.vue +92 -8
- package/src/components/NavDropdown.vue +7 -6
- package/src/components/NotFound.vue +8 -2
- package/src/components/PricingTable.vue +24 -7
- package/src/components/Tutorial.cy.js +85 -0
- package/src/components/Tutorial.vue +162 -0
- package/src/helpers.js +25 -0
- package/src/index.js +2 -0
- package/src/vitepressConfig.mjs +147 -95
package/src/vitepressConfig.mjs
CHANGED
|
@@ -4,70 +4,71 @@
|
|
|
4
4
|
* @param {object} brandConfig The brand config
|
|
5
5
|
* @returns
|
|
6
6
|
*/
|
|
7
|
-
export const generate = (brandConfig) =>
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
7
|
+
export const generate = (brandConfig) => {
|
|
8
|
+
const config = {
|
|
9
|
+
appearance: false,
|
|
10
|
+
cleanUrls: true,
|
|
11
|
+
description: brandConfig.meta?.description,
|
|
12
|
+
head: [
|
|
13
|
+
["link", { rel: "icon", href: brandConfig.meta?.favicon }],
|
|
14
|
+
// Open Graph / Facebook
|
|
15
|
+
["meta", { property: "og:type", content: "website" }],
|
|
16
|
+
[
|
|
17
|
+
"meta",
|
|
18
|
+
{
|
|
19
|
+
property: "og:url",
|
|
20
|
+
content: brandConfig.home,
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
["meta", { property: "og:title", content: brandConfig.meta?.title }],
|
|
24
|
+
[
|
|
25
|
+
"meta",
|
|
26
|
+
{
|
|
27
|
+
property: "og:description",
|
|
28
|
+
content: brandConfig.meta?.description,
|
|
29
|
+
},
|
|
30
|
+
],
|
|
31
|
+
// TODO
|
|
32
|
+
// [
|
|
33
|
+
// "meta",
|
|
34
|
+
// {
|
|
35
|
+
// property: "og:image",
|
|
36
|
+
// content:
|
|
37
|
+
// "https://earthcode.esa.int/img/EarthCODE_Herobanner_1920x1080.jpg",
|
|
38
|
+
// },
|
|
39
|
+
// ],
|
|
40
|
+
// Twitter
|
|
41
|
+
["meta", { property: "twitter:card", content: "summary_large_image" }],
|
|
42
|
+
[
|
|
43
|
+
"meta",
|
|
44
|
+
{
|
|
45
|
+
property: "twitter:url",
|
|
46
|
+
content: brandConfig.home,
|
|
47
|
+
},
|
|
48
|
+
],
|
|
49
|
+
["meta", { property: "twitter:title", content: brandConfig.meta?.title }],
|
|
50
|
+
[
|
|
51
|
+
"meta",
|
|
52
|
+
{
|
|
53
|
+
property: "twitter:description",
|
|
54
|
+
content: brandConfig.meta?.description,
|
|
55
|
+
},
|
|
56
|
+
],
|
|
57
|
+
// TODO
|
|
58
|
+
// [
|
|
59
|
+
// "meta",
|
|
60
|
+
// {
|
|
61
|
+
// property: "twitter:image",
|
|
62
|
+
// content:
|
|
63
|
+
// "https://earthcode.esa.int/img/EarthCODE_Herobanner_1920x1080.jpg",
|
|
64
|
+
// },
|
|
65
|
+
// ],
|
|
66
|
+
...(brandConfig.analytics
|
|
67
|
+
? [
|
|
68
|
+
[
|
|
69
|
+
"script",
|
|
70
|
+
{},
|
|
71
|
+
`
|
|
71
72
|
var _paq = (window._paq = window._paq || []);
|
|
72
73
|
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
|
|
73
74
|
_paq.push(["requireCookieConsent"]);
|
|
@@ -86,39 +87,90 @@ export const generate = (brandConfig) => ({
|
|
|
86
87
|
s.parentNode.insertBefore(g, s);
|
|
87
88
|
})();
|
|
88
89
|
`,
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
90
|
+
],
|
|
91
|
+
]
|
|
92
|
+
: []),
|
|
93
|
+
],
|
|
94
|
+
srcExclude: ["README.md"],
|
|
95
|
+
themeConfig: {
|
|
96
|
+
siteTitle: false,
|
|
97
|
+
theme: {
|
|
98
|
+
primaryColor: brandConfig.theme?.primary_color,
|
|
99
|
+
secondaryColor:
|
|
100
|
+
brandConfig.theme?.secondary_color ||
|
|
101
|
+
brandConfig.theme?.primary_color,
|
|
102
|
+
brandConfig,
|
|
103
|
+
},
|
|
104
|
+
logo: { light: brandConfig.logo, dark: brandConfig.logo_dark },
|
|
105
|
+
footer: {
|
|
106
|
+
message:
|
|
107
|
+
brandConfig.theme?.footer?.message ||
|
|
108
|
+
`<span class="middle-align">
|
|
109
|
+
Powered by
|
|
110
|
+
<a href="https://hub.eox.at" target="_blank" class="left-margin small-margin"
|
|
111
|
+
><img
|
|
112
|
+
src="https://hub.eox.at/hub/custom/logos/eoxhub.svg"
|
|
113
|
+
style="height: 25px" /></a
|
|
114
|
+
></span>`,
|
|
115
|
+
copyright:
|
|
116
|
+
brandConfig.theme?.footer?.copyright ||
|
|
117
|
+
'Copyright © 2014-present <a href="https://eox.at" target="_blank">EOX IT Services GmbH</a>',
|
|
118
|
+
},
|
|
107
119
|
},
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
120
|
+
title: brandConfig.meta?.title,
|
|
121
|
+
vite: {
|
|
122
|
+
ssr: {
|
|
123
|
+
noExternal: ["@eox/pages-theme-eox"],
|
|
124
|
+
},
|
|
113
125
|
},
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
126
|
+
vue: {
|
|
127
|
+
template: {
|
|
128
|
+
compilerOptions: {
|
|
129
|
+
isCustomElement: (tag) => {
|
|
130
|
+
return tag.toLowerCase().includes("-");
|
|
131
|
+
},
|
|
120
132
|
},
|
|
121
133
|
},
|
|
122
134
|
},
|
|
123
|
-
}
|
|
124
|
-
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
if (brandConfig.i18n?.locale) {
|
|
138
|
+
const localeEntries = Object.entries(brandConfig.i18n.locale);
|
|
139
|
+
const currentLocale = brandConfig.i18n.currentLocale || "en";
|
|
140
|
+
|
|
141
|
+
if (localeEntries.length > 1) {
|
|
142
|
+
config.locales = Object.fromEntries(
|
|
143
|
+
localeEntries.map(([key, i18n]) => {
|
|
144
|
+
const isRoot = key === currentLocale;
|
|
145
|
+
return [
|
|
146
|
+
isRoot ? "root" : key,
|
|
147
|
+
{
|
|
148
|
+
label: key.toUpperCase(),
|
|
149
|
+
lang: key,
|
|
150
|
+
themeConfig: {
|
|
151
|
+
i18n,
|
|
152
|
+
...(i18n.footer
|
|
153
|
+
? { footer: { ...config.themeConfig.footer, ...i18n.footer } }
|
|
154
|
+
: {}),
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
];
|
|
158
|
+
}),
|
|
159
|
+
);
|
|
160
|
+
} else {
|
|
161
|
+
const i18n =
|
|
162
|
+
brandConfig.i18n.locale[currentLocale] || localeEntries[0][1];
|
|
163
|
+
config.themeConfig.i18n = i18n;
|
|
164
|
+
if (i18n.footer) {
|
|
165
|
+
config.themeConfig.footer = {
|
|
166
|
+
...config.themeConfig.footer,
|
|
167
|
+
...i18n.footer,
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
} else if (brandConfig.i18n) {
|
|
172
|
+
config.themeConfig.i18n = brandConfig.i18n;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
return config;
|
|
176
|
+
};
|