@openstack_dev/gatsby-theme-marketing-oif-core 1.0.23 → 1.0.25
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/gatsby-node.js +33 -0
- package/package.json +1 -1
- package/src/cms/config/collections/configurationsCollection/announcementBanner/index.js +16 -13
- package/src/cms/config/collections/configurationsCollection/footer/index.js +85 -41
- package/src/cms/config/collections/configurationsCollection/footer/typeDefs.js +12 -4
- package/src/components/AnnouncementBanner/index.js +9 -8
- package/src/components/AnnouncementBanner/template.js +24 -9
- package/src/components/Footer/index.js +19 -4
- package/src/components/Footer/index.module.scss +10 -7
- package/src/components/Footer/template.js +126 -25
- package/src/components/Link.js +10 -5
- package/src/content/announcement-banner/index.json +1 -0
- package/src/content/footer/bluesky_logo.svg +4 -0
- package/src/content/footer/index.json +70 -12
- package/src/content/footer/mastodon.svg +12 -0
- package/src/content/footer/qrcode-for-gh-5cc38c749efd-1280.jpg +0 -0
- package/src/content/footer/x-icon.svg +13 -0
- package/src/content/site-settings/index.json +1 -1
- package/src/images/404-bg.jpg +0 -0
- package/src/images/cat.png +0 -0
- package/src/pages/404.js +71 -0
- package/src/styles/404.module.scss +132 -0
- package/src/themes/404theme.js +26 -0
- package/static/fonts/gothamnarrow-ultra/GothamNarrow-Ultra.eot +0 -0
- package/static/fonts/gothamnarrow-ultra/GothamNarrow-Ultra.otf +0 -0
- package/static/fonts/gothamnarrow-ultra/GothamNarrow-Ultra.svg +3273 -0
- package/static/fonts/gothamnarrow-ultra/GothamNarrow-Ultra.ttf +0 -0
- package/static/fonts/gothamnarrow-ultra/GothamNarrow-Ultra.woff +0 -0
package/gatsby-node.js
CHANGED
|
@@ -15,6 +15,7 @@ const {
|
|
|
15
15
|
MAINTENANCE_FILE_PATH,
|
|
16
16
|
FONTS_SCSS_FILE_PATH,
|
|
17
17
|
SPONSORED_PROJECTS_FILE_PATH,
|
|
18
|
+
FOOTER_FILE_PATH,
|
|
18
19
|
} = require("./src/utils/filePath");
|
|
19
20
|
const { generateFontFile } = require("./src/utils/cssUtils");
|
|
20
21
|
|
|
@@ -87,6 +88,38 @@ exports.onPreBootstrap = async () => {
|
|
|
87
88
|
if (sponsoredProjects) {
|
|
88
89
|
writeToJson(SPONSORED_PROJECTS_FILE_PATH, sponsoredProjects);
|
|
89
90
|
}
|
|
91
|
+
|
|
92
|
+
// new footer structure migration
|
|
93
|
+
// read the JSON file
|
|
94
|
+
const rawData = fs.readFileSync(FOOTER_FILE_PATH, "utf8");
|
|
95
|
+
let footerJSON;
|
|
96
|
+
try {
|
|
97
|
+
footerJSON = JSON.parse(rawData);
|
|
98
|
+
} catch (error) {
|
|
99
|
+
console.log("Error parsing JSON from footer file:", error);
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
// return new structure for social networks
|
|
103
|
+
if (footerJSON.social && Array.isArray(footerJSON.social.networks)) {
|
|
104
|
+
footerJSON.social.networks = footerJSON.social.networks.map((item) => ({
|
|
105
|
+
display: item.display,
|
|
106
|
+
title: item.title || item.icon,
|
|
107
|
+
clickBehaviour: {
|
|
108
|
+
link: item.clickBehaviour?.link || item.link,
|
|
109
|
+
attributes: item.clickBehaviour?.attributes || [],
|
|
110
|
+
},
|
|
111
|
+
rendering: {
|
|
112
|
+
icon: item.rendering?.icon || item.icon,
|
|
113
|
+
},
|
|
114
|
+
}));
|
|
115
|
+
}
|
|
116
|
+
// save updated file.
|
|
117
|
+
try {
|
|
118
|
+
fs.writeFileSync(FOOTER_FILE_PATH, JSON.stringify(footerJSON));
|
|
119
|
+
console.log(`File successfully updated at ${FOOTER_FILE_PATH}`);
|
|
120
|
+
} catch (error) {
|
|
121
|
+
console.log("Error writing updated config file:", error);
|
|
122
|
+
}
|
|
90
123
|
};
|
|
91
124
|
|
|
92
125
|
exports.createSchemaCustomization = ({ actions }) => {
|
package/package.json
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
import { imageField, stringField } from "../../../fields";
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
ANNOUNCEMENT_BANNER_FILE_PATH
|
|
5
|
-
} from "../../../../../utils/filePath";
|
|
1
|
+
import { booleanField, imageField, stringField } from "../../../fields";
|
|
6
2
|
|
|
3
|
+
import { ANNOUNCEMENT_BANNER_FILE_PATH } from "../../../../../utils/filePath";
|
|
7
4
|
|
|
8
5
|
/*
|
|
9
6
|
- file: "src/content/banners/announcement.json"
|
|
10
7
|
label: "Announcement Banner"
|
|
11
8
|
name: "announcement_banner"
|
|
12
9
|
fields:
|
|
10
|
+
- {label: "Display", name: "display", widget: boolean, required: false},
|
|
13
11
|
- {label: "Title", name: "title", widget: string, required: false}
|
|
14
12
|
- {label: "Logo", name: "logo", widget: image, required: false}
|
|
15
13
|
- {label: "Text", name: "text", widget: string, required: false}
|
|
@@ -23,37 +21,42 @@ const announcementBanner = {
|
|
|
23
21
|
name: "announcement-banner",
|
|
24
22
|
file: ANNOUNCEMENT_BANNER_FILE_PATH,
|
|
25
23
|
fields: [
|
|
24
|
+
booleanField({
|
|
25
|
+
label: "Display",
|
|
26
|
+
name: "display",
|
|
27
|
+
required: true,
|
|
28
|
+
}),
|
|
26
29
|
stringField({
|
|
27
30
|
label: "Title",
|
|
28
31
|
name: "title",
|
|
29
|
-
required: false
|
|
32
|
+
required: false,
|
|
30
33
|
}),
|
|
31
34
|
imageField({
|
|
32
35
|
label: "Logo",
|
|
33
36
|
name: "logo",
|
|
34
|
-
required: false
|
|
37
|
+
required: false,
|
|
35
38
|
}),
|
|
36
39
|
stringField({
|
|
37
40
|
label: "Text",
|
|
38
41
|
name: "text",
|
|
39
|
-
required: false
|
|
42
|
+
required: false,
|
|
40
43
|
}),
|
|
41
44
|
stringField({
|
|
42
45
|
label: "CTA Title",
|
|
43
46
|
name: "cta_title",
|
|
44
|
-
required: false
|
|
47
|
+
required: false,
|
|
45
48
|
}),
|
|
46
49
|
stringField({
|
|
47
50
|
label: "CTA Label",
|
|
48
51
|
name: "cta_label",
|
|
49
|
-
required: false
|
|
52
|
+
required: false,
|
|
50
53
|
}),
|
|
51
54
|
stringField({
|
|
52
55
|
label: "CTA Link",
|
|
53
56
|
name: "cta_link",
|
|
54
|
-
required: false
|
|
57
|
+
required: false,
|
|
55
58
|
}),
|
|
56
|
-
]
|
|
59
|
+
],
|
|
57
60
|
};
|
|
58
61
|
|
|
59
|
-
export default announcementBanner;
|
|
62
|
+
export default announcementBanner;
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
+
import { FOOTER_FILE_PATH } from "@utils/filePath";
|
|
2
|
+
|
|
1
3
|
import {
|
|
2
4
|
booleanField,
|
|
3
5
|
stringField,
|
|
4
6
|
objectField,
|
|
5
|
-
listField
|
|
7
|
+
listField,
|
|
8
|
+
fileField,
|
|
6
9
|
} from "../../../fields";
|
|
7
10
|
|
|
8
|
-
import {
|
|
9
|
-
FOOTER_FILE_PATH
|
|
10
|
-
} from "@utils/filePath";
|
|
11
|
-
|
|
12
11
|
/*
|
|
13
12
|
- file: "src/content/footer.json"
|
|
14
13
|
label: "Footer"
|
|
@@ -19,7 +18,7 @@ import {
|
|
|
19
18
|
{label: "Display", name: "display", widget: boolean, required: false},
|
|
20
19
|
{label: "Items", name: "items", widget: list, fields: [
|
|
21
20
|
{label: "Title", name: "title", widget: string},
|
|
22
|
-
{label: "Link", name: "link", widget: string},
|
|
21
|
+
{label: "Link", name: "link", widget: string},
|
|
23
22
|
]}
|
|
24
23
|
]}
|
|
25
24
|
- {label: "Logo", name: "logo", widget: object, fields: [
|
|
@@ -51,12 +50,12 @@ const footer = {
|
|
|
51
50
|
fields: [
|
|
52
51
|
stringField({
|
|
53
52
|
label: "Title",
|
|
54
|
-
name: "title"
|
|
53
|
+
name: "title",
|
|
55
54
|
}),
|
|
56
55
|
booleanField({
|
|
57
56
|
label: "Display",
|
|
58
57
|
name: "display",
|
|
59
|
-
required: false
|
|
58
|
+
required: false,
|
|
60
59
|
}),
|
|
61
60
|
listField({
|
|
62
61
|
label: "Items",
|
|
@@ -64,15 +63,15 @@ const footer = {
|
|
|
64
63
|
fields: [
|
|
65
64
|
stringField({
|
|
66
65
|
label: "Title",
|
|
67
|
-
name: "title"
|
|
66
|
+
name: "title",
|
|
68
67
|
}),
|
|
69
68
|
stringField({
|
|
70
69
|
label: "Link",
|
|
71
|
-
name: "link"
|
|
72
|
-
})
|
|
73
|
-
]
|
|
74
|
-
})
|
|
75
|
-
]
|
|
70
|
+
name: "link",
|
|
71
|
+
}),
|
|
72
|
+
],
|
|
73
|
+
}),
|
|
74
|
+
],
|
|
76
75
|
}),
|
|
77
76
|
objectField({
|
|
78
77
|
label: "Logo",
|
|
@@ -81,9 +80,9 @@ const footer = {
|
|
|
81
80
|
booleanField({
|
|
82
81
|
label: "Display",
|
|
83
82
|
name: "display",
|
|
84
|
-
required: false
|
|
85
|
-
})
|
|
86
|
-
]
|
|
83
|
+
required: false,
|
|
84
|
+
}),
|
|
85
|
+
],
|
|
87
86
|
}),
|
|
88
87
|
objectField({
|
|
89
88
|
label: "Social",
|
|
@@ -91,33 +90,78 @@ const footer = {
|
|
|
91
90
|
fields: [
|
|
92
91
|
stringField({
|
|
93
92
|
label: "Title",
|
|
94
|
-
name: "title"
|
|
93
|
+
name: "title",
|
|
95
94
|
}),
|
|
96
95
|
booleanField({
|
|
97
96
|
label: "Display",
|
|
98
97
|
name: "display",
|
|
99
|
-
required: false
|
|
98
|
+
required: false,
|
|
100
99
|
}),
|
|
101
100
|
listField({
|
|
102
101
|
label: "Networks",
|
|
103
102
|
name: "networks",
|
|
104
103
|
fields: [
|
|
105
104
|
stringField({
|
|
106
|
-
label: "
|
|
107
|
-
name: "
|
|
105
|
+
label: "Title",
|
|
106
|
+
name: "title",
|
|
108
107
|
}),
|
|
109
|
-
|
|
110
|
-
label: "
|
|
111
|
-
name: "
|
|
108
|
+
objectField({
|
|
109
|
+
label: "Rendering",
|
|
110
|
+
name: "rendering",
|
|
111
|
+
fields: [
|
|
112
|
+
stringField({
|
|
113
|
+
label: "Icon",
|
|
114
|
+
name: "icon",
|
|
115
|
+
required: false,
|
|
116
|
+
}),
|
|
117
|
+
fileField({
|
|
118
|
+
label: "file",
|
|
119
|
+
name: "file",
|
|
120
|
+
required: false,
|
|
121
|
+
}),
|
|
122
|
+
],
|
|
123
|
+
}),
|
|
124
|
+
objectField({
|
|
125
|
+
label: "Click Behaviour",
|
|
126
|
+
name: "clickBehaviour",
|
|
127
|
+
fields: [
|
|
128
|
+
stringField({
|
|
129
|
+
label: "Link",
|
|
130
|
+
name: "link",
|
|
131
|
+
required: false,
|
|
132
|
+
}),
|
|
133
|
+
listField({
|
|
134
|
+
label: "Custom attributes",
|
|
135
|
+
name: "attributes",
|
|
136
|
+
required: false,
|
|
137
|
+
fields: [
|
|
138
|
+
stringField({
|
|
139
|
+
label: "Attribute",
|
|
140
|
+
name: "attribute",
|
|
141
|
+
required: true,
|
|
142
|
+
}),
|
|
143
|
+
stringField({
|
|
144
|
+
label: "Value",
|
|
145
|
+
name: "value",
|
|
146
|
+
required: true,
|
|
147
|
+
}),
|
|
148
|
+
],
|
|
149
|
+
}),
|
|
150
|
+
fileField({
|
|
151
|
+
label: "Open modal with File",
|
|
152
|
+
name: "openModal",
|
|
153
|
+
required: false,
|
|
154
|
+
}),
|
|
155
|
+
],
|
|
112
156
|
}),
|
|
113
157
|
booleanField({
|
|
114
158
|
label: "Display",
|
|
115
159
|
name: "display",
|
|
116
|
-
required: false
|
|
117
|
-
})
|
|
118
|
-
]
|
|
119
|
-
})
|
|
120
|
-
]
|
|
160
|
+
required: false,
|
|
161
|
+
}),
|
|
162
|
+
],
|
|
163
|
+
}),
|
|
164
|
+
],
|
|
121
165
|
}),
|
|
122
166
|
listField({
|
|
123
167
|
label: "Legal",
|
|
@@ -125,13 +169,13 @@ const footer = {
|
|
|
125
169
|
fields: [
|
|
126
170
|
stringField({
|
|
127
171
|
label: "Title",
|
|
128
|
-
name: "title"
|
|
172
|
+
name: "title",
|
|
129
173
|
}),
|
|
130
174
|
stringField({
|
|
131
175
|
label: "Link",
|
|
132
|
-
name: "link"
|
|
133
|
-
})
|
|
134
|
-
]
|
|
176
|
+
name: "link",
|
|
177
|
+
}),
|
|
178
|
+
],
|
|
135
179
|
}),
|
|
136
180
|
objectField({
|
|
137
181
|
label: "Credit",
|
|
@@ -139,20 +183,20 @@ const footer = {
|
|
|
139
183
|
fields: [
|
|
140
184
|
stringField({
|
|
141
185
|
label: "Title",
|
|
142
|
-
name: "title"
|
|
186
|
+
name: "title",
|
|
143
187
|
}),
|
|
144
188
|
stringField({
|
|
145
189
|
label: "Content",
|
|
146
|
-
name: "content"
|
|
190
|
+
name: "content",
|
|
147
191
|
}),
|
|
148
192
|
booleanField({
|
|
149
193
|
label: "Display",
|
|
150
194
|
name: "display",
|
|
151
|
-
required: false
|
|
152
|
-
})
|
|
153
|
-
]
|
|
154
|
-
})
|
|
155
|
-
]
|
|
195
|
+
required: false,
|
|
196
|
+
}),
|
|
197
|
+
],
|
|
198
|
+
}),
|
|
199
|
+
],
|
|
156
200
|
};
|
|
157
201
|
|
|
158
|
-
export default footer;
|
|
202
|
+
export default footer;
|
|
@@ -1,13 +1,21 @@
|
|
|
1
|
-
|
|
2
1
|
module.exports = `
|
|
2
|
+
type ClickBehaviour {
|
|
3
|
+
link: String
|
|
4
|
+
attribute: String
|
|
5
|
+
openModal: File @fileByRelativePath
|
|
6
|
+
}
|
|
7
|
+
type Rendering {
|
|
8
|
+
icon: String
|
|
9
|
+
file: File @fileByRelativePath
|
|
10
|
+
}
|
|
3
11
|
type Link {
|
|
4
12
|
title: String
|
|
5
13
|
link: String
|
|
6
14
|
}
|
|
7
15
|
type Networks {
|
|
8
|
-
icon: String
|
|
9
|
-
link: String
|
|
10
16
|
display: Boolean
|
|
17
|
+
rendering: Rendering
|
|
18
|
+
clickBehaviour: ClickBehaviour
|
|
11
19
|
}
|
|
12
20
|
type Social {
|
|
13
21
|
title: String
|
|
@@ -34,4 +42,4 @@ module.exports = `
|
|
|
34
42
|
logo: Logo
|
|
35
43
|
columns: [Columns]
|
|
36
44
|
}
|
|
37
|
-
`;
|
|
45
|
+
`;
|
|
@@ -5,22 +5,23 @@ import Template from "./template";
|
|
|
5
5
|
const dataQuery = graphql`
|
|
6
6
|
query {
|
|
7
7
|
announcementBannerJson {
|
|
8
|
-
|
|
8
|
+
display
|
|
9
|
+
title
|
|
9
10
|
logo {
|
|
10
11
|
publicURL
|
|
11
|
-
}
|
|
12
|
-
text
|
|
13
|
-
cta_title
|
|
14
|
-
cta_label
|
|
12
|
+
}
|
|
13
|
+
text
|
|
14
|
+
cta_title
|
|
15
|
+
cta_label
|
|
15
16
|
cta_link
|
|
16
17
|
}
|
|
17
18
|
}
|
|
18
19
|
`;
|
|
19
20
|
|
|
20
|
-
|
|
21
|
-
const {announcementBannerJson} = useStaticQuery(dataQuery);
|
|
21
|
+
function AnnouncementBanner() {
|
|
22
|
+
const { announcementBannerJson } = useStaticQuery(dataQuery);
|
|
22
23
|
|
|
23
24
|
return <Template data={announcementBannerJson} />;
|
|
24
|
-
}
|
|
25
|
+
}
|
|
25
26
|
|
|
26
27
|
export default AnnouncementBanner;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import RightArrow from
|
|
2
|
+
import { Grid } from "@mui/material";
|
|
3
|
+
import "@fortawesome/fontawesome-free/css/all.css";
|
|
4
|
+
import RightArrow from "../svgs/RightArrow";
|
|
5
5
|
import styles from "./index.module.scss";
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
const {
|
|
7
|
+
function Template({ data }) {
|
|
8
|
+
const {
|
|
9
|
+
title, logo, text, cta_title, cta_label, cta_link, display,
|
|
10
|
+
} = data || {};
|
|
11
|
+
if (!display) return null;
|
|
9
12
|
|
|
10
13
|
return (
|
|
11
14
|
<div className={styles.wrapper}>
|
|
@@ -13,12 +16,24 @@ const Template = ({ data }) => {
|
|
|
13
16
|
<Grid item sm={12} md={8}>
|
|
14
17
|
<div className={styles.header}>
|
|
15
18
|
<img className={styles.logo} src={logo?.publicURL} alt="logo" />
|
|
16
|
-
<h2 className={styles.title}>
|
|
19
|
+
<h2 className={styles.title}>
|
|
20
|
+
{" "}
|
|
21
|
+
{title}
|
|
22
|
+
{" "}
|
|
23
|
+
</h2>
|
|
17
24
|
</div>
|
|
18
|
-
<p className={styles.text}>
|
|
25
|
+
<p className={styles.text}>
|
|
26
|
+
{" "}
|
|
27
|
+
{text}
|
|
28
|
+
{" "}
|
|
29
|
+
</p>
|
|
19
30
|
</Grid>
|
|
20
31
|
<Grid item sm={12} md={4}>
|
|
21
|
-
<h3 className={styles.ctaTitle}>
|
|
32
|
+
<h3 className={styles.ctaTitle}>
|
|
33
|
+
{" "}
|
|
34
|
+
{cta_title}
|
|
35
|
+
{" "}
|
|
36
|
+
</h3>
|
|
22
37
|
<a className={styles.cta} href={cta_link}>
|
|
23
38
|
{cta_label}
|
|
24
39
|
<span className={styles.img}>
|
|
@@ -35,6 +50,6 @@ const Template = ({ data }) => {
|
|
|
35
50
|
</div>
|
|
36
51
|
</div>
|
|
37
52
|
);
|
|
38
|
-
}
|
|
53
|
+
}
|
|
39
54
|
|
|
40
55
|
export default Template;
|
|
@@ -10,8 +10,23 @@ const footerQuery = graphql`
|
|
|
10
10
|
title
|
|
11
11
|
networks {
|
|
12
12
|
display
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
title
|
|
14
|
+
rendering {
|
|
15
|
+
icon
|
|
16
|
+
file {
|
|
17
|
+
publicURL
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
clickBehaviour {
|
|
21
|
+
link
|
|
22
|
+
attributes {
|
|
23
|
+
attribute
|
|
24
|
+
value
|
|
25
|
+
}
|
|
26
|
+
openModal {
|
|
27
|
+
publicURL
|
|
28
|
+
}
|
|
29
|
+
}
|
|
15
30
|
}
|
|
16
31
|
}
|
|
17
32
|
credit {
|
|
@@ -31,10 +46,10 @@ const footerQuery = graphql`
|
|
|
31
46
|
}
|
|
32
47
|
`;
|
|
33
48
|
|
|
34
|
-
|
|
49
|
+
function Footer() {
|
|
35
50
|
const { footerJson: footerContent } = useStaticQuery(footerQuery);
|
|
36
51
|
|
|
37
52
|
return <FooterTemplate data={footerContent} />;
|
|
38
|
-
}
|
|
53
|
+
}
|
|
39
54
|
|
|
40
55
|
export default Footer;
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
.link {
|
|
18
|
-
color: #
|
|
18
|
+
color: #aaaaaa;
|
|
19
19
|
text-decoration: none;
|
|
20
20
|
line-height: 1.5;
|
|
21
21
|
|
|
@@ -45,15 +45,18 @@
|
|
|
45
45
|
min-width: 48px;
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
+
.iconImage {
|
|
49
|
+
height: 36px;
|
|
50
|
+
}
|
|
48
51
|
}
|
|
49
52
|
|
|
50
53
|
.credit {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
margin-top: 20px;
|
|
55
|
+
line-height: 1.5;
|
|
56
|
+
color: #aaaaaa;
|
|
57
|
+
a {
|
|
58
|
+
color: #aaaaaa;
|
|
59
|
+
}
|
|
57
60
|
}
|
|
58
61
|
}
|
|
59
62
|
}
|