converted footer to functional component
This commit is contained in:
parent
be04d04039
commit
1298b2e8d4
1 changed files with 27 additions and 30 deletions
|
@ -1,11 +1,14 @@
|
|||
import React from "react"
|
||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"
|
||||
import { faGithub } from "@fortawesome/free-brands-svg-icons"
|
||||
import styled from "styled-components"
|
||||
|
||||
import theming from "../theming"
|
||||
|
||||
const StyledFooter = styled.footer`
|
||||
display: flex;
|
||||
height: 7.77rem; /* congratulation. You've found the lucky 777 */
|
||||
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
color: ${(props) =>
|
||||
|
@ -23,24 +26,18 @@ const StyledFooter = styled.footer`
|
|||
|
||||
const StyledFooterContainer = styled.div`
|
||||
display: flex;
|
||||
padding: 0 1rem 0 1rem;
|
||||
justify-content: space-between;
|
||||
|
||||
padding: 0 1rem 0 1rem;
|
||||
|
||||
height: 100px;
|
||||
width: 100%;
|
||||
line-height: 100px;
|
||||
text-align: center;
|
||||
color: gray;
|
||||
|
||||
width: 100%;
|
||||
max-width: ${theming.size.screen_size2};
|
||||
`
|
||||
|
||||
const CreatedBy = styled.div`
|
||||
color: gray;
|
||||
`
|
||||
|
||||
const StyledALink = styled.a`
|
||||
font-size: 2rem;
|
||||
const StyledGithubLink = styled.a`
|
||||
font-size: 2.5rem;
|
||||
|
||||
color: ${(props) =>
|
||||
theming.theme(props.theme.currentTheme, {
|
||||
|
@ -57,23 +54,23 @@ const StyledALink = styled.a`
|
|||
}
|
||||
`
|
||||
|
||||
export default class Footer extends React.Component {
|
||||
render() {
|
||||
const Footer = () => {
|
||||
return (
|
||||
<StyledFooter>
|
||||
<StyledFooterContainer>
|
||||
<CreatedBy>
|
||||
<div>
|
||||
Created by <b>developomp</b>
|
||||
</CreatedBy>
|
||||
</div>
|
||||
|
||||
<StyledALink
|
||||
<StyledGithubLink
|
||||
href="https://github.com/developomp/developomp-site"
|
||||
target="_blank"
|
||||
>
|
||||
<FontAwesomeIcon icon={faGithub} />
|
||||
</StyledALink>
|
||||
</StyledGithubLink>
|
||||
</StyledFooterContainer>
|
||||
</StyledFooter>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default Footer
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue