Skip to content

Commit

Permalink
created the Footer, a Info landing page and related styles
Browse files Browse the repository at this point in the history
  • Loading branch information
heldrida committed Feb 14, 2020
1 parent 91a515e commit f231120
Show file tree
Hide file tree
Showing 6 changed files with 81 additions and 2 deletions.
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
-->
<title>Punkbit - REACT Star Wars SWAPI GRAPHQL WRAPPER API</title>
<style>
@import url("https://fonts.googleapis.com/css?family=Fredoka+One|Nunito:400,800&display=swap");
@import url("https://fonts.googleapis.com/css?family=Nunito:400,800&display=swap");
</style>
</head>
<body>
Expand Down
8 changes: 8 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import { ThemeProvider } from "styled-components";
import { themeConf, DefaultStyles } from './styled'
import { NavigationBar, BoxWrapper, Game } from './Components'
import { GameProvider } from './Context'
import Footer from './Components/Footer'
import Info from './Components/Info'

const App = () => {
return (
Expand All @@ -13,6 +15,12 @@ const App = () => {
<Router>
<NavigationBar />
<Switch>
<Route exact path="/">
<BoxWrapper>
<Info />
<Footer />
</BoxWrapper>
</Route>
<Route exact path="/game">
<BoxWrapper>
<GameProvider>
Expand Down
29 changes: 29 additions & 0 deletions src/Components/Footer/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import React from 'react'
import styled from 'styled-components'
import { TPropFlag } from '../../Types'

const FooterContainer = styled.div<TPropFlag>`
padding: 1rem 0;
color: ${(props: TPropFlag) => props.theme.color7};
opacity: 0.42;
text-align: right;
`

const FooterItem = styled.div`
font-size: 1rem;
font-family: "Nunito", sans-serif;
& > a {
font-weight: bold;
text-decoration: none;
color: ${(props: TPropFlag) => props.theme.color7}
}
`

const Footer = () => (
<FooterContainer>
<FooterItem>Created by <a href="http://punkbit.com">Punkbit</a> 2020</FooterItem>
</FooterContainer>
)

export default Footer
34 changes: 34 additions & 0 deletions src/Components/Info/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import React from 'react'
import styled from 'styled-components'
import { TPropFlag } from '../../Types'
import CtaButton from '../CtaButton'
import { Link } from 'react-router-dom'

const InfoContainer = styled.div<TPropFlag>`
padding: 1rem 0;
color: ${(props: TPropFlag) => props.theme.darkText};
opacity: 0.42;
font-size: 2rem;
& > p {
font-size: 1.4rem;
line-height: 1.6;
}
& > a {
color: ${(props: TPropFlag) => props.theme.color7};
}
`

const Info = () => (
<InfoContainer>
<p>This projects depends on the <a href="http://graphql.org/swapi-graphql" target="_blank">GraphQl wrapper</a> for the Star Wars API; To avoid CORS or 405 (as confirmed after a reverse proxy at the time of writting, might be different today), run the following <a href="https://docs.docker.com/install/" target="_blank">Docker</a> and <a href="https://github.com/heldrida/react-star-wars-swapi-graphql" target="_blank">service</a> locally.</p>
<p>If you're checking a live preview link, have in mind that the Graphql API might be down at any time, so please find the project source code in my <a href="https://github.com/heldrida" target="_blank">Github</a> account and run the project by following the instructions provided in the README file. I wrote this project after a request by a company, but put a bit more work to have the following stack available openly: React v16.8, GraphQl w/ Apollo, Hooks effects, memo Cb and local state, styled-components; Javascript + TypeScript, popmotion, etc. Also, Docker!</p>
<p>Should update the project whenever possible, so you might find a few performance issues in the animations or transitions, solely Desktop tested and developed in Firefox Quantum and Chrome Thanks for reading!</p>
<Link to='/game'>
<CtaButton>To proceed...</CtaButton>
</Link>
</InfoContainer>
)

export default Info
4 changes: 3 additions & 1 deletion src/Components/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ export { default as SelectBox } from './SelectBox'
export { default as Game } from './Game'
export { default as GameBoard } from './GameBoard'
export { default as GameCard } from './GameCard'
export { default as CtaButton } from './CtaButton'
export { default as CtaButton } from './CtaButton'
export { default as Footer } from './Footer'
export { default as Info } from './Info'
6 changes: 6 additions & 0 deletions src/styled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ const themeConf: TThemeConf = {
}

const DefaultStyles = createGlobalStyle`
* {
text-decoration: none;
}
body {
padding: 0;
margin: 0;
Expand All @@ -33,6 +36,9 @@ const DefaultStyles = createGlobalStyle`
margin: 0;
padding: 0;
}
p, li, div, a {
font-family: "Nunito", sans-serif;
}
*:focus {
outline: none;
}
Expand Down

0 comments on commit f231120

Please sign in to comment.