-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* remove project reference * add Hero component and theme from css * Fixed test Co-authored-by: Roberto Molina <[email protected]>
- Loading branch information
1 parent
e323760
commit d4313ed
Showing
30 changed files
with
504 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import styled, { keyframes, css } from 'styled-components'; | ||
|
||
export const spin = keyframes` | ||
from { | ||
transform: rotate(0deg); | ||
} | ||
to { | ||
transform: rotate(360deg); | ||
} | ||
`; | ||
|
||
export const upDown = keyframes` | ||
from { | ||
transform: translate3d(0,25px,0); | ||
} | ||
to { | ||
transform: translate3d(0,-50px,0); | ||
} | ||
`; | ||
|
||
export const upDownWide = keyframes` | ||
from { | ||
transform: translate3d(0,0,0); | ||
} | ||
to { | ||
transform: translate3d(0,-150px,0); | ||
} | ||
`; | ||
|
||
export const upDownAnimation = css` | ||
animation: ${upDown} 7s ease-in-out infinite alternate; | ||
`; | ||
|
||
export const upDownWideAnimation = css` | ||
animation: ${upDownWide} 15s ease-in-out infinite alternate; | ||
`; | ||
|
||
export const UpDown = styled.div` | ||
${upDownAnimation}; | ||
position: relative; | ||
${(props) => props} | ||
`; | ||
|
||
export const UpDownWide = styled.div` | ||
${upDownWideAnimation}; | ||
position: relative; | ||
${(props) => props} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import styled from 'styled-components'; | ||
|
||
export const CircleShape = styled.div` | ||
position: relative; | ||
background-image: linear-gradient(${(props) => `${props.deg}, ${props.primary}, ${props.secondary}`}); | ||
border-radius: 9999px; | ||
z-index: 1; | ||
height: 100px; | ||
width: 100px; | ||
${(props) => props}; | ||
`; | ||
|
||
export default CircleShape; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import React from 'react'; | ||
import logo from 'app-assets/images/react.svg'; | ||
import NanLabsIcon from 'components/NanLabsIcon'; | ||
import ShapeBackground from 'components/ShapeBackground'; | ||
import useWindowSize from 'hooks/useWindowSize'; | ||
|
||
import { | ||
Root, | ||
HeroContainer, | ||
TextContainer, | ||
Title, | ||
Subtitle, | ||
IllustrationContainer, | ||
Image, | ||
ImageContainer, | ||
} from './styles.js'; | ||
|
||
const Hero = () => { | ||
const windowSize = useWindowSize(); | ||
const showIllustration = windowSize.width > 1200; | ||
|
||
console.log('showIllustration', showIllustration); | ||
|
||
return ( | ||
<Root> | ||
<HeroContainer> | ||
<TextContainer fullWidth={!showIllustration}> | ||
<Title>Agregar un titulo</Title> | ||
<Subtitle>Agregar un subtitulo</Subtitle> | ||
</TextContainer> | ||
{showIllustration && ( | ||
<IllustrationContainer> | ||
<Image src={logo} position="absolute" alt="logo" top="-12vw" right="-5vw" height="21vw" /> | ||
<ImageContainer top="1vw" right="10vw"> | ||
<NanLabsIcon | ||
fill={'#5d73f5'} | ||
width="17vw" | ||
height="17vw" | ||
filter={'drop-shadow( 3px 3px 2px rgba(0, 0, 0, .4))'} | ||
/> | ||
</ImageContainer> | ||
</IllustrationContainer> | ||
)} | ||
<ShapeBackground /> | ||
</HeroContainer> | ||
</Root> | ||
); | ||
}; | ||
export default Hero; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
import styled from 'styled-components'; | ||
|
||
export const Root = styled.div` | ||
display: flex; | ||
flex: 1; | ||
align-items: center; | ||
justify-content: center; | ||
width: 100%; | ||
overflow: hidden; | ||
background-color: var(--background-color); | ||
`; | ||
|
||
export const HeroContainer = styled.div` | ||
display: flex; | ||
flex: 1; | ||
flex-direction: row; | ||
align-items: stretch; | ||
justify-content: flex-start; | ||
height: 100%; | ||
max-width: 1500px; | ||
min-height: 250px; | ||
margin: 60px 100px; | ||
position: relative; | ||
@media (max-width: var(--breakpoint-mobile)px) { | ||
margin: 60px 30px; | ||
} | ||
`; | ||
|
||
export const TextContainer = styled.div` | ||
display: flex; | ||
width: ${(props) => (props.fullWidth ? '100%' : '50%')}; | ||
flex-direction: column; | ||
z-index: 100; | ||
`; | ||
|
||
export const Title = styled.h1` | ||
color: var(--text-color-primary); | ||
font-size: 48px; | ||
font-weight: 700; | ||
text-align: left; | ||
line-height: 1.25; | ||
margin: 4px 0; | ||
@media (max-width: var(--breakpoint-mobile)px) { | ||
font-size: 26px; | ||
} | ||
`; | ||
|
||
export const Subtitle = styled.h2` | ||
color: var(--text-color-secondary); | ||
font-size: 20px; | ||
font-weight: 400; | ||
text-align: left; | ||
line-height: 1.65; | ||
margin: 10px 0; | ||
@media (max-width: var(--breakpoint-mobile)px) { | ||
font-size: 18px; | ||
} | ||
`; | ||
|
||
export const IllustrationContainer = styled.div` | ||
display: block; | ||
width: 100%; | ||
height: 100%; | ||
position: absolute; | ||
`; | ||
|
||
export const Image = styled.img` | ||
position: absolute; | ||
z-index: 10; | ||
${(props) => props}; | ||
`; | ||
|
||
export const ImageContainer = styled.div` | ||
position: absolute; | ||
z-index: 10; | ||
${(props) => props}; | ||
`; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default } from './NanBrand.js'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import React from 'react'; | ||
|
||
const NanLabsIcon = (props) => { | ||
return ( | ||
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 108 108" {...props}> | ||
<path d="m54 0c-29.8 0-54 24.2-54 54s24.2 54 54 54 54-24.2 54-54-24.2-54-54-54zm16.2 14v60.8l-30.3-61.6c4.4-1.5 9.1-2.4 14.1-2.4 5.7 0 11.2 1.1 16.2 3.2zm-59.4 40c0-13.6 6.3-25.8 16.2-33.7v67.4c-9.9-7.9-16.2-20.1-16.2-33.7zm26.9 40v-60.8l30.3 61.6c-4.4 1.5-9.1 2.4-14.1 2.4-5.7 0-11.2-1.1-16.2-3.2zm43.3-6.3v-67.4c9.9 7.9 16.2 20.1 16.2 33.7s-6.4 25.8-16.2 33.7z"></path> | ||
</svg> | ||
); | ||
}; | ||
|
||
export default NanLabsIcon; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import styled from 'styled-components'; | ||
|
||
export const RingShape = styled.div` | ||
position: relative; | ||
background-color: transparent; | ||
z-index: 1; | ||
border-width: 20px; | ||
border-style: solid; | ||
border-radius: 9999px; | ||
height: ${(props) => props.size || '100px'}; | ||
width: ${(props) => props.size || '100px'}; | ||
border-color: ${(props) => props.color || 'teal'}; | ||
border-width: ${(props) => props.ring || '20px'}; | ||
${(props) => props}; | ||
`; | ||
|
||
export default RingShape; |
Oops, something went wrong.