From 2ee5cd30956b8b644038357ef46b937e741f3a1c Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Wed, 31 Mar 2021 17:02:31 +0200 Subject: [PATCH] fix about --- packages/website/data/footer.yaml | 46 +++++++++++++ packages/website/data/navigation.yaml | 6 -- .../FooterNavigation/FooterNavigation.js | 66 +++++-------------- packages/website/src/pages/about.js | 12 ++-- 4 files changed, 69 insertions(+), 61 deletions(-) create mode 100644 packages/website/data/footer.yaml delete mode 100644 packages/website/data/navigation.yaml diff --git a/packages/website/data/footer.yaml b/packages/website/data/footer.yaml new file mode 100644 index 00000000..cba46b30 --- /dev/null +++ b/packages/website/data/footer.yaml @@ -0,0 +1,46 @@ +- header: Skynet Labs + links: + - title: About us + to: / + - title: Brand Guidelines + href: https://support.siasky.net/key-concepts/skynet-brand-guidelines + - title: Careers + href: https://jobs.lever.co/nebulous + - title: Terms of Use + href: /terms.pdf + - title: Privacy Policy + href: /privacy.pdf +- header: Developers + links: + - title: Developer Guide + href: https://support.siasky.net/the-technology/developing-on-skynet + - title: API & SDK Documentation + href: https://siasky.net/docs/ + - title: Portal Setup + href: https://support.siasky.net/the-technology/running-a-web-portal +- header: Technology + links: + - title: What is Skynet? + href: https://support.siasky.net + - title: Frequent Questions + href: https://support.siasky.net/key-concepts/faqs + - title: Skynet Wiki + href: https://skynetwiki.tech + - title: Support + href: https://support.siasky.net +- header: Ecosystem + links: + - title: Sia Foundation + href: https://sia.tech + - title: Sia Foundation Forum + href: https://forum.sia.tech + - title: SiaStats + href: https://siastats.info + - title: Skynet AppStore" + href: https://skyapps.hns.siasky.net/ +- header: Skynet Webportals + links: + - title: Skydrain + href: https://skydrain.net + - title: SkyPortal + href: https://skyportal.xyz diff --git a/packages/website/data/navigation.yaml b/packages/website/data/navigation.yaml deleted file mode 100644 index b6e90e09..00000000 --- a/packages/website/data/navigation.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- name: Skynet Labs - items: - - name: About us - to: / - - name: Brand Guidelines - href: https://support.siasky.net/key-concepts/skynet-brand-guidelines diff --git a/packages/website/src/components/FooterNavigation/FooterNavigation.js b/packages/website/src/components/FooterNavigation/FooterNavigation.js index 19232e5a..84af6f5b 100644 --- a/packages/website/src/components/FooterNavigation/FooterNavigation.js +++ b/packages/website/src/components/FooterNavigation/FooterNavigation.js @@ -1,59 +1,25 @@ import * as React from "react"; +import { useStaticQuery, graphql } from "gatsby"; import classnames from "classnames"; import { motion, AnimatePresence } from "framer-motion"; import Link from "../Link"; -const sections = [ - { - header: "Skynet Labs", - links: [ - { title: "About us", to: "/about" }, - { - title: "Brand Guidelines", - href: "https://support.siasky.net/key-concepts/skynet-brand-guidelines", - }, - { title: "Careers", href: "https://jobs.lever.co/nebulous" }, - { title: "Terms of Use", href: "/terms.pdf" }, - { title: "Privacy Policy", href: "/privacy.pdf" }, - ], - }, - { - header: "Developers", - links: [ - { title: "Developer Guide", href: "https://support.siasky.net/the-technology/developing-on-skynet" }, - { title: "API & SDK Documentation", href: "https://siasky.net/docs/" }, - { title: "Portal Setup", href: "https://support.siasky.net/the-technology/running-a-web-portal" }, - ], - }, - { - header: "Technology", - links: [ - { title: "What is Skynet?", href: "https://support.siasky.net" }, - { title: "Frequent Questions", href: "https://support.siasky.net/key-concepts/faqs" }, - // { title: "Pricing", to: "/pricing" }, - { title: "Skynet Wiki", href: "https://skynetwiki.tech" }, - { title: "Support", href: "https://support.siasky.net" }, - ], - }, - { - header: "Ecosystem", - links: [ - { title: "Sia Foundation", href: "https://sia.tech" }, - { title: "Sia Foundation Forum", href: "https://forum.sia.tech" }, - { title: "SiaStats", href: "https://siastats.info" }, - { title: "Skynet AppStore", href: "https://skyapps.hns.siasky.net/" }, - ], - }, - { - header: "Skynet Webportals", - links: [ - { title: "Skydrain", href: "https://skydrain.net" }, - { title: "SkyPortal", href: "https://skyportal.xyz" }, - ], - }, -]; - const FooterNavigation = () => { + const { allFooterYaml } = useStaticQuery(graphql` + query FooterQuery { + allFooterYaml { + nodes { + header + links { + href + title + to + } + } + } + } + `); + const sections = allFooterYaml.nodes; const [activeSection, setActiveSection] = React.useState(sections[0]); return ( diff --git a/packages/website/src/pages/about.js b/packages/website/src/pages/about.js index ba479a0e..9ab776ed 100644 --- a/packages/website/src/pages/about.js +++ b/packages/website/src/pages/about.js @@ -101,11 +101,13 @@ const TeamCard = ({ image, name, position, social }) => ( {social && (
- {Object.entries(social).map(([platform, href]) => ( - - - - ))} + {Object.entries(social) + .filter(([platform, href]) => href) + .map(([platform, href]) => ( + + + + ))}
)}