diff --git a/apps/website/components/footer/footer.tsx b/apps/website/components/footer/footer.tsx
index 966f133..43e45b9 100644
--- a/apps/website/components/footer/footer.tsx
+++ b/apps/website/components/footer/footer.tsx
@@ -38,11 +38,11 @@ export function Footer({items = []}) {
- © 3
+ ©2023
MeCP™. All Rights Reserved.
+ className="hover:underline"> MeCP™. All Rights Reserved.
);
diff --git a/apps/website/pages/_app.tsx b/apps/website/pages/_app.tsx
index c087e69..8c56f07 100644
--- a/apps/website/pages/_app.tsx
+++ b/apps/website/pages/_app.tsx
@@ -50,6 +50,24 @@ const getPageMetadata = async (path) => {
}
}
+const getCategoryMetadata = async (categorySlug) => {
+ try {
+ return await axios.get(`${environment.strapiApiUrl}/categories?filters[slug]=${categorySlug}&populate=deep`);
+ } catch (e) {
+ console.error(e);
+ return Promise.resolve({});
+ }
+}
+
+const getPostMetadata = async (postSlug) => {
+ try {
+ return await axios.get(`${environment.strapiApiUrl}/articles?filters[slug]=${postSlug}&populate=deep`);
+ } catch (e) {
+ console.error(e);
+ return Promise.resolve({});
+ }
+}
+
const CustomApp = ({Component, pageProps: {session, ...pageProps}, menuFooter, menuHeader, seo}: CustomAppProps) => {
pageProps = {...pageProps, menuFooter, menuHeader, seo};
@@ -68,7 +86,18 @@ CustomApp.getInitialProps = async (context) => {
const path = context.router.pathname;
const menuHeader = await axios.get(`${environment.strapiApiUrl}/menus/1?nested&populate=deep`);
const menuFooter = await axios.get(`${environment.strapiApiUrl}/menus/2?nested&populate=deep`);
- const page = await getPageMetadata(path);
+ let page = null;
+
+ console.log(context.ctx.query);
+ if (context.ctx.query.category_slug && !context.ctx.query.post_slug) {
+ page = await getCategoryMetadata(context.ctx.query.category_slug);
+ } else if (context.ctx.query.category_slug && context.ctx.query.post_slug) {
+ page = await getPostMetadata(context.ctx.query.post_slug);
+ } else if (Object.keys(context.ctx.query).length === 0) {
+ page = await getPageMetadata(path);
+ }
+
+ console.log(page);
return {
...appProps,
diff --git a/apps/website/pages/about-us/index.module.scss b/apps/website/pages/about-us/index.module.scss
new file mode 100644
index 0000000..45c2aa4
--- /dev/null
+++ b/apps/website/pages/about-us/index.module.scss
@@ -0,0 +1,7 @@
+/*
+ * Replace this with your own classes
+ *
+ * e.g.
+ * .container {
+ * }
+*/
diff --git a/apps/website/pages/about-us/index.tsx b/apps/website/pages/about-us/index.tsx
new file mode 100644
index 0000000..717c27a
--- /dev/null
+++ b/apps/website/pages/about-us/index.tsx
@@ -0,0 +1,22 @@
+import SeoConfig from "../../components/seo-config/seo-config";
+import Layout from "../../components/layout/layout";
+
+import styles from './index.module.scss';
+
+export function AboutUs({menuHeader, menuFooter, seo}) {
+ return (
+ <>
+
+
+
+
+
+
+ >
+ );
+}
+
+export default AboutUs;
diff --git a/apps/website/pages/contact-us/index.module.scss b/apps/website/pages/contact-us/index.module.scss
new file mode 100644
index 0000000..45c2aa4
--- /dev/null
+++ b/apps/website/pages/contact-us/index.module.scss
@@ -0,0 +1,7 @@
+/*
+ * Replace this with your own classes
+ *
+ * e.g.
+ * .container {
+ * }
+*/
diff --git a/apps/website/pages/contact-us/index.tsx b/apps/website/pages/contact-us/index.tsx
new file mode 100644
index 0000000..125a244
--- /dev/null
+++ b/apps/website/pages/contact-us/index.tsx
@@ -0,0 +1,25 @@
+import styles from './index.module.scss';
+import SeoConfig from "../../components/seo-config/seo-config";
+import Layout from "../../components/layout/layout";
+
+/* eslint-disable-next-line */
+export interface ContactUsProps {
+}
+
+export function ContactUs({menuHeader, menuFooter, seo}) {
+ return (
+ <>
+
+
+
+
+
+
+ >
+ );
+}
+
+export default ContactUs;
diff --git a/apps/website/pages/pricing/index.module.scss b/apps/website/pages/pricing/index.module.scss
new file mode 100644
index 0000000..45c2aa4
--- /dev/null
+++ b/apps/website/pages/pricing/index.module.scss
@@ -0,0 +1,7 @@
+/*
+ * Replace this with your own classes
+ *
+ * e.g.
+ * .container {
+ * }
+*/
diff --git a/apps/website/pages/pricing/index.tsx b/apps/website/pages/pricing/index.tsx
new file mode 100644
index 0000000..b820b28
--- /dev/null
+++ b/apps/website/pages/pricing/index.tsx
@@ -0,0 +1,21 @@
+import styles from './index.module.scss';
+import SeoConfig from "../../components/seo-config/seo-config";
+import Layout from "../../components/layout/layout";
+
+export function Pricing({menuHeader, menuFooter, seo}) {
+ return (
+ <>
+
+
+
+
+
+
+ >
+ );
+}
+
+export default Pricing;
diff --git a/apps/website/pages/school-programm/index.module.scss b/apps/website/pages/school-programm/index.module.scss
new file mode 100644
index 0000000..45c2aa4
--- /dev/null
+++ b/apps/website/pages/school-programm/index.module.scss
@@ -0,0 +1,7 @@
+/*
+ * Replace this with your own classes
+ *
+ * e.g.
+ * .container {
+ * }
+*/
diff --git a/apps/website/pages/school-programm/index.tsx b/apps/website/pages/school-programm/index.tsx
new file mode 100644
index 0000000..9e557ae
--- /dev/null
+++ b/apps/website/pages/school-programm/index.tsx
@@ -0,0 +1,22 @@
+import SeoConfig from "../../components/seo-config/seo-config";
+import Layout from "../../components/layout/layout";
+
+import styles from './index.module.scss';
+
+export function SchoolProgramm({menuHeader, menuFooter, seo}) {
+ return (
+ <>
+
+
+
+
+
+
+ >
+ );
+}
+
+export default SchoolProgramm;
diff --git a/apps/website/pages/teachers/index.module.scss b/apps/website/pages/teachers/index.module.scss
new file mode 100644
index 0000000..45c2aa4
--- /dev/null
+++ b/apps/website/pages/teachers/index.module.scss
@@ -0,0 +1,7 @@
+/*
+ * Replace this with your own classes
+ *
+ * e.g.
+ * .container {
+ * }
+*/
diff --git a/apps/website/pages/teachers/index.tsx b/apps/website/pages/teachers/index.tsx
new file mode 100644
index 0000000..f9d1fbe
--- /dev/null
+++ b/apps/website/pages/teachers/index.tsx
@@ -0,0 +1,22 @@
+import SeoConfig from "../../components/seo-config/seo-config";
+import Layout from "../../components/layout/layout";
+
+import styles from './index.module.scss';
+
+export function Teachers({menuHeader, menuFooter, seo}) {
+ return (
+ <>
+
+
+
+
+
+
+ >
+ );
+}
+
+export default Teachers;