Skip to content

Commit

Permalink
Merge pull request React-Avancado#9 from Won-Games/develop
Browse files Browse the repository at this point in the history
[Feature] Final Page
  • Loading branch information
willianjusten authored Jun 10, 2020
2 parents 78a8282 + f9e4672 commit 17c48ba
Show file tree
Hide file tree
Showing 78 changed files with 3,505 additions and 93 deletions.
5 changes: 4 additions & 1 deletion jsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"compilerOptions": {
"baseUrl": "./src"
"baseUrl": "./src",
"paths": {
"@images/*": ["images/*"]
}
}
}
21 changes: 15 additions & 6 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
const withPlugins = require('next-compose-plugins')
const withPWA = require('next-pwa')
const optimizedImages = require('next-optimized-images')

const isProd = process.env.NODE_ENV === 'production'

module.exports = withPWA({
pwa: {
dest: 'public',
disable: !isProd
}
})
module.exports = withPlugins([
[
withPWA,
{
pwa: {
dest: 'public',
disable: !isProd
}
}
],
optimizedImages
])
11 changes: 10 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,21 @@
"prettier": "^2.0.5"
},
"dependencies": {
"imagemin-mozjpeg": "^9.0.0",
"imagemin-optipng": "^8.0.0",
"next": "^9.4.4",
"next-compose-plugins": "^2.2.0",
"next-optimized-images": "^2.6.1",
"next-pwa": "^2.4.1",
"next-seo": "^4.5.0",
"prop-types": "^15.7.2",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-icons": "^3.10.0",
"react-mailchimp-subscribe": "^2.1.0",
"react-slick": "^0.26.1",
"styled-components": "^5.1.1",
"styled-media-query": "^2.1.2"
"styled-media-query": "^2.1.2",
"webp-loader": "^0.6.0"
}
}
Binary file added public/fonts/poppins-v9-latin-regular.woff
Binary file not shown.
Binary file added public/fonts/poppins-v9-latin-regular.woff2
Binary file not shown.
Binary file removed public/img/authors/guilherme.png
Binary file not shown.
Binary file removed public/img/authors/willian.png
Binary file not shown.
Binary file removed public/img/project.png
Binary file not shown.
Binary file removed public/img/reviews/reviewer.jpg
Binary file not shown.
1 change: 1 addition & 0 deletions public/img/tech/react.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/components/Analytics/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const Analytics = () => (
<>
<script
async
rel="dns-prefetch"
src={`https://www.googletagmanager.com/gtag/js?id=${process.env.NEXT_PUBLIC_GA_TRACKING}`}
/>
<script
Expand Down
25 changes: 25 additions & 0 deletions src/components/Button/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import React from 'react'
import PropTypes from 'prop-types'

import * as S from './styles'

const Button = ({ children, wide, withPrice, href, onClick }) => (
<S.ButtonWrapper
href={href}
wide={wide}
withPrice={withPrice}
onClick={onClick}
>
{children}
</S.ButtonWrapper>
)

Button.propTypes = {
children: PropTypes.node.isRequired,
href: PropTypes.string.isRequired,
wide: PropTypes.bool,
withPrice: PropTypes.bool,
onClick: PropTypes.func
}

export default Button
38 changes: 38 additions & 0 deletions src/components/Button/styles.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import styled, { css } from 'styled-components'
import media from 'styled-media-query'

const buttonModifiers = {
withPrice: (theme) => css`
display: flex;
align-items: center;
justify-content: space-between;
padding: ${theme.spacings.xsmall};
`,
wide: (theme) => css`
padding: 1.3rem ${theme.spacings.medium};
${media.greaterThan('medium')`
padding: 1.3rem ${theme.spacings.large};
`}
`
}

export const ButtonWrapper = styled.a`
${({ theme, wide, withPrice }) => css`
background: ${theme.colors.primary};
border-radius: ${theme.border.radius};
color: ${theme.colors.white};
font-size: ${theme.font.sizes.xsmall};
text-decoration: none;
text-align: center;
white-space: nowrap;
transition: background 0.3s ease-in-out;
&:hover {
background: ${theme.colors.primaryHover};
}
${wide && buttonModifiers.wide(theme)};
${withPrice && buttonModifiers.withPrice(theme)};
`}
`
23 changes: 23 additions & 0 deletions src/components/CardModule/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import React from 'react'
import PropTypes from 'prop-types'

import * as S from './styles'

const CardModule = ({ title, subTitle, children }) => (
<S.Card>
<S.TitleWrapper>
<S.Title>{title}</S.Title>
<S.SubTitle>{subTitle}</S.SubTitle>
</S.TitleWrapper>

<S.Content>{children}</S.Content>
</S.Card>
)

CardModule.propTypes = {
title: PropTypes.string.isRequired,
subTitle: PropTypes.string.isRequired,
children: PropTypes.node.isRequired
}

export default CardModule
42 changes: 42 additions & 0 deletions src/components/CardModule/styles.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import styled, { css } from 'styled-components'

export const Card = styled.article`
${({ theme }) => css`
background-color: ${theme.colors.white};
padding: ${theme.spacings.medium};
color: ${theme.colors.black};
font-size: ${theme.font.sizes.xsmall};
border-radius: ${theme.border.radius};
`}
`

export const TitleWrapper = styled.div`
${({ theme }) => css`
border-left: 6px solid ${theme.colors.primary};
padding-left: ${theme.spacings.xsmall};
margin-bottom: ${theme.spacings.xsmall};
`}
`

export const Title = styled.h2`
${({ theme }) => css`
font-size: ${theme.font.sizes.medium};
font-weight: bold;
`}
`

export const SubTitle = styled.h3`
${({ theme }) => css`
font-size: ${theme.font.sizes.xxsmall};
font-weight: normal;
color: ${theme.colors.gray};
`}
`

export const Content = styled.div`
${({ theme }) => css`
p + p {
margin-top: ${theme.spacings.small};
}
`}
`
15 changes: 15 additions & 0 deletions src/components/Container/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import React from 'react'
import PropTypes from 'prop-types'

import * as S from './styles'

const Container = ({ children, id }) => (
<S.Container id={id}>{children}</S.Container>
)

Container.propTypes = {
children: PropTypes.node.isRequired,
id: PropTypes.string
}

export default Container
14 changes: 14 additions & 0 deletions src/components/Container/styles.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import styled, { css } from 'styled-components'
import media from 'styled-media-query'

export const Container = styled.div`
${({ theme }) => css`
max-width: ${theme.grid.container};
padding: ${theme.spacings.large} calc(${theme.grid.gutter} / 2);
margin: 0 auto;
${media.greaterThan('medium')`
padding: ${theme.spacings.large} calc(${theme.grid.gutter} / 2);
`}
`}
`
22 changes: 22 additions & 0 deletions src/components/Footer/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import React from 'react'

import Container from 'components/Container'

import * as S from './styles'

const Footer = () => (
<S.Wrapper>
<Container>
<p>
Desenvolvido por{' '}
<a href="https://willianjusten.com.br/">Willian Justen </a>e
<a href="https://guilouro.dev"> Guilherme Louro</a>
</p>
<p>
Design por <a href="http://vmarcosp.dribbble.com/">Marcos Oliveira</a>
</p>
</Container>
</S.Wrapper>
)

export default Footer
27 changes: 27 additions & 0 deletions src/components/Footer/styles.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import styled, { css } from 'styled-components'
import media from 'styled-media-query'

export const Wrapper = styled.footer`
${({ theme }) => css`
background: ${theme.colors.white};
color: ${theme.colors.gray};
text-align: center;
font-size: 1.3rem;
line-height: ${theme.font.sizes.xlarge};
position: relative;
z-index: 2;
margin-top: -${theme.spacings.medium};
${media.greaterThan('medium')`
font-size: ${theme.font.sizes.small};
margin-top: -${theme.spacings.xxlarge};
padding-bottom: ${theme.spacings.large};
`}
a {
color: ${theme.colors.primary};
text-decoration: none;
border-bottom: 1px solid ${theme.colors.primary};
}
`}
`
23 changes: 23 additions & 0 deletions src/components/Heading/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import React from 'react'
import PropTypes from 'prop-types'

import * as S from './styles'

const Heading = ({ reverseColor, lineBottom, children }) => (
<S.Wrapper reverseColor={reverseColor} lineBottom={lineBottom}>
{children}
</S.Wrapper>
)

Heading.propTypes = {
reverseColor: false,
lineBottom: false
}

Heading.propTypes = {
reverseColor: PropTypes.bool,
lineBottom: PropTypes.bool,
children: PropTypes.string.isRequired
}

export default Heading
47 changes: 47 additions & 0 deletions src/components/Heading/styles.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import styled, { css } from 'styled-components'
import media from 'styled-media-query'

const wrapperModifiers = {
defaultColor: (theme) => css`
color: ${theme.colors.black};
`,

reverseColor: (theme) => css`
color: ${theme.colors.white};
`,

lineLeft: (theme) => css`
border-left: 7px solid ${theme.colors.secondary};
`,

lineBottom: (theme) => css`
padding-left: 0;
position: relative;
margin-bottom: ${theme.spacings.medium};
&::after {
content: ' ';
border-bottom: 5px solid ${theme.colors.primary};
width: 5rem;
position: absolute;
left: 0;
bottom: -1rem;
}
`
}

export const Wrapper = styled.h2`
${({ theme, reverseColor, lineBottom }) => css`
padding-left: 1rem;
font-size: ${theme.font.sizes.medium};
${media.greaterThan('medium')`
font-size: ${theme.font.sizes.large};
`}
${!reverseColor && wrapperModifiers.defaultColor(theme)};
${reverseColor && wrapperModifiers.reverseColor(theme)};
${lineBottom && wrapperModifiers.lineBottom(theme)};
${!lineBottom && wrapperModifiers.lineLeft(theme)};
`}
`
Loading

0 comments on commit 17c48ba

Please sign in to comment.