From 8a70f14319cbeaf8cdecf9f033c7141f471c8156 Mon Sep 17 00:00:00 2001 From: Valeriy S Date: Thu, 24 Jan 2019 16:02:37 +0300 Subject: [PATCH] fix(client): footer: use react-bootstrap, simplify layout, correct links --- client/src/components/Footer/footer.css | 16 ++- client/src/components/Footer/index.js | 139 ++++++++++++++++-------- 2 files changed, 105 insertions(+), 50 deletions(-) diff --git a/client/src/components/Footer/footer.css b/client/src/components/Footer/footer.css index 0813b77dbd..59c581f60f 100644 --- a/client/src/components/Footer/footer.css +++ b/client/src/components/Footer/footer.css @@ -1,13 +1,21 @@ -footer { - position: absolute; +.footer { background-color: #e0e0e0; color: #555555; - background-size: cover; font-size: 0.9em; width: 100%; padding-top: 40px; } -footer b { +.footer .col-header { padding-bottom: 5px; + font-weight: bold; +} + +.footer a:not([class*='inline']) { + display: block; +} + +.footer .external-link-icon { + margin-left: 5px; + color: #6d6d6d; } diff --git a/client/src/components/Footer/index.js b/client/src/components/Footer/index.js index c7722afd0d..bdc8e77351 100644 --- a/client/src/components/Footer/index.js +++ b/client/src/components/Footer/index.js @@ -1,13 +1,44 @@ -/* eslint-disable max-len*/ import React from 'react'; +import { Link as GatsbyLink } from 'gatsby'; +import { Grid, Row, Col } from '@freecodecamp/react-bootstrap'; +import FontAwesomeIcon from '@fortawesome/react-fontawesome'; +import { faExternalLinkAlt } from '@fortawesome/free-solid-svg-icons'; + import './footer.css'; +const ColHeader = ({ children, ...other }) => ( +
+ {children} +
+); + +const Link = ({ children, to, external, ...other }) => { + if (!external && (/^\/(?!\/)/).test(to)) { + return ( + + {children} + + ); + } + + return ( + + {children} + + + ); +}; + function Footer() { return ( - ); } +Footer.displayName = 'Footer'; export default Footer;