@openstack_dev/gatsby-theme-marketing-oif-core 1.0.6 → 1.0.8
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-browser.js +2 -2
- package/gatsby-config.js +5 -4
- package/package.json +1 -1
- package/src/components/Layout.js +17 -11
- package/src/components/Navbar/index.js +347 -330
- package/src/components/Seo.js +1 -1
- package/src/content/site-settings/index.json +1 -1
- package/src/state/ReduxWrapper.js +1 -28
- package/src/state/store.js +1 -3
- package/src/state/storage.js +0 -21
package/gatsby-browser.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import ReduxWrapper from "./src/state/ReduxWrapper";
|
|
2
2
|
|
|
3
|
-
export const wrapRootElement =
|
|
3
|
+
export const wrapRootElement = ReduxWrapper;
|
|
4
4
|
|
|
5
5
|
export const onClientEntry = () => {};
|
package/gatsby-config.js
CHANGED
|
@@ -17,8 +17,6 @@ try {
|
|
|
17
17
|
console.log("Falling back to default site settings.");
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
console.log("loaded siteSettings on gatsby config ...", siteSettings);
|
|
21
|
-
|
|
22
20
|
const title = siteSettings?.siteMetadata?.title || process.env.GATSBY_METADATA_TITLE;
|
|
23
21
|
const description = siteSettings?.siteMetadata?.description
|
|
24
22
|
|| process.env.GATSBY_METADATA_DESCRIPTION;
|
|
@@ -217,12 +215,15 @@ const plugins = [
|
|
|
217
215
|
"gatsby-plugin-netlify", // make sure to keep it last in the array
|
|
218
216
|
];
|
|
219
217
|
|
|
220
|
-
console.log(`title ${title} description ${description}`);
|
|
221
|
-
|
|
222
218
|
module.exports = {
|
|
223
219
|
siteMetadata: {
|
|
224
220
|
title,
|
|
225
221
|
description,
|
|
226
222
|
},
|
|
227
223
|
plugins,
|
|
224
|
+
/*
|
|
225
|
+
flags: {
|
|
226
|
+
DEV_SSR: true,
|
|
227
|
+
},
|
|
228
|
+
*/
|
|
228
229
|
};
|
package/package.json
CHANGED
package/src/components/Layout.js
CHANGED
|
@@ -1,27 +1,33 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import PropTypes from "prop-types";
|
|
3
|
+
import CssBaseline from "@mui/material/CssBaseline";
|
|
4
|
+
import { ThemeProvider } from "@mui/material/styles";
|
|
3
5
|
import Footer from "./Footer";
|
|
4
6
|
import SponsoredProjectsNav from "./SponsoredProjectsNav";
|
|
5
7
|
import SubscribeForm from "./SubscribeForm";
|
|
6
8
|
import AnnouncementBanner from "./AnnouncementBanner";
|
|
7
9
|
import Header from "./Header";
|
|
8
10
|
import Navbar from "./Navbar";
|
|
11
|
+
import theme from "../theme";
|
|
9
12
|
|
|
10
13
|
function Layout({ children }) {
|
|
11
14
|
return (
|
|
12
|
-
<
|
|
13
|
-
<
|
|
14
|
-
<Navbar />
|
|
15
|
+
<ThemeProvider theme={theme}>
|
|
16
|
+
<CssBaseline />
|
|
15
17
|
<div>
|
|
16
|
-
<
|
|
17
|
-
<
|
|
18
|
-
<
|
|
19
|
-
|
|
20
|
-
<
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
<SponsoredProjectsNav />
|
|
19
|
+
<Navbar />
|
|
20
|
+
<div>
|
|
21
|
+
<Header />
|
|
22
|
+
<AnnouncementBanner />
|
|
23
|
+
<main id="content-wrapper">
|
|
24
|
+
{children}
|
|
25
|
+
<SubscribeForm />
|
|
26
|
+
</main>
|
|
27
|
+
<Footer />
|
|
28
|
+
</div>
|
|
23
29
|
</div>
|
|
24
|
-
</
|
|
30
|
+
</ThemeProvider>
|
|
25
31
|
);
|
|
26
32
|
}
|
|
27
33
|
|
|
@@ -28,6 +28,11 @@ function Navbar({ isLoggedUser, member }) {
|
|
|
28
28
|
const [navbarMenu, setNavbarMenu] = React.useState(null);
|
|
29
29
|
const [isMobileMenuOpen, setIsMobileMenuOpen] = React.useState(false);
|
|
30
30
|
const [isSearchBarOpen, setIsSearchBarOpen] = React.useState(false);
|
|
31
|
+
const [domLoaded, setDomLoaded] = React.useState(false);
|
|
32
|
+
|
|
33
|
+
React.useEffect(() => {
|
|
34
|
+
setDomLoaded(true);
|
|
35
|
+
}, []);
|
|
31
36
|
|
|
32
37
|
const handleSetActiveMenu = (option) => {
|
|
33
38
|
setNavbarMenu(navbarMenu === option ? null : option);
|
|
@@ -73,381 +78,393 @@ function Navbar({ isLoggedUser, member }) {
|
|
|
73
78
|
};
|
|
74
79
|
|
|
75
80
|
return (
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
81
|
+
<>
|
|
82
|
+
{domLoaded && (
|
|
83
|
+
<nav role="navigation">
|
|
84
|
+
<Script
|
|
85
|
+
src={`${getEnvVariable(
|
|
86
|
+
SEARCH_WIDGET_BASE_URL,
|
|
87
|
+
)}/widget/embed.min.js`}
|
|
88
|
+
onLoad={() => console.log("Script loaded")}
|
|
89
|
+
/>
|
|
90
|
+
<AppBar
|
|
91
|
+
position="static"
|
|
92
|
+
className={styles.navbar}
|
|
93
|
+
sx={{ backgroundColor: "#fff", boxShadow: "none" }}
|
|
94
|
+
>
|
|
95
|
+
<Container maxWidth="xl">
|
|
96
|
+
<Toolbar disableGutters sx={{ flexWrap: "wrap" }}>
|
|
97
|
+
<Box className={styles.navbarHeader}>
|
|
98
|
+
<div className={styles.brandWrapper}>
|
|
99
|
+
<a
|
|
100
|
+
className={styles.navbarBrand}
|
|
101
|
+
href="/"
|
|
102
|
+
alt="Openstack logo"
|
|
103
|
+
aria-label="Go to homepage"
|
|
104
|
+
/>
|
|
105
|
+
</div>
|
|
106
|
+
<Box
|
|
107
|
+
className={styles.searchWrapper}
|
|
108
|
+
sx={{ display: { xs: "none", md: "flex" } }}
|
|
109
|
+
>
|
|
110
|
+
<div
|
|
111
|
+
role="button"
|
|
112
|
+
tabIndex={0}
|
|
113
|
+
onKeyDown={(event) => {
|
|
114
|
+
if (event.key === "Enter" || event.key === " ") setIsSearchBarOpen(true);
|
|
115
|
+
}}
|
|
116
|
+
onClick={() => setIsSearchBarOpen(true)}
|
|
117
|
+
className={styles.searchComponent}
|
|
118
|
+
>
|
|
119
|
+
<SearchIcon className={styles.searchIcon} />
|
|
120
|
+
<span className={styles.headerSearchText}>Search</span>
|
|
121
|
+
</div>
|
|
122
|
+
<Box
|
|
123
|
+
className={`openstack-search-bar ${styles.openstackSearchBar}`}
|
|
124
|
+
style={{
|
|
125
|
+
visibility: isSearchBarOpen ? "visible" : "hidden",
|
|
126
|
+
opacity: isSearchBarOpen ? "1" : "0",
|
|
127
|
+
}}
|
|
128
|
+
data-baseurl={getEnvVariable(SEARCH_WIDGET_BASE_URL)}
|
|
129
|
+
data-context="www-openstack"
|
|
130
|
+
/>
|
|
131
|
+
</Box>
|
|
132
|
+
</Box>
|
|
133
|
+
{/* Mobile Menu */}
|
|
134
|
+
<Box
|
|
135
|
+
className={styles.mobileMenuWrapper}
|
|
136
|
+
sx={{ flexGrow: 1, display: { xs: "flex", md: "none" } }}
|
|
109
137
|
>
|
|
110
|
-
<
|
|
111
|
-
|
|
112
|
-
|
|
138
|
+
<IconButton
|
|
139
|
+
className={styles.toggleIcon}
|
|
140
|
+
size="large"
|
|
141
|
+
aria-label="account of current user"
|
|
142
|
+
aria-controls="menu-appbar"
|
|
143
|
+
aria-haspopup="true"
|
|
144
|
+
onClick={() => handleMobileMenuToggle()}
|
|
145
|
+
color="inherit"
|
|
146
|
+
>
|
|
147
|
+
<MenuIcon />
|
|
148
|
+
</IconButton>
|
|
149
|
+
</Box>
|
|
150
|
+
{/* Desktop Menu */}
|
|
113
151
|
<Box
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
152
|
+
sx={{
|
|
153
|
+
flexGrow: 1,
|
|
154
|
+
display: {
|
|
155
|
+
xs: "none",
|
|
156
|
+
md: isSearchBarOpen ? "none" : "flex",
|
|
157
|
+
},
|
|
158
|
+
justifyContent: "flex-end",
|
|
118
159
|
}}
|
|
119
|
-
data-baseurl={getEnvVariable(SEARCH_WIDGET_BASE_URL)}
|
|
120
|
-
data-context="www-openstack"
|
|
121
|
-
/>
|
|
122
|
-
</Box>
|
|
123
|
-
</Box>
|
|
124
|
-
{/* Mobile Menu */}
|
|
125
|
-
<Box
|
|
126
|
-
className={styles.mobileMenuWrapper}
|
|
127
|
-
sx={{ flexGrow: 1, display: { xs: "flex", md: "none" } }}
|
|
128
|
-
>
|
|
129
|
-
<IconButton
|
|
130
|
-
className={styles.toggleIcon}
|
|
131
|
-
size="large"
|
|
132
|
-
aria-label="account of current user"
|
|
133
|
-
aria-controls="menu-appbar"
|
|
134
|
-
aria-haspopup="true"
|
|
135
|
-
onClick={() => handleMobileMenuToggle()}
|
|
136
|
-
color="inherit"
|
|
137
|
-
>
|
|
138
|
-
<MenuIcon />
|
|
139
|
-
</IconButton>
|
|
140
|
-
</Box>
|
|
141
|
-
{/* Desktop Menu */}
|
|
142
|
-
<Box
|
|
143
|
-
sx={{
|
|
144
|
-
flexGrow: 1,
|
|
145
|
-
display: { xs: "none", md: isSearchBarOpen ? "none" : "flex" },
|
|
146
|
-
justifyContent: "flex-end",
|
|
147
|
-
}}
|
|
148
|
-
>
|
|
149
|
-
{navbarContent.items.map(
|
|
150
|
-
(item) => item.display && (
|
|
151
|
-
<Button
|
|
152
|
-
className={styles.navbarOption}
|
|
153
|
-
key={item.title}
|
|
154
|
-
sx={{ my: 2, display: "block" }}
|
|
155
|
-
disableRipple
|
|
156
|
-
onClick={() => handleNavigation(item.link)}
|
|
157
|
-
>
|
|
158
|
-
{item.items?.length > 0 ? (
|
|
159
|
-
<>
|
|
160
|
-
{item.title}
|
|
161
|
-
<ArrowDropDownIcon className={styles.arrowDownIcon} />
|
|
162
|
-
<Box className={styles.dropDownMenu}>
|
|
163
|
-
{item.items.map((subItem) => (!subItem.title && !subItem.link ? (
|
|
164
|
-
<div className={styles.divider} />
|
|
165
|
-
) : (
|
|
166
|
-
<Button
|
|
167
|
-
className={styles.dropdownMenuOption}
|
|
168
|
-
key={subItem.title}
|
|
169
|
-
onClick={() => handleNavigation(subItem.link)}
|
|
170
|
-
sx={{ display: "block" }}
|
|
171
|
-
disableRipple
|
|
172
|
-
>
|
|
173
|
-
{subItem.title}
|
|
174
|
-
</Button>
|
|
175
|
-
)))}
|
|
176
|
-
</Box>
|
|
177
|
-
</>
|
|
178
|
-
) : (
|
|
179
|
-
item.title
|
|
180
|
-
)}
|
|
181
|
-
</Button>
|
|
182
|
-
),
|
|
183
|
-
)}
|
|
184
|
-
</Box>
|
|
185
|
-
{isLoggedUser ? (
|
|
186
|
-
<Box
|
|
187
|
-
maxWidth="15%"
|
|
188
|
-
sx={{
|
|
189
|
-
display: {
|
|
190
|
-
xs: "none",
|
|
191
|
-
md: isSearchBarOpen ? "none" : "flex",
|
|
192
|
-
},
|
|
193
|
-
justifyContent: "flex-end",
|
|
194
|
-
marginLeft: "auto",
|
|
195
|
-
}}
|
|
196
|
-
>
|
|
197
|
-
<Button
|
|
198
|
-
className={`${styles.navbarOption}`}
|
|
199
|
-
sx={{ my: 2, display: "block" }}
|
|
200
|
-
disableRipple
|
|
201
160
|
>
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
<Box className={styles.dropDownMenu}>
|
|
161
|
+
{navbarContent.items.map(
|
|
162
|
+
(item) => item.display && (
|
|
205
163
|
<Button
|
|
206
|
-
className={styles.
|
|
207
|
-
|
|
208
|
-
sx={{ display: "block" }}
|
|
164
|
+
className={styles.navbarOption}
|
|
165
|
+
key={item.title}
|
|
166
|
+
sx={{ my: 2, display: "block" }}
|
|
209
167
|
disableRipple
|
|
168
|
+
onClick={() => handleNavigation(item.link)}
|
|
210
169
|
>
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
170
|
+
{item.items?.length > 0 ? (
|
|
171
|
+
<>
|
|
172
|
+
{item.title}
|
|
173
|
+
<ArrowDropDownIcon
|
|
174
|
+
className={styles.arrowDownIcon}
|
|
175
|
+
/>
|
|
176
|
+
<Box className={styles.dropDownMenu}>
|
|
177
|
+
{item.items.map((subItem) => (!subItem.title && !subItem.link ? (
|
|
178
|
+
<div className={styles.divider} />
|
|
179
|
+
) : (
|
|
180
|
+
<Button
|
|
181
|
+
className={styles.dropdownMenuOption}
|
|
182
|
+
key={subItem.title}
|
|
183
|
+
onClick={() => handleNavigation(subItem.link)}
|
|
184
|
+
sx={{ display: "block" }}
|
|
185
|
+
disableRipple
|
|
186
|
+
>
|
|
187
|
+
{subItem.title}
|
|
188
|
+
</Button>
|
|
189
|
+
)))}
|
|
190
|
+
</Box>
|
|
191
|
+
</>
|
|
192
|
+
) : (
|
|
193
|
+
item.title
|
|
219
194
|
)}
|
|
220
|
-
sx={{ display: "block" }}
|
|
221
|
-
disableRipple
|
|
222
|
-
>
|
|
223
|
-
View Public Profile
|
|
224
195
|
</Button>
|
|
225
|
-
|
|
196
|
+
),
|
|
197
|
+
)}
|
|
198
|
+
</Box>
|
|
199
|
+
{isLoggedUser ? (
|
|
200
|
+
<Box
|
|
201
|
+
maxWidth="15%"
|
|
202
|
+
sx={{
|
|
203
|
+
display: {
|
|
204
|
+
xs: "none",
|
|
205
|
+
md: isSearchBarOpen ? "none" : "flex",
|
|
206
|
+
},
|
|
207
|
+
justifyContent: "flex-end",
|
|
208
|
+
marginLeft: "auto",
|
|
209
|
+
}}
|
|
210
|
+
>
|
|
226
211
|
<Button
|
|
227
|
-
className={styles.
|
|
228
|
-
sx={{ display: "block" }}
|
|
229
|
-
onClick={onClickLogout}
|
|
212
|
+
className={`${styles.navbarOption}`}
|
|
213
|
+
sx={{ my: 2, display: "block" }}
|
|
230
214
|
disableRipple
|
|
231
215
|
>
|
|
232
|
-
|
|
216
|
+
My Account
|
|
217
|
+
<ArrowDropDownIcon className={styles.arrowDownIcon} />
|
|
218
|
+
<Box className={styles.dropDownMenu}>
|
|
219
|
+
<Button
|
|
220
|
+
className={styles.dropdownMenuOption}
|
|
221
|
+
onClick={() => handleNavigation("/profile/")}
|
|
222
|
+
sx={{ display: "block" }}
|
|
223
|
+
disableRipple
|
|
224
|
+
>
|
|
225
|
+
Edit Profile
|
|
226
|
+
</Button>
|
|
227
|
+
<Button
|
|
228
|
+
className={styles.dropdownMenuOption}
|
|
229
|
+
onClick={() => handleNavigation(
|
|
230
|
+
`/community/members/profile/${
|
|
231
|
+
member.id
|
|
232
|
+
}/${`${member.first_name.toLowerCase()}-${member.last_name.toLowerCase()}`}`,
|
|
233
|
+
)}
|
|
234
|
+
sx={{ display: "block" }}
|
|
235
|
+
disableRipple
|
|
236
|
+
>
|
|
237
|
+
View Public Profile
|
|
238
|
+
</Button>
|
|
239
|
+
<div className={styles.divider} />
|
|
240
|
+
<Button
|
|
241
|
+
className={styles.dropdownMenuOption}
|
|
242
|
+
sx={{ display: "block" }}
|
|
243
|
+
onClick={onClickLogout}
|
|
244
|
+
disableRipple
|
|
245
|
+
>
|
|
246
|
+
Log out
|
|
247
|
+
</Button>
|
|
248
|
+
</Box>
|
|
233
249
|
</Button>
|
|
234
250
|
</Box>
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
}}
|
|
248
|
-
>
|
|
249
|
-
<Button
|
|
250
|
-
className={`${styles.navbarOption} ${styles.join}`}
|
|
251
|
-
sx={{ my: 2, display: "block" }}
|
|
252
|
-
disableRipple
|
|
253
|
-
>
|
|
254
|
-
Join
|
|
255
|
-
<ArrowDropDownIcon className={styles.arrowDownIcon} />
|
|
256
|
-
<Box className={styles.dropDownMenu}>
|
|
257
|
-
<Button
|
|
258
|
-
className={styles.dropdownMenuOption}
|
|
259
|
-
onClick={() => handleNavigation("https://openinfra.dev/join")}
|
|
260
|
-
sx={{ display: "block" }}
|
|
261
|
-
disableRipple
|
|
262
|
-
>
|
|
263
|
-
Sign up for Foundation Membership
|
|
264
|
-
</Button>
|
|
251
|
+
) : (
|
|
252
|
+
<Box
|
|
253
|
+
maxWidth="15%"
|
|
254
|
+
sx={{
|
|
255
|
+
display: {
|
|
256
|
+
xs: "none",
|
|
257
|
+
md: isSearchBarOpen ? "none" : "flex",
|
|
258
|
+
},
|
|
259
|
+
justifyContent: "flex-end",
|
|
260
|
+
marginLeft: "auto",
|
|
261
|
+
}}
|
|
262
|
+
>
|
|
265
263
|
<Button
|
|
266
|
-
className={styles.
|
|
267
|
-
|
|
268
|
-
sx={{ display: "block" }}
|
|
264
|
+
className={`${styles.navbarOption} ${styles.join}`}
|
|
265
|
+
sx={{ my: 2, display: "block" }}
|
|
269
266
|
disableRipple
|
|
270
267
|
>
|
|
271
|
-
|
|
268
|
+
Join
|
|
269
|
+
<ArrowDropDownIcon className={styles.arrowDownIcon} />
|
|
270
|
+
<Box className={styles.dropDownMenu}>
|
|
271
|
+
<Button
|
|
272
|
+
className={styles.dropdownMenuOption}
|
|
273
|
+
onClick={() => handleNavigation("https://openinfra.dev/join")}
|
|
274
|
+
sx={{ display: "block" }}
|
|
275
|
+
disableRipple
|
|
276
|
+
>
|
|
277
|
+
Sign up for Foundation Membership
|
|
278
|
+
</Button>
|
|
279
|
+
<Button
|
|
280
|
+
className={styles.dropdownMenuOption}
|
|
281
|
+
onClick={() => handleNavigation("https://openinfra.dev/join")}
|
|
282
|
+
sx={{ display: "block" }}
|
|
283
|
+
disableRipple
|
|
284
|
+
>
|
|
285
|
+
Sponsor the Foundation
|
|
286
|
+
</Button>
|
|
287
|
+
<Button
|
|
288
|
+
className={styles.dropdownMenuOption}
|
|
289
|
+
onClick={() => handleNavigation("https://openinfra.dev")}
|
|
290
|
+
sx={{ display: "block" }}
|
|
291
|
+
disableRipple
|
|
292
|
+
>
|
|
293
|
+
More about the Foundation
|
|
294
|
+
</Button>
|
|
295
|
+
</Box>
|
|
272
296
|
</Button>
|
|
273
297
|
<Button
|
|
274
|
-
className={styles.
|
|
275
|
-
onClick={() =>
|
|
276
|
-
sx={{ display: "block" }}
|
|
298
|
+
className={`${styles.navbarOption} ${styles.login}`}
|
|
299
|
+
onClick={() => doLogin("/")}
|
|
300
|
+
sx={{ my: 2, display: "block" }}
|
|
277
301
|
disableRipple
|
|
278
302
|
>
|
|
279
|
-
|
|
303
|
+
Log in
|
|
280
304
|
</Button>
|
|
281
305
|
</Box>
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
306
|
+
)}
|
|
307
|
+
</Toolbar>
|
|
308
|
+
<Box
|
|
309
|
+
className={`${styles.openstackSearchBarMobile} openstack-search-bar ossw-mobile`}
|
|
310
|
+
sx={{
|
|
311
|
+
visibility: {
|
|
312
|
+
xs: isMobileMenuOpen ? "visible" : "hidden",
|
|
313
|
+
md: "hidden",
|
|
314
|
+
},
|
|
315
|
+
opacity: { xs: isMobileMenuOpen ? "1" : "0", md: "0" },
|
|
316
|
+
height: { xs: isMobileMenuOpen ? "auto" : 0, md: 0 },
|
|
317
|
+
color: "#8a959e",
|
|
318
|
+
}}
|
|
319
|
+
data-baseurl={getEnvVariable(SEARCH_WIDGET_BASE_URL)}
|
|
320
|
+
data-context="www-openstack"
|
|
321
|
+
/>
|
|
322
|
+
{isMobileMenuOpen && (
|
|
323
|
+
<Box
|
|
324
|
+
className={styles.navbarMobileMenu}
|
|
325
|
+
sx={{
|
|
326
|
+
display: { xs: "flex", md: "none" },
|
|
327
|
+
}}
|
|
288
328
|
>
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
)}
|
|
293
|
-
</Toolbar>
|
|
294
|
-
<Box
|
|
295
|
-
className={`${styles.openstackSearchBarMobile} openstack-search-bar ossw-mobile`}
|
|
296
|
-
sx={{
|
|
297
|
-
visibility: {
|
|
298
|
-
xs: isMobileMenuOpen ? "visible" : "hidden",
|
|
299
|
-
md: "hidden",
|
|
300
|
-
},
|
|
301
|
-
opacity: { xs: isMobileMenuOpen ? "1" : "0", md: "0" },
|
|
302
|
-
height: { xs: isMobileMenuOpen ? "auto" : 0, md: 0 },
|
|
303
|
-
color: "#8a959e",
|
|
304
|
-
}}
|
|
305
|
-
data-baseurl={getEnvVariable(SEARCH_WIDGET_BASE_URL)}
|
|
306
|
-
data-context="www-openstack"
|
|
307
|
-
/>
|
|
308
|
-
{isMobileMenuOpen && (
|
|
309
|
-
<Box
|
|
310
|
-
className={styles.navbarMobileMenu}
|
|
311
|
-
sx={{
|
|
312
|
-
display: { xs: "flex", md: "none" },
|
|
313
|
-
}}
|
|
314
|
-
>
|
|
315
|
-
{navbarContent.items.map(
|
|
316
|
-
(item) => item.display && (
|
|
317
|
-
<>
|
|
318
|
-
<Button
|
|
319
|
-
disableRipple
|
|
320
|
-
className={styles.mobileOption}
|
|
321
|
-
key={`${item.title}-mobile`}
|
|
322
|
-
onClick={() => handleSetActiveMenu(item.title)}
|
|
323
|
-
>
|
|
324
|
-
{item.title}
|
|
325
|
-
{item.items?.length > 0
|
|
326
|
-
&& (item.title === navbarMenu ? (
|
|
327
|
-
<RemoveIcon aria-hidden="true" />
|
|
328
|
-
) : (
|
|
329
|
-
<AddIcon aria-hidden="true" />
|
|
330
|
-
))}
|
|
331
|
-
</Button>
|
|
332
|
-
{item.items?.length > 0 && item.title === navbarMenu && (
|
|
333
|
-
<Box className={styles.mobileDropdownMenu}>
|
|
334
|
-
{item.items.map((subItem) => (!subItem.title && !subItem.link ? (
|
|
335
|
-
<div className={styles.divider} />
|
|
336
|
-
) : (
|
|
329
|
+
{navbarContent.items.map(
|
|
330
|
+
(item) => item.display && (
|
|
331
|
+
<>
|
|
337
332
|
<Button
|
|
338
|
-
className={styles.mobileDropdownOption}
|
|
339
|
-
key={subItem.title}
|
|
340
|
-
onClick={() => handleNavigation(subItem.link)}
|
|
341
|
-
sx={{ display: "block" }}
|
|
342
333
|
disableRipple
|
|
334
|
+
className={styles.mobileOption}
|
|
335
|
+
key={`${item.title}-mobile`}
|
|
336
|
+
onClick={() => handleSetActiveMenu(item.title)}
|
|
343
337
|
>
|
|
344
|
-
{
|
|
338
|
+
{item.title}
|
|
339
|
+
{item.items?.length > 0
|
|
340
|
+
&& (item.title === navbarMenu ? (
|
|
341
|
+
<RemoveIcon aria-hidden="true" />
|
|
342
|
+
) : (
|
|
343
|
+
<AddIcon aria-hidden="true" />
|
|
344
|
+
))}
|
|
345
345
|
</Button>
|
|
346
|
-
|
|
347
|
-
|
|
346
|
+
{item.items?.length > 0
|
|
347
|
+
&& item.title === navbarMenu && (
|
|
348
|
+
<Box className={styles.mobileDropdownMenu}>
|
|
349
|
+
{item.items.map((subItem) => (!subItem.title && !subItem.link ? (
|
|
350
|
+
<div className={styles.divider} />
|
|
351
|
+
) : (
|
|
352
|
+
<Button
|
|
353
|
+
className={styles.mobileDropdownOption}
|
|
354
|
+
key={subItem.title}
|
|
355
|
+
onClick={() => handleNavigation(subItem.link)}
|
|
356
|
+
sx={{ display: "block" }}
|
|
357
|
+
disableRipple
|
|
358
|
+
>
|
|
359
|
+
{subItem.title}
|
|
360
|
+
</Button>
|
|
361
|
+
)))}
|
|
362
|
+
</Box>
|
|
363
|
+
)}
|
|
364
|
+
</>
|
|
365
|
+
),
|
|
348
366
|
)}
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
)}
|
|
352
|
-
{isLoggedUser ? (
|
|
353
|
-
<>
|
|
354
|
-
<Button
|
|
355
|
-
className={styles.mobileOption}
|
|
356
|
-
onClick={() => handleSetActiveMenu("My Account")}
|
|
357
|
-
disableRipple
|
|
358
|
-
>
|
|
359
|
-
My Account
|
|
360
|
-
{navbarMenu === "My Account" ? (
|
|
361
|
-
<RemoveIcon aria-hidden="true" />
|
|
362
|
-
) : (
|
|
363
|
-
<AddIcon aria-hidden="true" />
|
|
364
|
-
)}
|
|
365
|
-
</Button>
|
|
366
|
-
{navbarMenu === "My Account" && (
|
|
367
|
-
<Box className={styles.mobileDropdownMenu}>
|
|
367
|
+
{isLoggedUser ? (
|
|
368
|
+
<>
|
|
368
369
|
<Button
|
|
369
|
-
className={styles.
|
|
370
|
-
onClick={() =>
|
|
371
|
-
sx={{ display: "block" }}
|
|
370
|
+
className={styles.mobileOption}
|
|
371
|
+
onClick={() => handleSetActiveMenu("My Account")}
|
|
372
372
|
disableRipple
|
|
373
373
|
>
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
`/community/members/profile/${
|
|
380
|
-
member.id
|
|
381
|
-
}/${`${member.first_name.toLowerCase()}-${member.last_name.toLowerCase()}`}`,
|
|
374
|
+
My Account
|
|
375
|
+
{navbarMenu === "My Account" ? (
|
|
376
|
+
<RemoveIcon aria-hidden="true" />
|
|
377
|
+
) : (
|
|
378
|
+
<AddIcon aria-hidden="true" />
|
|
382
379
|
)}
|
|
383
|
-
sx={{ display: "block" }}
|
|
384
|
-
disableRipple
|
|
385
|
-
>
|
|
386
|
-
View Public Profile
|
|
387
|
-
</Button>
|
|
388
|
-
<div className={styles.divider} />
|
|
389
|
-
<Button
|
|
390
|
-
className={styles.mobileDropdownOption}
|
|
391
|
-
sx={{ display: "block" }}
|
|
392
|
-
onClick={onClickLogout}
|
|
393
|
-
disableRipple
|
|
394
|
-
>
|
|
395
|
-
Log out
|
|
396
|
-
</Button>
|
|
397
|
-
</Box>
|
|
398
|
-
)}
|
|
399
|
-
</>
|
|
400
|
-
) : (
|
|
401
|
-
<Box>
|
|
402
|
-
<Button
|
|
403
|
-
className={`${styles.navbarOption} ${styles.join}`}
|
|
404
|
-
sx={{ my: 2, display: "block" }}
|
|
405
|
-
disableRipple
|
|
406
|
-
>
|
|
407
|
-
Join
|
|
408
|
-
<ArrowDropDownIcon className={styles.arrowDownIcon} />
|
|
409
|
-
<Box className={styles.dropDownMenu}>
|
|
410
|
-
<Button
|
|
411
|
-
className={styles.dropdownMenuOption}
|
|
412
|
-
onClick={() => handleNavigation("https://openinfra.dev/join")}
|
|
413
|
-
sx={{ display: "block" }}
|
|
414
|
-
disableRipple
|
|
415
|
-
>
|
|
416
|
-
Sign up for Foundation Membership
|
|
417
380
|
</Button>
|
|
381
|
+
{navbarMenu === "My Account" && (
|
|
382
|
+
<Box className={styles.mobileDropdownMenu}>
|
|
383
|
+
<Button
|
|
384
|
+
className={styles.mobileDropdownOption}
|
|
385
|
+
onClick={() => handleNavigation("/profile/")}
|
|
386
|
+
sx={{ display: "block" }}
|
|
387
|
+
disableRipple
|
|
388
|
+
>
|
|
389
|
+
Edit Profile
|
|
390
|
+
</Button>
|
|
391
|
+
<Button
|
|
392
|
+
className={styles.mobileDropdownOption}
|
|
393
|
+
onClick={() => handleNavigation(
|
|
394
|
+
`/community/members/profile/${
|
|
395
|
+
member.id
|
|
396
|
+
}/${`${member.first_name.toLowerCase()}-${member.last_name.toLowerCase()}`}`,
|
|
397
|
+
)}
|
|
398
|
+
sx={{ display: "block" }}
|
|
399
|
+
disableRipple
|
|
400
|
+
>
|
|
401
|
+
View Public Profile
|
|
402
|
+
</Button>
|
|
403
|
+
<div className={styles.divider} />
|
|
404
|
+
<Button
|
|
405
|
+
className={styles.mobileDropdownOption}
|
|
406
|
+
sx={{ display: "block" }}
|
|
407
|
+
onClick={onClickLogout}
|
|
408
|
+
disableRipple
|
|
409
|
+
>
|
|
410
|
+
Log out
|
|
411
|
+
</Button>
|
|
412
|
+
</Box>
|
|
413
|
+
)}
|
|
414
|
+
</>
|
|
415
|
+
) : (
|
|
416
|
+
<Box>
|
|
418
417
|
<Button
|
|
419
|
-
className={styles.
|
|
420
|
-
|
|
421
|
-
sx={{ display: "block" }}
|
|
418
|
+
className={`${styles.navbarOption} ${styles.join}`}
|
|
419
|
+
sx={{ my: 2, display: "block" }}
|
|
422
420
|
disableRipple
|
|
423
421
|
>
|
|
424
|
-
|
|
422
|
+
Join
|
|
423
|
+
<ArrowDropDownIcon className={styles.arrowDownIcon} />
|
|
424
|
+
<Box className={styles.dropDownMenu}>
|
|
425
|
+
<Button
|
|
426
|
+
className={styles.dropdownMenuOption}
|
|
427
|
+
onClick={() => handleNavigation("https://openinfra.dev/join")}
|
|
428
|
+
sx={{ display: "block" }}
|
|
429
|
+
disableRipple
|
|
430
|
+
>
|
|
431
|
+
Sign up for Foundation Membership
|
|
432
|
+
</Button>
|
|
433
|
+
<Button
|
|
434
|
+
className={styles.dropdownMenuOption}
|
|
435
|
+
onClick={() => handleNavigation("https://openinfra.dev/join")}
|
|
436
|
+
sx={{ display: "block" }}
|
|
437
|
+
disableRipple
|
|
438
|
+
>
|
|
439
|
+
Sponsor the Foundation
|
|
440
|
+
</Button>
|
|
441
|
+
<Button
|
|
442
|
+
className={styles.dropdownMenuOption}
|
|
443
|
+
onClick={() => handleNavigation("https://openinfra.dev")}
|
|
444
|
+
sx={{ display: "block" }}
|
|
445
|
+
disableRipple
|
|
446
|
+
>
|
|
447
|
+
More about the Foundation
|
|
448
|
+
</Button>
|
|
449
|
+
</Box>
|
|
425
450
|
</Button>
|
|
426
451
|
<Button
|
|
427
|
-
className={styles.
|
|
428
|
-
onClick={() =>
|
|
429
|
-
sx={{ display: "block" }}
|
|
452
|
+
className={`${styles.navbarOption} ${styles.login}`}
|
|
453
|
+
onClick={() => doLogin("/")}
|
|
454
|
+
sx={{ my: 2, display: "block" }}
|
|
430
455
|
disableRipple
|
|
431
456
|
>
|
|
432
|
-
|
|
457
|
+
Log in
|
|
433
458
|
</Button>
|
|
434
459
|
</Box>
|
|
435
|
-
|
|
436
|
-
<Button
|
|
437
|
-
className={`${styles.navbarOption} ${styles.login}`}
|
|
438
|
-
onClick={() => doLogin("/")}
|
|
439
|
-
sx={{ my: 2, display: "block" }}
|
|
440
|
-
disableRipple
|
|
441
|
-
>
|
|
442
|
-
Log in
|
|
443
|
-
</Button>
|
|
460
|
+
)}
|
|
444
461
|
</Box>
|
|
445
462
|
)}
|
|
446
|
-
</
|
|
447
|
-
|
|
448
|
-
</
|
|
449
|
-
|
|
450
|
-
|
|
463
|
+
</Container>
|
|
464
|
+
</AppBar>
|
|
465
|
+
</nav>
|
|
466
|
+
)}
|
|
467
|
+
</>
|
|
451
468
|
);
|
|
452
469
|
}
|
|
453
470
|
|
package/src/components/Seo.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{ "staticJsonFilesBuildTime": [], "lastBuild":
|
|
1
|
+
{ "staticJsonFilesBuildTime": [], "lastBuild": 1713872964380 }
|
|
@@ -1,39 +1,12 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { Provider } from "react-redux";
|
|
3
3
|
import { PersistGate } from "redux-persist/integration/react";
|
|
4
|
-
import { ThemeProvider } from "@mui/material/styles";
|
|
5
|
-
import CssBaseline from "@mui/material/CssBaseline";
|
|
6
4
|
import { store, persistor } from "./store";
|
|
7
|
-
import theme from "../theme";
|
|
8
|
-
|
|
9
|
-
const onBeforeLift = () => {
|
|
10
|
-
const params = new URLSearchParams(window.location.search);
|
|
11
|
-
const flush = params.has("flushState");
|
|
12
|
-
|
|
13
|
-
if (flush) {
|
|
14
|
-
// store.dispatch({ type: RESET_STATE, payload: null });
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
5
|
|
|
18
6
|
function ReduxWrapper({ element }) {
|
|
19
7
|
return (
|
|
20
8
|
<Provider store={store}>
|
|
21
|
-
<PersistGate
|
|
22
|
-
{() => element}
|
|
23
|
-
</PersistGate>
|
|
24
|
-
</Provider>
|
|
25
|
-
);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export function ReduxWrapperWithTheme({ element }) {
|
|
29
|
-
return (
|
|
30
|
-
<Provider store={store}>
|
|
31
|
-
<PersistGate onBeforeLift={onBeforeLift} persistor={persistor}>
|
|
32
|
-
<ThemeProvider theme={theme}>
|
|
33
|
-
<CssBaseline />
|
|
34
|
-
{() => element}
|
|
35
|
-
</ThemeProvider>
|
|
36
|
-
</PersistGate>
|
|
9
|
+
<PersistGate persistor={persistor}>{() => element}</PersistGate>
|
|
37
10
|
</Provider>
|
|
38
11
|
);
|
|
39
12
|
}
|
package/src/state/store.js
CHANGED
|
@@ -21,13 +21,11 @@ const states = {
|
|
|
21
21
|
loggedUserState: reducers.loggedUserReducer,
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
-
const appendLoggedUser = () => (next) => (action) => next(action);
|
|
25
|
-
|
|
26
24
|
const composeEnhancers = typeof window === "object" && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__
|
|
27
25
|
? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__
|
|
28
26
|
: compose;
|
|
29
27
|
|
|
30
|
-
const enhancer = composeEnhancers(applyMiddleware(
|
|
28
|
+
const enhancer = composeEnhancers(applyMiddleware(thunk));
|
|
31
29
|
|
|
32
30
|
// Create store with persistor
|
|
33
31
|
export const { store, persistor } = (() => {
|
package/src/state/storage.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import createWebStorage from "redux-persist/lib/storage/createWebStorage";
|
|
2
|
-
// create a mock storage for SSR
|
|
3
|
-
const createNoopStorage = () => {
|
|
4
|
-
return {
|
|
5
|
-
getItem(_key) {
|
|
6
|
-
return Promise.resolve(null);
|
|
7
|
-
},
|
|
8
|
-
setItem(_key, value) {
|
|
9
|
-
return Promise.resolve(value);
|
|
10
|
-
},
|
|
11
|
-
removeItem(_key) {
|
|
12
|
-
return Promise.resolve();
|
|
13
|
-
},
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
// and set the proper storege depending if we are in browser side or SSR side
|
|
18
|
-
// because you cannot create the local storage in Node.js
|
|
19
|
-
const storage = typeof window !== "undefined" ? createWebStorage("local") : createNoopStorage();
|
|
20
|
-
|
|
21
|
-
export default storage;
|