diff --git a/components/Footer.js b/components/Footer.js deleted file mode 100644 index 82e8f6238bb..00000000000 --- a/components/Footer.js +++ /dev/null @@ -1,184 +0,0 @@ -import IconTwitter from "./icons/Twitter" -import IconGithub from "./icons/Github" -import IconYoutubeGray from "./icons/YouTubeGray" -import IconLinkedIn from "./icons/LinkedIn" -import Link from "next/link" -import AsyncAPILogoLight from "./AsyncAPILogoLight" -import IconSlack from "./icons/Slack" -import IconTwitch from "./icons/Twitch" -import Heading from "./typography/Heading" - -export default function Footer() { - return ( - - ) -} diff --git a/components/footer/Footer.js b/components/footer/Footer.js new file mode 100644 index 00000000000..484be82dc32 --- /dev/null +++ b/components/footer/Footer.js @@ -0,0 +1,118 @@ +import Link from "next/link" +import AsyncAPILogoLight from "../AsyncAPILogoLight" +import Heading from "../typography/Heading" +import { socialMediaLinks, initiativeLinks } from "./FooterList" + +export default function Footer() { + return ( + + ) +} \ No newline at end of file diff --git a/components/footer/FooterList.js b/components/footer/FooterList.js new file mode 100644 index 00000000000..77bacb005c0 --- /dev/null +++ b/components/footer/FooterList.js @@ -0,0 +1,62 @@ +import IconTwitter from "../icons/Twitter"; +import IconGithub from "../icons/Github"; +import IconLinkedIn from "../icons/LinkedIn"; +import IconYoutubeGray from "../icons/YouTubeGray"; +import IconSlack from "../icons/Slack"; +import IconTwitch from "../icons/Twitch"; + +export const socialMediaLinks = [ + { + url: "https://twitter.com/AsyncAPISpec", + label: "Twitter", + icon: , + }, + { + url: "https://github.com/asyncapi", + label: "GitHub", + icon: , + }, + { + url: "https://linkedin.com/company/asyncapi", + label: "LinkedIn", + icon: , + }, + { + url: "https://youtube.com/asyncapi", + label: "YouTube", + icon: , + }, + { + url: "https://asyncapi.com/slack-invite", + label: "Slack", + icon: , + }, + { + url: "https://www.twitch.tv/asyncapi", + label: "Twitch", + icon: , + }, +]; + +export const initiativeLinks = [ + { + label: "About", + url: "/about", + }, + { + label: "Blog", + url: "/blog", + }, + { + label: "Shop", + url: "https://asyncapi.threadless.com", + }, + { + label: "Jobs", + url: "/jobs", + }, + { + label: "Brand", + url: "https://github.com/asyncapi/brand/blob/master/brand-guidelines/README.md", + }, +]; \ No newline at end of file diff --git a/components/layout/GenericLayout.js b/components/layout/GenericLayout.js index b5882f3e7a5..2aff0c1014e 100644 --- a/components/layout/GenericLayout.js +++ b/components/layout/GenericLayout.js @@ -1,7 +1,6 @@ import Head from '../Head'; import NavBar from '../navigation/NavBar'; import Container from './Container'; -import Footer from '../Footer'; import AnnouncementHero from '../campaigns/AnnoucementHero'; import StickyNavbar from '../navigation/StickyNavbar'; diff --git a/components/layout/GenericPostLayout.js b/components/layout/GenericPostLayout.js index 7ef0d630a54..d6aa1a4580e 100644 --- a/components/layout/GenericPostLayout.js +++ b/components/layout/GenericPostLayout.js @@ -4,13 +4,12 @@ import Head from '../Head' import GenericPostContext from '../../context/GenericPostContext' import NavBar from '../navigation/NavBar' import Container from './Container' -import Footer from '../Footer' import AnnouncementHero from '../campaigns/AnnoucementHero' import StickyNavbar from '../navigation/StickyNavbar' export default function GenericPostLayout({ post, children }) { if (!post) return - if (post.title === undefined & post.slug!="/about") throw new Error('Post title is required') + if (post.title === undefined & post.slug != "/about") throw new Error('Post title is required') const router = useRouter() @@ -21,7 +20,7 @@ export default function GenericPostLayout({ post, children }) { return ( - + diff --git a/components/layout/GenericWideLayout.js b/components/layout/GenericWideLayout.js index 3a9e068bbe8..c7fbb833e55 100644 --- a/components/layout/GenericWideLayout.js +++ b/components/layout/GenericWideLayout.js @@ -1,7 +1,5 @@ import Head from '../Head' import NavBar from '../navigation/NavBar' -import Container from './Container' -import Footer from '../Footer' import AnnouncementHero from '../campaigns/AnnoucementHero' import Row from './Row' diff --git a/components/layout/JobsLayout.js b/components/layout/JobsLayout.js index 3a55cce95d0..f4ff18be2e5 100644 --- a/components/layout/JobsLayout.js +++ b/components/layout/JobsLayout.js @@ -4,7 +4,6 @@ import Head from '../Head' import JobsContext from '../../context/JobsContext' import NavBar from '../navigation/NavBar' import Container from './Container' -import Footer from '../Footer' import JobSummary from '../JobSummary' import ApplyJobButton from '../buttons/ApplyJob' import StickyNavbar from '../navigation/StickyNavbar' diff --git a/cypress/test/footer/Footer.cy.js b/cypress/test/footer/Footer.cy.js new file mode 100644 index 00000000000..d0ad207ae64 --- /dev/null +++ b/cypress/test/footer/Footer.cy.js @@ -0,0 +1,42 @@ +import { mount } from '@cypress/react' +import Footer from '../../../components/footer/Footer' +import { socialMediaLinks, initiativeLinks } from '../../../components/footer/FooterList' + +describe('Footer component', () => { + beforeEach(() => { + mount(