@openstack_dev/gatsby-theme-marketing-oif-core 1.0.0
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/.eslintrc.json +27 -0
- package/.github/workflows/eslint.yml +15 -0
- package/.husky/pre-commit +4 -0
- package/.nvmrc +1 -0
- package/LICENSE.md +201 -0
- package/README.md +10 -0
- package/babel.config.json +12 -0
- package/gatsby-browser.js +5 -0
- package/gatsby-config.js +217 -0
- package/gatsby-node.js +162 -0
- package/gatsby-ssr.js +50 -0
- package/package.json +154 -0
- package/src/cms/cms-utils.js +8 -0
- package/src/cms/cms.js +12 -0
- package/src/cms/config/collections/configurationsCollection/announcementBanner/index.js +59 -0
- package/src/cms/config/collections/configurationsCollection/announcementBanner/typeDefs.js +11 -0
- package/src/cms/config/collections/configurationsCollection/footer/index.js +158 -0
- package/src/cms/config/collections/configurationsCollection/footer/typeDefs.js +37 -0
- package/src/cms/config/collections/configurationsCollection/index.js +16 -0
- package/src/cms/config/collections/configurationsCollection/navbar/index.js +62 -0
- package/src/cms/config/collections/configurationsCollection/navbar/typeDefs.js +13 -0
- package/src/cms/config/collections/configurationsCollection/siteSettings/index.js +117 -0
- package/src/cms/config/collections/configurationsCollection/siteSettings/typeDefs.js +15 -0
- package/src/cms/config/collections/configurationsCollection/typeDefs.js +9 -0
- package/src/cms/config/collections/typeDefs.js +5 -0
- package/src/cms/config/fields.js +268 -0
- package/src/cms/config/index.js +35 -0
- package/src/cms/config/patterns.js +51 -0
- package/src/cms/preview-templates/.gitkeep +0 -0
- package/src/cms/widgets/.gitkeep +0 -0
- package/src/components/AnnouncementBanner/index.js +26 -0
- package/src/components/AnnouncementBanner/index.module.scss +131 -0
- package/src/components/AnnouncementBanner/template.js +40 -0
- package/src/components/Footer/index.js +40 -0
- package/src/components/Footer/index.module.scss +59 -0
- package/src/components/Footer/template.js +55 -0
- package/src/components/Header/index.js +8 -0
- package/src/components/Header/template.js +5 -0
- package/src/components/Layout.js +32 -0
- package/src/components/Link.js +41 -0
- package/src/components/Navbar/index.js +460 -0
- package/src/components/Navbar/index.module.scss +301 -0
- package/src/components/SponsoredProjectsNav/index.js +22 -0
- package/src/components/SponsoredProjectsNav/index.module.scss +7 -0
- package/src/components/SubscribeForm/index.js +47 -0
- package/src/components/SubscribeForm/index.module.scss +114 -0
- package/src/components/Tracking/custom-bing-tracker.js +5 -0
- package/src/components/Tracking/custom-google-tracker.js +51 -0
- package/src/components/head-components.js +20 -0
- package/src/components/svgs/RightArrow.jsx +9 -0
- package/src/content/announcement-banner/OpenInfrastructureFoundation-icon-RGB.svg +1 -0
- package/src/content/announcement-banner/index.json +8 -0
- package/src/content/footer/index.json +139 -0
- package/src/content/navbar/index.json +304 -0
- package/src/content/site-settings/index.json +1 -0
- package/src/images/icon.png +0 -0
- package/src/images/openstack-logo-full.svg +57 -0
- package/src/images/openstack-logo-vert.svg +57 -0
- package/src/images/right-arrow.svg +3 -0
- package/src/pages/404.js +49 -0
- package/src/pages/auth/[...].js +36 -0
- package/src/pages/index.js +14 -0
- package/src/reducers/.gitkeep +0 -0
- package/src/reducers/index.js +5 -0
- package/src/routes/.gitkeep +0 -0
- package/src/routes/authorization-callback-route.js +71 -0
- package/src/routes/login-callback-route.js +62 -0
- package/src/routes/logout-callback-route.js +72 -0
- package/src/state/.gitkeep +0 -0
- package/src/state/ReduxWrapper.js +29 -0
- package/src/state/storage.js +21 -0
- package/src/state/store.js +43 -0
- package/src/templates/.gitkeep +0 -0
- package/src/theme.js +36 -0
- package/src/utils/cacheUtils.js +48 -0
- package/src/utils/cssUtils.js +62 -0
- package/src/utils/envVariables.js +52 -0
- package/src/utils/expiredToken.js +15 -0
- package/src/utils/filePath.js +95 -0
- package/static/admin/admin.css +3 -0
- package/static/fonts/fonts.css +65 -0
- package/static/fonts/nunito-sans/nunito-sans-v12-latin-300.woff +0 -0
- package/static/fonts/nunito-sans/nunito-sans-v12-latin-300.woff2 +0 -0
- package/static/fonts/nunito-sans/nunito-sans-v12-latin-300italic.woff +0 -0
- package/static/fonts/nunito-sans/nunito-sans-v12-latin-300italic.woff2 +0 -0
- package/static/fonts/nunito-sans/nunito-sans-v12-latin-600.woff +0 -0
- package/static/fonts/nunito-sans/nunito-sans-v12-latin-600.woff2 +0 -0
- package/static/fonts/nunito-sans/nunito-sans-v12-latin-600italic.woff +0 -0
- package/static/fonts/nunito-sans/nunito-sans-v12-latin-600italic.woff2 +0 -0
- package/static/fonts/nunito-sans/nunito-sans-v12-latin-700.woff +0 -0
- package/static/fonts/nunito-sans/nunito-sans-v12-latin-700.woff2 +0 -0
- package/static/fonts/nunito-sans/nunito-sans-v12-latin-700italic.woff +0 -0
- package/static/fonts/nunito-sans/nunito-sans-v12-latin-700italic.woff2 +0 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { useStaticQuery, graphql } from "gatsby";
|
|
3
|
+
import FooterTemplate from "./template";
|
|
4
|
+
|
|
5
|
+
const footerQuery = graphql`
|
|
6
|
+
query {
|
|
7
|
+
footerJson {
|
|
8
|
+
social {
|
|
9
|
+
display
|
|
10
|
+
title
|
|
11
|
+
networks {
|
|
12
|
+
display
|
|
13
|
+
icon
|
|
14
|
+
link
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
credit {
|
|
18
|
+
title
|
|
19
|
+
display
|
|
20
|
+
content
|
|
21
|
+
}
|
|
22
|
+
columns {
|
|
23
|
+
display
|
|
24
|
+
items {
|
|
25
|
+
link
|
|
26
|
+
title
|
|
27
|
+
}
|
|
28
|
+
title
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
`;
|
|
33
|
+
|
|
34
|
+
const Footer = () => {
|
|
35
|
+
const { footerJson: footerContent } = useStaticQuery(footerQuery);
|
|
36
|
+
|
|
37
|
+
return <FooterTemplate data={footerContent} />;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export default Footer;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
.footer {
|
|
2
|
+
background-color: #333333;
|
|
3
|
+
color: #ffffff;
|
|
4
|
+
padding: 70px 0;
|
|
5
|
+
margin-top: 50px;
|
|
6
|
+
font-size: 12px;
|
|
7
|
+
font-family: "Open Sans", Helvetica, Arial, sans-serif !important;
|
|
8
|
+
|
|
9
|
+
.footer-colummns {
|
|
10
|
+
text-align: left;
|
|
11
|
+
|
|
12
|
+
h3 {
|
|
13
|
+
font-size: 14px;
|
|
14
|
+
font-weight: 400;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.link {
|
|
18
|
+
color: #AAAAAA;
|
|
19
|
+
text-decoration: none;
|
|
20
|
+
line-height: 1.5;
|
|
21
|
+
|
|
22
|
+
:hover,
|
|
23
|
+
:visited {
|
|
24
|
+
text-decoration: underline;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
ul {
|
|
29
|
+
list-style-type: none;
|
|
30
|
+
margin: 0;
|
|
31
|
+
padding: 0;
|
|
32
|
+
line-height: 1.8;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.social-container {
|
|
36
|
+
display: flex;
|
|
37
|
+
justify-content: space-between;
|
|
38
|
+
width: 70%;
|
|
39
|
+
.link {
|
|
40
|
+
color: #eaeaea !important;
|
|
41
|
+
span {
|
|
42
|
+
font-size: 36px;
|
|
43
|
+
padding-right: 10px;
|
|
44
|
+
text-decoration: none;
|
|
45
|
+
min-width: 48px;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.credit {
|
|
51
|
+
margin-top: 20px;
|
|
52
|
+
line-height: 1.5;
|
|
53
|
+
color: #AAAAAA;
|
|
54
|
+
a {
|
|
55
|
+
color: #AAAAAA;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Container, Grid, Icon } from "@mui/material";
|
|
3
|
+
import Link from "../Link";
|
|
4
|
+
import '@fortawesome/fontawesome-free/css/all.css';
|
|
5
|
+
|
|
6
|
+
import styles from "./index.module.scss";
|
|
7
|
+
|
|
8
|
+
const FooterTemplate = ({ data }) => {
|
|
9
|
+
const columns = data?.columns?.filter(col => col.display);
|
|
10
|
+
const socialColumnSpan = 4;
|
|
11
|
+
const colsSpan = columns?.length > 0 ? Math.floor((12 - socialColumnSpan) / columns.length) : 0;
|
|
12
|
+
return (
|
|
13
|
+
<footer className={styles.footer}>
|
|
14
|
+
<Container maxWidth="lg" className={styles.footerColummns}>
|
|
15
|
+
<Grid container>
|
|
16
|
+
{columns.map((col, index) => (
|
|
17
|
+
<Grid item xs={12} md={colsSpan} key={index}>
|
|
18
|
+
<h3>
|
|
19
|
+
{col?.title}
|
|
20
|
+
</h3>
|
|
21
|
+
<ul>
|
|
22
|
+
{col.items.map((item, index) => (
|
|
23
|
+
<li key={`item-${index}`}>
|
|
24
|
+
<Link to={item?.link} className={styles.link} key={index}>
|
|
25
|
+
{item?.title}
|
|
26
|
+
</Link>
|
|
27
|
+
</li>
|
|
28
|
+
))}
|
|
29
|
+
</ul>
|
|
30
|
+
</Grid>
|
|
31
|
+
))}
|
|
32
|
+
{data.social?.display && (
|
|
33
|
+
<Grid item xs={12} md={socialColumnSpan}>
|
|
34
|
+
<h3>
|
|
35
|
+
{data.social?.title}
|
|
36
|
+
</h3>
|
|
37
|
+
<div className={styles.socialContainer}>
|
|
38
|
+
{data.social?.networks.filter(net => net.display).map((net, index) => {
|
|
39
|
+
return (
|
|
40
|
+
<Link to={net.link} className={styles.link} key={index}>
|
|
41
|
+
<Icon className={`fab fa-${net.icon}`} />
|
|
42
|
+
</Link>
|
|
43
|
+
);
|
|
44
|
+
})}
|
|
45
|
+
</div>
|
|
46
|
+
{ <div className={styles.credit} dangerouslySetInnerHTML={{ __html: data.credit.content }} /> }
|
|
47
|
+
</Grid>
|
|
48
|
+
)}
|
|
49
|
+
</Grid>
|
|
50
|
+
</Container>
|
|
51
|
+
</footer>
|
|
52
|
+
);
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export default FooterTemplate;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
import Footer from "./Footer";
|
|
4
|
+
import SponsoredProjectsNav from "./SponsoredProjectsNav";
|
|
5
|
+
import SubscribeForm from "./SubscribeForm";
|
|
6
|
+
import AnnouncementBanner from "./AnnouncementBanner";
|
|
7
|
+
import Header from "./Header";
|
|
8
|
+
import Navbar from "./Navbar";
|
|
9
|
+
|
|
10
|
+
function Layout({ children }) {
|
|
11
|
+
return (
|
|
12
|
+
<div>
|
|
13
|
+
<SponsoredProjectsNav />
|
|
14
|
+
<Navbar />
|
|
15
|
+
<div>
|
|
16
|
+
<Header />
|
|
17
|
+
<AnnouncementBanner />
|
|
18
|
+
<main id="content-wrapper">
|
|
19
|
+
{children}
|
|
20
|
+
<SubscribeForm />
|
|
21
|
+
</main>
|
|
22
|
+
<Footer />
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
Layout.propTypes = {
|
|
29
|
+
children: PropTypes.node.isRequired,
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export default Layout;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Link as GatsbyLink } from "gatsby";
|
|
3
|
+
// Since DOM elements <a> cannot receive activeClassName
|
|
4
|
+
// and partiallyActive, destructure the prop here and
|
|
5
|
+
// pass it only to GatsbyLink
|
|
6
|
+
const Link = ({ children, to, activeClassName, partiallyActive, ...other }) => {
|
|
7
|
+
// Tailor the following test to your environment.
|
|
8
|
+
// This example assumes that any internal link (intended for Gatsby)
|
|
9
|
+
// will start with exactly one slash, and that anything else is external.
|
|
10
|
+
const internal = /^\/(?!\/)/.test(to)
|
|
11
|
+
// Use Gatsby Link for internal links, and <a> for others
|
|
12
|
+
const email = /\S+@\S+\.\S+/.test(to);
|
|
13
|
+
|
|
14
|
+
if (internal) {
|
|
15
|
+
return (
|
|
16
|
+
<GatsbyLink
|
|
17
|
+
to={to}
|
|
18
|
+
activeClassName={activeClassName}
|
|
19
|
+
partiallyActive={partiallyActive}
|
|
20
|
+
{...other}
|
|
21
|
+
>
|
|
22
|
+
{children}
|
|
23
|
+
</GatsbyLink>
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
if (email) {
|
|
27
|
+
const href = /^mailto:/.test(to) ? to : `mailto:${to}`;
|
|
28
|
+
return (
|
|
29
|
+
<a href={href} {...other}>
|
|
30
|
+
{children}
|
|
31
|
+
</a>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
return (
|
|
35
|
+
<a href={to} {...other} target="_blank" rel="noreferrer">
|
|
36
|
+
{children}
|
|
37
|
+
</a>
|
|
38
|
+
);
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export default Link;
|