Skip to content

Commit cbe6bf5

Browse files
committed
move footer tp layout, laytout to pageElementsWrap
Signed-off-by: Randy Lau <[email protected]>
1 parent 3b8b1ef commit cbe6bf5

File tree

100 files changed

+499
-478
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+499
-478
lines changed

context-wrapper.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@ import React from "react";
22
import { StyledThemeProvider } from "./src/theme/app/StyledThemeProvider";
33
import { ThemeManagerProvider } from "./src/theme/app/ThemeManager";
44
import lighttheme, { darktheme } from "./src/theme/app/themeStyles";
5+
import { GlobalStyle } from "./src/sections/app.style";
56

67
export const ContextWrapper = ({ children }) => {
78
return (
89
<ThemeManagerProvider>
910
<StyledThemeProvider lightTheme={lighttheme} darkTheme={darktheme}>
11+
<GlobalStyle />
1012
{children}
1113
</StyledThemeProvider>
1214
</ThemeManagerProvider>

gatsby-browser.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,4 @@ function initGTM() {
2929
}
3030

3131
export { wrapRootElement } from "./root-wrapper";
32+
export { wrapPageElement } from "./page-wrapper";

gatsby-ssr.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
export { onRenderBody } from "./onRenderBody";
22
export { wrapRootElement } from "./root-wrapper";
3+
export { wrapPageElement } from "./page-wrapper";

page-wrapper.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import React from "react";
2+
import Layout from "./src/components/layout.js";
3+
4+
export const wrapPageElement = ({ element }) => (
5+
<Layout>
6+
{element}
7+
</Layout>
8+
);

src/components/layout.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@
1010
import React from "react";
1111
import PropTypes from "prop-types";
1212
import ScrollToTopBtn from "./Scrolltotop-button";
13-
import { GlobalStyle } from "../sections/app.style";
1413
import Navigation from "../sections/General/Navigation";
14+
import Footer from "../sections/General/Footer";
1515

1616
const Layout = ({ children }) => {
1717

1818
return (
1919
<>
20-
<GlobalStyle />
2120
<Navigation/>
2221
{children}
2322
<ScrollToTopBtn />
23+
<Footer />
2424
</>
2525
);
2626
};

src/pages/404.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import React from "react";
2-
import Layout from "../components/layout";
2+
33
import SEO from "../components/seo";
44
import L404 from "../sections/404";
5-
import Footer from "../sections/General/Footer";
5+
66
const NotFoundPage = () => {
77
return (
8-
<Layout>
8+
<>
99
<L404 />
10-
<Footer />
11-
</Layout>
10+
11+
</>
1212
);
1313
};
1414
export const Head = () => {

src/pages/blog/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import React, { useState, useEffect } from "react";
2-
import Layout from "../../components/layout";
2+
33
import SEO from "../../components/seo";
44
import BlogGrid from "../../sections/Blog/Blog-grid";
5-
import Footer from "../../sections/General/Footer";
5+
66
import { graphql } from "gatsby";
77
import loadable from "@loadable/component";
88
const BlogList = loadable(() => import ("../../sections/Blog/Blog-list"));
@@ -62,16 +62,16 @@ const Blog = (props) => {
6262
return <BlogGrid {...props} />;
6363
};
6464
return (
65-
<Layout>
65+
<>
6666
<BlogView
6767
isListView={isListView}
6868
setListView={setListView}
6969
setGridView={setGridView}
7070
pageContext={props.pageContext}
7171
data={props.data}
7272
/>
73-
<Footer />
74-
</Layout>
73+
74+
</>
7575
);
7676
};
7777
export default Blog;

src/pages/careers/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import React from "react";
2-
import Layout from "../../components/layout";
2+
33
import SEO from "../../components/seo";
4-
import Footer from "../../sections/General/Footer";
4+
55
import CareersSection from "../../sections/Careers";
66
const Careers = () => {
77
return (
8-
<Layout>
8+
<>
99
<CareersSection />
10-
<Footer />
11-
</Layout>
10+
11+
</>
1212
);
1313
};
1414
export default Careers;

src/pages/careers/internships.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import React from "react";
2-
import Layout from "../../components/layout";
2+
33
import SEO from "../../components/seo";
4-
import Footer from "../../sections/General/Footer";
4+
55
import InternshipPage from "../../sections/Careers/Careers-Internship-grid";
66
const Internships = () => {
77
return (
8-
<Layout>
8+
<>
99
<InternshipPage />
10-
<Footer />
11-
</Layout>
10+
11+
</>
1212
);
1313
};
1414
export default Internships;

src/pages/careers/programs.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
import React from "react";
2-
import Layout from "../../components/layout";
2+
33
import SEO from "../../components/seo";
4-
import Footer from "../../sections/General/Footer";
4+
55
import FAQ from "../../sections/General/Faq";
66
import ProgramsGrid from "../../sections/Careers/Careers-Programs-grid";
77
const CareerPrograms = () => {
88
return (
9-
<Layout>
9+
<>
1010
<ProgramsGrid />
1111
<FAQ category={["internships"]} />
12-
<Footer />
13-
</Layout>
12+
13+
</>
1414
);
1515
};
1616
export default CareerPrograms;

src/pages/cloud-native-management/meshery/getting-started.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
import React from "react";
2-
import Layout from "../../../components/layout";
2+
33
import SEO from "../../../components/seo";
44
import MesheryTerminal from "../../../sections/Meshery/Meshery-terminal";
55
import loadable from "@loadable/component";
66
const MesheryPlatforms = loadable(() => import ("../../../sections/Meshery/Meshery-platforms"));
77
const MesheryManageMesh = loadable(() => import ("../../../sections/Meshery/Meshery-mange-mesh"));
88
const MesheryQuotes = loadable(() => import ("../../../sections/Meshery/Meshery-quotes"));
9-
const Footer = loadable(() => import ("../../../sections/General/Footer"));
109
const MesheryMainPage = () => {
1110
return (
12-
<Layout>
11+
<>
1312
<MesheryTerminal />
1413
<MesheryPlatforms />
1514
<MesheryManageMesh />
1615
<MesheryQuotes />
17-
<Footer />
18-
</Layout>
16+
17+
</>
1918
);
2019
};
2120
export default MesheryMainPage;

src/pages/cloud-native-management/meshery/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import React from "react";
2-
import Layout from "../../../components/layout";
2+
33
import SEO from "../../../components/seo";
44
import MesheryPage from "../../../sections/Meshery";
5-
import Footer from "../../../sections/General/Footer";
5+
66
const Meshery = () => {
77
return (
8-
<Layout>
8+
<>
99
<MesheryPage />
10-
<Footer />
11-
</Layout>
10+
11+
</>
1212
);
1313
};
1414
export default Meshery;

src/pages/cloud-native-management/meshery/integrations.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import React from "react";
2-
import Layout from "../../../components/layout";
2+
33
import SEO from "../../../components/seo";
4-
import Footer from "../../../sections/General/Footer";
4+
55
import MesheryIntegration from "../../../sections/Meshery/Meshery-integrations";
66
const Integrations = () => {
77
return (
8-
<Layout>
8+
<>
99
<MesheryIntegration />
10-
<Footer />
11-
</Layout>
10+
11+
</>
1212
);
1313
};
1414
export default Integrations;

src/pages/cloud-native-management/meshery/meshery-operator.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import React from "react";
2-
import Layout from "../../../components/layout";
2+
33
import SEO from "../../../components/seo";
44
import MesheryOperatorPage from "../../../sections/Meshery/meshery-operator";
5-
import Footer from "../../../sections/General/Footer";
5+
66
const MesheryOperator = () => {
77
return (
8-
<Layout>
8+
<>
99
<MesheryOperatorPage />
10-
<Footer />
11-
</Layout>
10+
11+
</>
1212
);
1313
};
1414
export default MesheryOperator;

src/pages/cloud-native-management/meshery/operating-service-meshes.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import React from "react";
2-
import Layout from "../../../components/layout";
2+
33
import SEO from "../../../components/seo";
44
import HowMesheryWorksHero from "../../../sections/Meshery/How-meshery-works/hero";
5-
import Footer from "../../../sections/General/Footer";
5+
66
import SMILogo from "../../../sections/Meshery/How-meshery-works/images/servicemeshinterface-icon-color.svg";
77
import MesheryLogo from "../../../assets/images/meshery/icon-only/meshery-logo-light.svg";
88
import VisualTopology from "../../../sections/Meshery/How-meshery-works/images/visual-topology.svg";
@@ -16,7 +16,7 @@ const HowMesheryWorks = loadable(() => import ("../../../sections/Meshery/How-me
1616
const HowMesheryWorksSpecs = loadable(() => import ("../../../sections/Meshery/How-meshery-works/specs"));
1717
const OperatingServiceMeshes = () => {
1818
return (
19-
<Layout>
19+
<>
2020
<HowMesheryWorksHero />
2121
<HowMesheryWorks
2222
title="How Meshery Manages Cloud Native Infra"
@@ -104,8 +104,8 @@ const OperatingServiceMeshes = () => {
104104
},
105105
]} />
106106
<HowMesheryWorksSpecs />
107-
<Footer />
108-
</Layout>
107+
108+
</>
109109
);
110110
};
111111
export default OperatingServiceMeshes;

src/pages/cloud-native-management/meshmap/collaborate.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import React from "react";
2-
import Layout from "../../../components/layout";
2+
33
import SEO from "../../../components/seo";
4-
import Footer from "../../../sections/General/Footer";
4+
55
import MeshmapCollaborate from "../../../sections/Meshmap/Meshmap-collaborate";
66
const MeshmapCollaboratePage = () => {
77
return (
8-
<Layout>
8+
<>
99
<MeshmapCollaborate />
10-
<Footer />
11-
</Layout>
10+
11+
</>
1212
);
1313
};
1414
export default MeshmapCollaboratePage;

src/pages/cloud-native-management/meshmap/design.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import React from "react";
2-
import Layout from "../../../components/layout";
2+
33
import SEO from "../../../components/seo";
4-
import Footer from "../../../sections/General/Footer";
4+
55
import MeshmapDesign from "../../../sections/Meshmap/Meshmap-design/index";
66
const MeshmapDesignPage = () => {
77
return (
8-
<Layout>
8+
<>
99
<MeshmapDesign />
10-
<Footer />
11-
</Layout>
10+
11+
</>
1212
);
1313
};
1414
export default MeshmapDesignPage;

src/pages/cloud-native-management/meshmap/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import React from "react";
2-
import Layout from "../../../components/layout";
2+
33
import SEO from "../../../components/seo";
4-
import Footer from "../../../sections/General/Footer";
4+
55
import Meshmap from "../../../sections/Meshmap/index";
66
const MeshmapPage = () => {
77
return (
8-
<Layout>
8+
<>
99
<Meshmap />
10-
<Footer />
11-
</Layout>
10+
11+
</>
1212
);
1313
};
1414
export default MeshmapPage;

src/pages/cloud-native-management/meshmap/visualize.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
import React from "react";
2-
import Layout from "../../../components/layout";
2+
33
import SEO from "../../../components/seo";
4-
import Footer from "../../../sections/General/Footer";
4+
55
import MeshmapVisualize from "../../../sections/Meshmap/Meshmap-visualize/index";
66

77
const MeshmapVisualizePage = () => {
88

99
return (
10-
<Layout>
10+
<>
1111
<MeshmapVisualize />
12-
<Footer />
13-
</Layout>
12+
13+
</>
1414
);
1515
};
1616
export default MeshmapVisualizePage;

src/pages/community/calendar.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from "react";
22
import SEO from "../../components/seo";
3-
import Footer from "../../sections/General/Footer";
4-
import Layout from "../../components/layout";
3+
4+
55
import Loadable from "react-loadable";
66
import Loader from "./Loader.style";
77
import LoadingIcon from "../../assets/images/LoadingIcon";
@@ -49,10 +49,10 @@ const LoadableCalendar = Loadable({
4949
});
5050
const CalendarPage = () => {
5151
return (
52-
<Layout>
52+
<>
5353
<LoadableCalendar />
54-
<Footer />
55-
</Layout>
54+
55+
</>
5656
);
5757
};
5858
export default CalendarPage;

0 commit comments

Comments
 (0)