chore: componentize footer

This commit is contained in:
Kyle Gill
2019-05-19 11:38:22 -06:00
parent 35e11d6134
commit a67744c31d
6 changed files with 70 additions and 66 deletions

55
src/components/Footer.js Normal file
View File

@@ -0,0 +1,55 @@
import React from "react"
import { Link } from "gatsby"
import { css } from "@emotion/core"
import styled from "@emotion/styled"
import { withTheme } from "emotion-theming"
import Logo from "components/Logo"
const FooterBlock = styled.footer`
margin-top: 120px;
padding: 30px 0px;
text-align: center;
color: ${props => props.theme.colors.secondary};
`
const linkStyles = css`
cursor: pointer;
text-decoration: none;
margin: 10px;
`
const FooterLink = styled(Link)`
${linkStyles}
color: ${props => props.theme.colors.secondary};
&:hover {
color: ${props => props.theme.colors.tertiary};
}
`
const FooterAnchor = styled.a`
${linkStyles}
color: ${props => props.theme.colors.secondary};
&:hover {
color: ${props => props.theme.colors.tertiary};
}
`
const Footer = ({ theme }) => (
<FooterBlock>
<div>
<Logo color={theme.colors.secondary} />
</div>
<div>
<FooterAnchor
href="https://github.com/gillkyle/sol-journal"
rel="target noopener"
target="_blank"
>
View on GitHub
</FooterAnchor>
<FooterLink to="terms">Terms of Service</FooterLink>
<FooterLink to="privacy">Privacy Policy</FooterLink>
</div>
<div>&copy; 2019</div>
</FooterBlock>
)
export default withTheme(Footer)

View File

@@ -3,7 +3,6 @@ import { Helmet } from "react-helmet"
import { Global, css } from "@emotion/core"
import styled from "@emotion/styled"
import { SimpleNavbar } from "components/Navbar"
import { withTheme } from "emotion-theming"
const Layout = ({ children, theme }) => (
@@ -12,9 +11,9 @@ const Layout = ({ children, theme }) => (
<Global
styles={css`
* {
/* transition: 0.2s border-color ease-in-out, 0.2s fill ease-in-out,
transition: 0.2s border-color ease-in-out, 0.2s fill ease-in-out,
0.2s box-shadow ease-in-out, 0.2s background-color ease-in-out,
0.2s color ease-in-out; */
0.2s color ease-in-out;
overflow: -moz-scrollbars-none;
}
*::-webkit-scrollbar {

View File

@@ -34,23 +34,24 @@ export const Input = styled.input`
export const Button = styled.button`
display: inline;
background-color: ${props => props.colors.primary};
color: ${props => props.colors.primary};
background-color: ${props => props.colors.button};
border-color: ${props => props.colors.quarternary};
padding: 12px 50px;
min-height: 45px;
border-radius: 5px;
border: 0px solid;
border-color: ${props => props.colors.quarternary};
color: ${props => props.colors.quarternary};
font-family: Montserrat;
font-size: ${props => SIZES[props.fontSize || "normal"]};
font-weight: 700;
outline: none;
&:hover {
cursor: pointer;
background-color: ${props => props.colors.secondary};
background-color: ${props => props.colors.hover};
box-shadow: 0 0 0 3px ${props => props.colors.bodyBackground},
0 0 0 5px ${props => props.colors.button};
}
&:focus {
box-shadow: 0 0 0 3px ${props => props.colors.bodyBackground},
0 0 0 5px ${props => props.colors.secondary};
}
`