@openstack_dev/gatsby-theme-marketing-oif-core 1.0.28 → 1.0.30

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/.prettierrc ADDED
@@ -0,0 +1,10 @@
1
+ {
2
+ "singleQuote": false,
3
+ "jsxSingleQuote": false,
4
+ "semi": true,
5
+ "tabWidth": 2,
6
+ "bracketSpacing": true,
7
+ "jsxBracketSameLine": false,
8
+ "arrowParens": "always",
9
+ "trailingComma": "none"
10
+ }
package/netlify.toml CHANGED
@@ -3,263 +3,11 @@
3
3
  # Define which paths this specific [[headers]] block will cover.
4
4
  for = "/*"
5
5
  [headers.values]
6
- Authorization = "Basic b3BlbnN0YWNrOlF1YWNrZXI"
6
+ Authorization = "Basic b3BlbnN0YWNrOlF1YWNrZXIh"
7
7
 
8
8
  [[redirects]]
9
- from = "/marketplace/*"
10
- to = "https://devbranch.openstack.org/marketplace/:splat"
9
+ from = "/community/supporting-organizations/profile/*"
10
+ to = "https://legacy.openstack.org/community/supporting-organizations/profile/:splat"
11
11
  status = 200
12
12
  force = true
13
- headers = {Authorization = "Basic b3BlbnN0YWNrOlF1YWNrZXI", X-From = "netlify", X-Forwarded-Host = "main--oif-marketing-site-dev.netlify.app"}
14
-
15
- [[redirects]]
16
- from = "/themes/*"
17
- to = "https://devbranch.openstack.org/themes/:splat"
18
- status = 200
19
- force = true
20
- headers = {Authorization = "Basic b3BlbnN0YWNrOlF1YWNrZXI", X-From = "netlify", X-Forwarded-Host = "main--oif-marketing-site-dev.netlify.app"}
21
-
22
- [[redirects]]
23
- from = "/navbar/*"
24
- to = "https://devbranch.openstack.org/navbar/:splat"
25
- status = 200
26
- force = true
27
- headers = {Authorization = "Basic b3BlbnN0YWNrOlF1YWNrZXI", X-From = "netlify", X-Forwarded-Host = "main--oif-marketing-site-dev.netlify.app"}
28
-
29
- [[redirects]]
30
- from = "/framework/*"
31
- to = "https://devbranch.openstack.org/framework/:splat"
32
- status = 200
33
- force = true
34
- headers = {Authorization = "Basic b3BlbnN0YWNrOlF1YWNrZXI", X-From = "netlify", X-Forwarded-Host = "main--oif-marketing-site-dev.netlify.app"}
35
-
36
- [[redirects]]
37
- from = "/googlemaps/*"
38
- to = "https://devbranch.openstack.org/googlemaps/:splat"
39
- status = 200
40
- force = true
41
- headers = {Authorization = "Basic b3BlbnN0YWNrOlF1YWNrZXI", X-From = "netlify", X-Forwarded-Host = "main--oif-marketing-site-dev.netlify.app"}
42
-
43
- [[redirects]]
44
- from = "/node_modules/*"
45
- to = "https://devbranch.openstack.org/node_modules/:splat"
46
- status = 200
47
- force = true
48
- headers = {Authorization = "Basic b3BlbnN0YWNrOlF1YWNrZXI", X-From = "netlify", X-Forwarded-Host = "main--oif-marketing-site-dev.netlify.app"}
49
-
50
- [[redirects]]
51
- from = "/maps_images/*"
52
- to = "https://devbranch.openstack.org/maps_images/:splat"
53
- status = 200
54
- force = true
55
- headers = {Authorization = "Basic b3BlbnN0YWNrOlF1YWNrZXI", X-From = "netlify", X-Forwarded-Host = "main--oif-marketing-site-dev.netlify.app"}
56
-
57
- [[redirects]]
58
- from = "/use-cases/*"
59
- to = "https://devbranch.openstack.org/use-cases/:splat"
60
- status = 200
61
- force = true
62
- headers = {Authorization = "Basic b3BlbnN0YWNrOlF1YWNrZXI", X-From = "netlify", X-Forwarded-Host = "main--oif-marketing-site-dev.netlify.app"}
63
-
64
- [[redirects]]
65
- from = "/software/*"
66
- to = "https://devbranch.openstack.org/software/:splat"
67
- status = 200
68
- force = true
69
- headers = {Authorization = "Basic b3BlbnN0YWNrOlF1YWNrZXI", X-From = "netlify", X-Forwarded-Host = "main--oif-marketing-site-dev.netlify.app"}
70
-
71
- [[redirects]]
72
- from = "/openstack-map/*"
73
- to = "https://devbranch.openstack.org/openstack-map/:splat"
74
- status = 200
75
- force = true
76
- headers = {Authorization = "Basic b3BlbnN0YWNrOlF1YWNrZXI", X-From = "netlify", X-Forwarded-Host = "main--oif-marketing-site-dev.netlify.app"}
77
-
78
- [[redirects]]
79
- from = "/surveys/*"
80
- to = "https://devbranch.openstack.org/surveys/:splat"
81
- status = 200
82
- force = true
83
- headers = {Authorization = "Basic b3BlbnN0YWNrOlF1YWNrZXI", X-From = "netlify", X-Forwarded-Host = "main--oif-marketing-site-dev.netlify.app"}
84
-
85
- [[redirects]]
86
- from = "/user-survey/*"
87
- to = "https://devbranch.openstack.org/user-survey/:splat"
88
- status = 200
89
- force = true
90
- headers = {Authorization = "Basic b3BlbnN0YWNrOlF1YWNrZXI", X-From = "netlify", X-Forwarded-Host = "main--oif-marketing-site-dev.netlify.app"}
91
-
92
- [[redirects]]
93
- from = "/blog/*"
94
- to = "https://devbranch.openstack.org/blog/:splat"
95
- status = 200
96
- force = true
97
- headers = {Authorization = "Basic b3BlbnN0YWNrOlF1YWNrZXI", X-From = "netlify", X-Forwarded-Host = "main--oif-marketing-site-dev.netlify.app"}
98
-
99
- [[redirects]]
100
- from = "/marketing/*"
101
- to = "https://devbranch.openstack.org/marketing/:splat"
102
- status = 200
103
- force = true
104
- headers = {Authorization = "Basic b3BlbnN0YWNrOlF1YWNrZXI", X-From = "netlify", X-Forwarded-Host = "main--oif-marketing-site-dev.netlify.app"}
105
-
106
- [[redirects]]
107
- from = "/summit/*"
108
- to = "https://devbranch.openstack.org/summit/:splat"
109
- status = 200
110
- force = true
111
- headers = {Authorization = "Basic b3BlbnN0YWNrOlF1YWNrZXI", X-From = "netlify", X-Forwarded-Host = "main--oif-marketing-site-dev.netlify.app"}
112
-
113
- [[redirects]]
114
- from = "/brand/*"
115
- to = "https://devbranch.openstack.org/brand/:splat"
116
- status = 200
117
- force = true
118
- headers = {Authorization = "Basic b3BlbnN0YWNrOlF1YWNrZXI", X-From = "netlify", X-Forwarded-Host = "main--oif-marketing-site-dev.netlify.app"}
119
-
120
- [[redirects]]
121
- from = "/community/*"
122
- to = "https://devbranch.openstack.org/community/:splat"
123
- status = 200
124
- force = true
125
- headers = {Authorization = "Basic b3BlbnN0YWNrOlF1YWNrZXI", X-From = "netlify", X-Forwarded-Host = "main--oif-marketing-site-dev.netlify.app"}
126
-
127
- [[redirects]]
128
- from = "/events/*"
129
- to = "https://devbranch.openstack.org/events/:splat"
130
- status = 200
131
- force = true
132
- headers = {Authorization = "Basic b3BlbnN0YWNrOlF1YWNrZXI", X-From = "netlify", X-Forwarded-Host = "main--oif-marketing-site-dev.netlify.app"}
133
-
134
- [[redirects]]
135
- from = "/ptg/*"
136
- to = "https://devbranch.openstack.org/ptg/:splat"
137
- status = 200
138
- force = true
139
- headers = {Authorization = "Basic b3BlbnN0YWNrOlF1YWNrZXI", X-From = "netlify", X-Forwarded-Host = "main--oif-marketing-site-dev.netlify.app"}
140
-
141
- [[redirects]]
142
- from = "/videos/*"
143
- to = "https://devbranch.openstack.org/videos/:splat"
144
- status = 200
145
- force = true
146
- headers = {Authorization = "Basic b3BlbnN0YWNrOlF1YWNrZXI", X-From = "netlify", X-Forwarded-Host = "main--oif-marketing-site-dev.netlify.app"}
147
-
148
- [[redirects]]
149
- from = "/summit-video-app/*"
150
- to = "https://devbranch.openstack.org/summit-video-app/:splat"
151
- status = 200
152
- force = true
153
- headers = {Authorization = "Basic b3BlbnN0YWNrOlF1YWNrZXI", X-From = "netlify", X-Forwarded-Host = "main--oif-marketing-site-dev.netlify.app"}
154
-
155
- [[redirects]]
156
- from = "/news/*"
157
- to = "https://devbranch.openstack.org/summit-video-app/:splat"
158
- status = 200
159
- force = true
160
- headers = {Authorization = "Basic b3BlbnN0YWNrOlF1YWNrZXI", X-From = "netlify", X-Forwarded-Host = "main--oif-marketing-site-dev.netlify.app"}
161
-
162
- [[redirects]]
163
- from = "/favicon/*"
164
- to = "https://devbranch.openstack.org/favicon/:splat"
165
- status = 200
166
- force = true
167
- headers = {Authorization = "Basic b3BlbnN0YWNrOlF1YWNrZXI", X-From = "netlify", X-Forwarded-Host = "main--oif-marketing-site-dev.netlify.app"}
168
-
169
- [[redirects]]
170
- from = "/errors_pages/*"
171
- to = "https://devbranch.openstack.org/errors_pages/:splat"
172
- status = 200
173
- force = true
174
- headers = {Authorization = "Basic b3BlbnN0YWNrOlF1YWNrZXI", X-From = "netlify", X-Forwarded-Host = "main--oif-marketing-site-dev.netlify.app"}
175
-
176
- [[redirects]]
177
- from = "/speaker_bureau/*"
178
- to = "https://devbranch.openstack.org/speaker_bureau/:splat"
179
- status = 200
180
- force = true
181
- headers = {Authorization = "Basic b3BlbnN0YWNrOlF1YWNrZXI", X-From = "netlify", X-Forwarded-Host = "main--oif-marketing-site-dev.netlify.app"}
182
-
183
- [[redirects]]
184
- from = "/coa/*"
185
- to = "https://devbranch.openstack.org/coa/:splat"
186
- status = 200
187
- force = true
188
- headers = {Authorization = "Basic b3BlbnN0YWNrOlF1YWNrZXI", X-From = "netlify", X-Forwarded-Host = "main--oif-marketing-site-dev.netlify.app"}
189
-
190
- [[redirects]]
191
- from = "/learn/*"
192
- to = "https://devbranch.openstack.org/learn/:splat"
193
- status = 200
194
- force = true
195
- headers = {Authorization = "Basic b3BlbnN0YWNrOlF1YWNrZXI", X-From = "netlify", X-Forwarded-Host = "main--oif-marketing-site-dev.netlify.app"}
196
-
197
- [[redirects]]
198
- from = "/Security/*"
199
- to = "https://devbranch.openstack.org/Security/:splat"
200
- status = 200
201
- force = true
202
- headers = {Authorization = "Basic b3BlbnN0YWNrOlF1YWNrZXI", X-From = "netlify", X-Forwarded-Host = "main--oif-marketing-site-dev.netlify.app"}
203
-
204
- [[redirects]]
205
- from = "/OpenStackIdAuthenticator/*"
206
- to = "https://devbranch.openstack.org/OpenStackIdAuthenticator/:splat"
207
- status = 200
208
- force = true
209
- headers = {Authorization = "Basic b3BlbnN0YWNrOlF1YWNrZXI", X-From = "netlify", X-Forwarded-Host = "main--oif-marketing-site-dev.netlify.app"}
210
-
211
- [[redirects]]
212
- from = "/profile/*"
213
- to = "https://devbranch.openstack.org/profile/:splat"
214
- status = 200
215
- force = true
216
- headers = {Authorization = "Basic b3BlbnN0YWNrOlF1YWNrZXI", X-From = "netlify", X-Forwarded-Host = "main--oif-marketing-site-dev.netlify.app"}
217
-
218
- [[redirects]]
219
- from = "/userprofile/*"
220
- to = "https://devbranch.openstack.org/userprofile/:splat"
221
- status = 200
222
- force = true
223
- headers = {Authorization = "Basic b3BlbnN0YWNrOlF1YWNrZXI", X-From = "netlify", X-Forwarded-Host = "main--oif-marketing-site-dev.netlify.app"}
224
-
225
- [[redirects]]
226
- from = "/registration/*"
227
- to = "https://devbranch.openstack.org/registration/:splat"
228
- status = 200
229
- force = true
230
- headers = {Authorization = "Basic b3BlbnN0YWNrOlF1YWNrZXI", X-From = "netlify", X-Forwarded-Host = "main--oif-marketing-site-dev.netlify.app"}
231
-
232
- [[redirects]]
233
- from = "/legal/*"
234
- to = "https://devbranch.openstack.org/legal/:splat"
235
- status = 200
236
- force = true
237
- headers = {Authorization = "Basic b3BlbnN0YWNrOlF1YWNrZXI", X-From = "netlify", X-Forwarded-Host = "main--oif-marketing-site-dev.netlify.app"}
238
-
239
- [[redirects]]
240
- from = "/ICLA/*"
241
- to = "https://devbranch.openstack.org/ICLA/:splat"
242
- status = 200
243
- force = true
244
- headers = {Authorization = "Basic b3BlbnN0YWNrOlF1YWNrZXI", X-From = "netlify", X-Forwarded-Host = "main--oif-marketing-site-dev.netlify.app"}
245
-
246
- [[redirects]]
247
- from = "/marketplaceadmin/*"
248
- to = "https://devbranch.openstack.org/marketplaceadmin/:splat"
249
- status = 200
250
- force = true
251
- headers = {Authorization = "Basic b3BlbnN0YWNrOlF1YWNrZXI", X-From = "netlify", X-Forwarded-Host = "main--oif-marketing-site-dev.netlify.app"}
252
-
253
- [[redirects]]
254
- from = "/api/*"
255
- to = "https://devbranch.openstack.org/api/:splat"
256
- status = 200
257
- force = true
258
- headers = {Authorization = "Basic b3BlbnN0YWNrOlF1YWNrZXI", X-From = "netlify", X-Forwarded-Host = "main--oif-marketing-site-dev.netlify.app"}
259
-
260
- [[redirects]]
261
- from = "/community"
262
- to = "https://devbranch.openstack.org/community"
263
- status = 200
264
- force = true
265
- headers = {Authorization = "Basic b3BlbnN0YWNrOlF1YWNrZXI", X-From = "netlify", X-Forwarded-Host = "main--oif-marketing-site-dev.netlify.app"}
13
+ headers = {Authorization = "Basic b3BlbnN0YWNrOlF1YWNrZXIh", X-From = "netlify", X-Forwarded-Host = "www.openstack.org"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openstack_dev/gatsby-theme-marketing-oif-core",
3
- "version": "1.0.28",
3
+ "version": "1.0.30",
4
4
  "description": "Base theme for Marketing Sites",
5
5
  "author": "smarcet",
6
6
  "keywords": [
@@ -15,7 +15,7 @@
15
15
  "format": "prettier --trailing-comma es5 --no-semi --single-quote --write \"{gatsby-*.js,src/**/*.js}\"",
16
16
  "prepare": "husky",
17
17
  "lint": "eslint src",
18
- "precommit": "npx lint-staged --diff=origin/main --verbose",
18
+ "precommit": "yarn lint-staged --verbose",
19
19
  "rewrite_rules": "NODE_ENV=development node redirection-rules.js"
20
20
  },
21
21
  "lint-staged": {
@@ -23,7 +23,9 @@
23
23
  "**/*": "prettier --write --ignore-unknown"
24
24
  },
25
25
  "dependencies": {
26
- "@babel/core": "^7.12.3",
26
+ "@babel/core": "^7.26.10",
27
+ "@babel/preset-env": "^7.26.9",
28
+ "@babel/preset-react": "^7.26.3",
27
29
  "@emotion/cache": "^11.11.0",
28
30
  "@emotion/react": "^11.11.4",
29
31
  "@emotion/server": "^11.11.0",
@@ -152,13 +154,17 @@
152
154
  "yup": "^0.32.11"
153
155
  },
154
156
  "devDependencies": {
157
+ "@babel/eslint-parser": "^7.27.0",
158
+ "babel-preset-gatsby": "^3.14.0",
155
159
  "eslint": "^7.32.0 || ^8.2.0",
156
160
  "eslint-config-airbnb": "^19.0.4",
161
+ "eslint-config-prettier": "^9.1.0",
157
162
  "eslint-plugin-import": "^2.25.3",
158
163
  "eslint-plugin-jsx-a11y": "^6.5.1",
159
164
  "eslint-plugin-only-warn": "^1.1.0",
160
165
  "eslint-plugin-react": "^7.28.0",
161
166
  "eslint-plugin-react-hooks": "^4.3.0",
167
+ "eslint-plugin-unused-imports": "^4.1.4",
162
168
  "husky": "^9.0.11",
163
169
  "lint-staged": "^15.1.0",
164
170
  "prettier": "^2.0.5"
@@ -4,13 +4,14 @@ import siteSettings from "./siteSettings";
4
4
  import navbar from "./navbar";
5
5
  import footer from "./footer";
6
6
  import announcementBanner from "./announcementBanner";
7
+ import siteBanner from "./siteBanner";
7
8
 
8
9
  const configurationsCollection = {
9
10
  ...collectionDefaults({
10
11
  label: "Configurations",
11
- name: "configurations",
12
+ name: "configurations"
12
13
  }),
13
- files: [siteSettings, navbar, footer, announcementBanner],
14
+ files: [siteSettings, navbar, footer, announcementBanner, siteBanner]
14
15
  };
15
16
 
16
17
  export default configurationsCollection;
@@ -0,0 +1,32 @@
1
+ import { SITE_BANNER_FILE_PATH } from "@utils/filePath";
2
+ import { stringField, textField, booleanField } from "../../../fields";
3
+
4
+ const siteBanner = {
5
+ label: "Site Banner",
6
+ name: "site-banner",
7
+ file: SITE_BANNER_FILE_PATH,
8
+ fields: [
9
+ textField({
10
+ label: "Text",
11
+ name: "text",
12
+ required: true
13
+ }),
14
+ stringField({
15
+ label: "CTA Title",
16
+ name: "cta_title",
17
+ required: true
18
+ }),
19
+ stringField({
20
+ label: "CTA Link",
21
+ name: "cta_link",
22
+ required: true
23
+ }),
24
+ booleanField({
25
+ label: "Display",
26
+ name: "display",
27
+ required: false
28
+ })
29
+ ]
30
+ };
31
+
32
+ export default siteBanner;
@@ -0,0 +1,7 @@
1
+ module.exports = `
2
+ type SiteBannerJson implements Node {
3
+ text: String
4
+ cta_title: String
5
+ cta_link: String
6
+ }
7
+ `;
@@ -1,9 +1,11 @@
1
1
  const siteSettingsTypeDefs = require("./siteSettings/typeDefs");
2
2
  const footerTypeDefs = require("./footer/typeDefs");
3
3
  const announcementBannerTypeDefs = require("./announcementBanner/typeDefs");
4
+ const siteBannerTypeDefs = require("./siteBanner/typeDefs");
4
5
 
5
6
  module.exports = [
6
7
  siteSettingsTypeDefs,
7
8
  footerTypeDefs,
8
- announcementBannerTypeDefs
9
+ announcementBannerTypeDefs,
10
+ siteBannerTypeDefs
9
11
  ].join("");
@@ -1,11 +1,9 @@
1
1
  import configurationsCollection from "./collections/configurationsCollection";
2
2
 
3
3
  const CMS_BACKEND_REPO = process.env.GATSBY_CMS_BACKEND_REPO;
4
- const CMS_BACKEND_BRANCH = process.env.GATSBY_CMS_BACKEND_BRANCH || "main";
4
+ const CMS_BACKEND_BRANCH = process.env.GATSBY_CMS_BACKEND_BRANCH || "main";
5
5
 
6
- export const collections = [
7
- configurationsCollection,
8
- ];
6
+ export const collections = [configurationsCollection];
9
7
 
10
8
  const config = {
11
9
  backend: {
@@ -17,7 +15,7 @@ const config = {
17
15
  update: "Update {{collection}} “{{slug}}”",
18
16
  delete: "Delete {{collection}} “{{slug}}”",
19
17
  uploadMedia: "[skip ci] Upload “{{path}}”",
20
- deleteMedia: "[skip ci] Delete “{{path}}”",
18
+ deleteMedia: "[skip ci] Delete “{{path}}”"
21
19
  }
22
20
  },
23
21
  // It is not required to set `load_config_file` if the `config.yml` file is
@@ -25,7 +23,7 @@ const config = {
25
23
  load_config_file: false,
26
24
  media_folder: "static/img",
27
25
  public_folder: "/img",
28
- collections: collections
26
+ collections
29
27
  };
30
28
 
31
29
  if (!CMS_BACKEND_REPO || !CMS_BACKEND_BRANCH) {
@@ -3,7 +3,7 @@
3
3
  color: #ffffff;
4
4
  font-size: 12px;
5
5
  font-family: "Open Sans", Helvetica, Arial, sans-serif !important;
6
- padding: 30px 40px;
6
+ padding: 30px;
7
7
  max-width: 1500px;
8
8
  border-radius: 4px;
9
9
  justify-content: space-evenly;
@@ -20,42 +20,46 @@
20
20
 
21
21
  .header {
22
22
  text-align: center;
23
+ display: flex;
24
+ align-items: center;
25
+ justify-content: center;
26
+ margin-bottom: 10px;
23
27
 
24
28
  @media (min-width: 900px) {
25
29
  text-align: left;
30
+ justify-content: flex-start;
26
31
  }
27
32
 
28
33
  .title {
29
- font-size: 35px;
30
- display: inline-block;
31
- bottom: 6px;
32
- position: relative;
34
+ font-size: 18px;
35
+ line-height: 1.3;
33
36
  font-family: "Jura", "Helvetica", sans-serif;
34
37
  font-weight: 700;
35
- vertical-align: middle;
36
- margin-bottom: 10px;
37
- margin-top: 20px;
38
+ margin: 0;
39
+ display: flex;
40
+ align-items: center;
41
+ @media (max-width: 900px) {
42
+ text-align: left;
43
+ justify-content: flex-start;
44
+ }
38
45
  }
39
46
 
40
47
  .logo {
41
- position: relative;
42
48
  height: 50px;
43
49
  width: 50px;
50
+ margin: 0 20px 0 0;
44
51
  display: block;
45
- margin: 0 auto 10px;
46
52
 
47
53
  @media (min-width: 1024px) {
48
- top: 20px;
49
- margin: 0 20px 0 0;
50
- display: inline;
54
+ top: 0;
51
55
  }
52
56
  }
53
57
  }
54
58
 
55
59
  .text {
56
60
  padding-top: 15px;
57
- font-size: 18px;
58
- line-height: 25px;
61
+ font-size: 15px;
62
+ line-height: normal;
59
63
  font-family: "Roboto", "Helvetica", sans-serif;
60
64
  font-style: normal;
61
65
  font-weight: normal;
@@ -65,29 +69,45 @@
65
69
  .ctaTitle {
66
70
  font-family: "Roboto", "Helvetica", sans-serif;
67
71
  font-style: normal;
68
- font-size: 18px;
69
- line-height: 25px;
72
+ font-size: 15px;
73
+ line-height: normal;
70
74
  text-align: center;
71
- margin-bottom: 15px;
75
+ margin-bottom: 5px;
72
76
  font-weight: bold;
73
77
  margin-top: 10%;
78
+
79
+ // if ctaTitle is empty, hide the element completely
80
+ &:empty {
81
+ display: none;
82
+ margin: 0;
83
+ }
84
+ }
85
+
86
+ :global(.MuiGrid-root) {
87
+ &:has(.cta) {
88
+ display: flex;
89
+ align-items: center;
90
+ height: 100%;
91
+ }
74
92
  }
75
93
 
76
94
  .cta {
77
95
  background-color: #39ae4a;
78
- width: 250px;
79
- font-size: 20px;
80
- min-width: 155px;
81
- padding: 1rem;
96
+ width: 215px;
97
+ font-size: 15px;
98
+ min-width: 150px;
99
+ padding: 10px;
82
100
  border-radius: 50px;
83
- margin-left: auto;
84
- margin-right: auto;
101
+ margin: auto;
85
102
  text-align: center;
86
103
  white-space: nowrap;
87
104
  display: block;
88
105
  color: white;
89
106
  text-decoration: none;
90
-
107
+ // when ctaTitle is empty, adjust margin
108
+ .ctaTitle:empty + & {
109
+ margin: auto;
110
+ }
91
111
  &:hover {
92
112
  background-color: white;
93
113
  color: black;
@@ -102,6 +122,9 @@
102
122
  .img {
103
123
  margin-left: 10px;
104
124
  }
125
+ @media (max-width: 900px) {
126
+ margin-top: 10px;
127
+ }
105
128
  }
106
129
 
107
130
  .bottomBar {
@@ -0,0 +1,22 @@
1
+ import React from "react";
2
+ import { useStaticQuery, graphql } from "gatsby";
3
+ import SiteBannerTemplate from "./template";
4
+
5
+ const siteBannerQuery = graphql`
6
+ query {
7
+ siteBannerJson {
8
+ text
9
+ cta_title
10
+ cta_link
11
+ display
12
+ }
13
+ }
14
+ `;
15
+
16
+ function SiteBanner() {
17
+ const { siteBannerJson: siteBannerContent } = useStaticQuery(siteBannerQuery);
18
+
19
+ return <SiteBannerTemplate data={siteBannerContent} />;
20
+ }
21
+
22
+ export default SiteBanner;
@@ -0,0 +1,69 @@
1
+ .siteBannerWrapper {
2
+ display: flex;
3
+ min-height: 40px;
4
+ position: relative;
5
+ left: 0;
6
+ z-index: 20;
7
+ background-color: #4d96c7;
8
+ color: #f0f9fe;
9
+ font-size: 14px;
10
+ line-height: 20px;
11
+ .siteBannerContainer {
12
+ display: flex;
13
+ flex-direction: row;
14
+ text-align: left;
15
+ align-items: center;
16
+ }
17
+ .bannerText {
18
+ display: inline;
19
+ font-size: 16px;
20
+ line-height: 22px;
21
+ letter-spacing: normal;
22
+ max-width: 734px;
23
+ color: white;
24
+ font-size: 12px;
25
+ font-family: "Open Sans", Helvetica, Arial, sans-serif;
26
+ -webkit-font-smoothing: none;
27
+ -moz-osx-font-smoothing: none;
28
+ text-rendering: auto;
29
+ @media (min-width: 991px) {
30
+ font-size: 16px;
31
+ }
32
+ }
33
+ .bannerButton {
34
+ margin-left: 20px;
35
+ border-radius: 5px;
36
+ border: 1px solid #2f729c;
37
+ padding: 2px 10px 3px;
38
+ background-color: #2f729c;
39
+ display: inline-block;
40
+ text-transform: uppercase;
41
+ font-family: "Open Sans", Helvetica, Arial, sans-serif;
42
+ font-size: 14px;
43
+ line-height: 20px;
44
+ letter-spacing: normal;
45
+ @media (max-width: 574px) {
46
+ width: 100px;
47
+ margin: 5px;
48
+ }
49
+ &:hover {
50
+ text-decoration: none;
51
+ background-color: #f0f9fe;
52
+ a {
53
+ color: #2f729c;
54
+ -webkit-font-smoothing: none;
55
+ -moz-osx-font-smoothing: none;
56
+ text-rendering: auto;
57
+ }
58
+ }
59
+ a {
60
+ color: white;
61
+ font-size: 90%;
62
+ line-height: 20px;
63
+ letter-spacing: normal;
64
+ -webkit-font-smoothing: none;
65
+ -moz-osx-font-smoothing: none;
66
+ text-rendering: auto;
67
+ }
68
+ }
69
+ }
@@ -0,0 +1,26 @@
1
+ import React from "react";
2
+ import { Container, Typography, Button } from "@mui/material";
3
+ import Link from "../Link";
4
+
5
+ import styles from "./index.module.scss";
6
+
7
+ function SiteBannerTemplate({ data }) {
8
+ const { text, cta_title, cta_link, display } = data || {};
9
+ if (!display) return null;
10
+
11
+ return (
12
+ <div className={styles.siteBannerWrapper}>
13
+ <Container maxWidth="xl" className={styles.siteBannerContainer}>
14
+ <Typography
15
+ dangerouslySetInnerHTML={{ __html: text }}
16
+ className={styles.bannerText}
17
+ />
18
+ <Button className={styles.bannerButton}>
19
+ <Link to={cta_link}>{cta_title}</Link>
20
+ </Button>
21
+ </Container>
22
+ </div>
23
+ );
24
+ }
25
+
26
+ export default SiteBannerTemplate;
@@ -0,0 +1,36 @@
1
+ import React from "react";
2
+ import PropTypes from "prop-types";
3
+ import loadable from "@loadable/component";
4
+ import Footer from "./Footer";
5
+ import SponsoredProjectsNav from "./SponsoredProjectsNav";
6
+ import SubscribeForm from "./SubscribeForm";
7
+ import NavBarPlaceholder from "./Navbar/placeholder";
8
+ import SiteBanner from "./SiteBanner";
9
+
10
+ const Navbar = loadable(() => import("./Navbar"), {
11
+ ssr: false,
12
+ fallback: <NavBarPlaceholder />
13
+ });
14
+
15
+ function SiteBannerLayout({ children }) {
16
+ return (
17
+ <div>
18
+ <SponsoredProjectsNav />
19
+ <SiteBanner />
20
+ <Navbar />
21
+ <div>
22
+ <main id="content-wrapper">
23
+ {children}
24
+ <SubscribeForm />
25
+ </main>
26
+ <Footer />
27
+ </div>
28
+ </div>
29
+ );
30
+ }
31
+
32
+ SiteBannerLayout.propTypes = {
33
+ children: PropTypes.node.isRequired
34
+ };
35
+
36
+ export default SiteBannerLayout;
@@ -0,0 +1,6 @@
1
+ {
2
+ "text": "Join the OpenInfra Summit Europe in Paris, Oct 17-19! Registration, CFP & Sponsorships are Open!",
3
+ "cta_title": "Join Us!",
4
+ "cta_link": "https://summit2025.openinfra.org/",
5
+ "display": true
6
+ }
@@ -10,6 +10,8 @@ const COLORS_SASS_FILE_PATH = `${STYLES_DIR_PATH}/colors.scss`;
10
10
  const FONTS_SCSS_FILE_PATH = `${STYLES_DIR_PATH}/fonts.scss`;
11
11
  const SITE_SETTINGS_DIR_PATH = `${STATIC_CONTENT_DIR_PATH}/site-settings`;
12
12
  const SITE_SETTINGS_FILE_PATH = `${SITE_SETTINGS_DIR_PATH}/index.json`;
13
+ const SITE_BANNER_DIR_PATH = `${STATIC_CONTENT_DIR_PATH}/site-banner`;
14
+ const SITE_BANNER_FILE_PATH = `${SITE_BANNER_DIR_PATH}/index.json`;
13
15
  const MARKETING_PAGE_DIR_PATH = `${STATIC_CONTENT_DIR_PATH}/marketing-page`;
14
16
  const MARKETING_PAGE_FILE_PATH = `${MARKETING_PAGE_DIR_PATH}/index.json`;
15
17
  const LOBBY_PAGE_DIR_PATH = `${STATIC_CONTENT_DIR_PATH}/lobby-page`;
@@ -43,7 +45,8 @@ const SPONSORS_FILE_PATH = `${STATIC_CONTENT_DIR_PATH}/${SPONSORS_FILE_NAME}`;
43
45
  const CMS_FONT_FILE_PATH = "/static/fonts/";
44
46
  const PAYMENTS_FILE_PATH = `${STATIC_CONTENT_DIR_PATH}/payments.json`;
45
47
  const APPLE_PAY_DOMAIN_FILE_PATH = "/static/.well-known/";
46
- const APPLE_PAY_DOMAIN_FILE_NAME = "apple-developer-merchantid-domain-association";
48
+ const APPLE_PAY_DOMAIN_FILE_NAME =
49
+ "apple-developer-merchantid-domain-association";
47
50
 
48
51
  exports.REQUIRED_DIR_PATHS = [
49
52
  DATA_DIR_PATH,
@@ -52,7 +55,7 @@ exports.REQUIRED_DIR_PATHS = [
52
55
  STYLES_DIR_PATH,
53
56
  SITE_SETTINGS_DIR_PATH,
54
57
  NAVBAR_DIR_PATH,
55
- FOOTER_DIR_PATH,
58
+ FOOTER_DIR_PATH
56
59
  ];
57
60
 
58
61
  exports.DATA_DIR_PATH = DATA_DIR_PATH;
@@ -63,6 +66,7 @@ exports.COLORS_SASS_FILE_PATH = COLORS_SASS_FILE_PATH;
63
66
  exports.FONTS_SCSS_FILE_PATH = FONTS_SCSS_FILE_PATH;
64
67
  exports.SITE_SETTINGS_DIR_PATH = SITE_SETTINGS_DIR_PATH;
65
68
  exports.SITE_SETTINGS_FILE_PATH = SITE_SETTINGS_FILE_PATH;
69
+ exports.SITE_BANNER_FILE_PATH = SITE_BANNER_FILE_PATH;
66
70
  exports.CONTENT_PAGES_DIR_PATH = CONTENT_PAGES_DIR_PATH;
67
71
  exports.MARKETING_PAGE_FILE_PATH = MARKETING_PAGE_FILE_PATH;
68
72
  exports.LOBBY_PAGE_FILE_PATH = LOBBY_PAGE_FILE_PATH;