-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #50 from frontendcafe/issue-38/cardMain-desktop
Issue 38/card main desktop
- Loading branch information
Showing
13 changed files
with
303 additions
and
25 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,4 +56,4 @@ function AppWithProviders() { | |
); | ||
} | ||
|
||
export default AppWithProviders; | ||
export default AppWithProviders; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,19 @@ | ||
export const card ={ | ||
title: "El nuevo vino de arandanos", | ||
description: "Tal y como su nombre indica, el vino de arándanos se elabora a partir de los arándanos. La piel y la carne de la planta se fermentan por completo durante algún tiempo para obtener el vino de arándanos. No sólo es un vino sabroso, sino que tambien ofrece varios", | ||
descBold: "beneficios para la salud.", | ||
paragraphs: [ | ||
{ | ||
title: "Anti-envejecimiento", | ||
description: "tiene ciertos componentes anti-envejecimiento, concretamente varios antioxidantes que son ricos en vitamina C y E. Estas vitaminas combaten eficientemente el envejecimiento." | ||
}, | ||
{ | ||
title: "Menos azúcar", | ||
description: "El vino hecho a partir de los arándanos aumenta nuestro sistema inmunológico de varias maneras. Este vino contiene menos azúcar que otras bayas, como las fresas y el saúco. Esto significa que la ingesta de vino de arándano no afecta negativamente el azúcar en la sangre." | ||
}, | ||
{ | ||
title: "Sistema inmunológico", | ||
description: "Los arándanos utilizados para hacer este vino producen compuestos que protegen nuestro sistema inmunológico. Puede reducir el colesterol e incluso reducir las tasas inflamatorias en el cuerpo." | ||
} | ||
] | ||
}; |
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,62 @@ | ||
import React from 'react'; | ||
import './styles.scss'; | ||
import { useHistory } from 'react-router'; | ||
import { card } from './data'; | ||
import image from '../../assets/imagen-card-main.png'; | ||
import Button from "../Button"; | ||
|
||
const CardMainDesktop = () => { | ||
|
||
const history = useHistory(); | ||
|
||
const handleClick = () => { | ||
history.push("/home") | ||
} | ||
|
||
return ( | ||
<div className="card-main"> | ||
<div className="card-main__container"> | ||
<div className="card-main__container__image"> | ||
<img src={image} alt="Imagen vino vindano" /> | ||
</div> | ||
|
||
<div className="top-text"> | ||
<h1>{ card.title }</h1> | ||
<p>{ card.description } <span>{ card.descBold }</span></p> | ||
</div> | ||
|
||
<div className="card-main__container__grid"> | ||
<div grid-area="box1"></div> | ||
<div grid-area="box2"></div> | ||
<article grid-area="p1"> | ||
<h2>{card.paragraphs[0].title}</h2> | ||
<p>{card.paragraphs[0].description}</p> | ||
</article> | ||
<div grid-area="box3"></div> | ||
<div grid-area="box4"></div> | ||
<article grid-area="p2"> | ||
<h2>{card.paragraphs[1].title}</h2> | ||
<p>{card.paragraphs[1].description}</p> | ||
</article> | ||
<div grid-area="box5"></div> | ||
<div grid-area="box6"></div> | ||
<article grid-area="p3"> | ||
<h2>{card.paragraphs[2].title}</h2> | ||
<p>{card.paragraphs[2].description}</p> | ||
</article> | ||
|
||
|
||
|
||
</div> | ||
|
||
<div className="bottom-text"> | ||
<p>Uno de los problemas es que beber vino de arándano puede llegar a convertirse en adictivo con el tiempo. Los amantes de este vino, por lo tanto, tienen que aprender a <span>consumirlo con moderación</span>. Para conservarlo una vez abierto, lo mejor es volverlo a tapar con el corcho y asegurarse de que no queda expuesto al aire.</p> | ||
</div> | ||
|
||
<Button variant="secondary" text="Volver" clases='card-container__button' onClick={handleClick}></Button> | ||
</div> | ||
</div> | ||
) | ||
} | ||
|
||
export default CardMainDesktop; |
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,173 @@ | ||
@use 'src/styles/utils' as *; | ||
|
||
.card-main { | ||
display: flex; | ||
justify-content: center; | ||
width: 100%; | ||
|
||
&__container { | ||
margin-top: 110px; | ||
max-width: 1200px; | ||
height: 100vh; | ||
background-color: $color-bg; | ||
color: $color-secondary; | ||
display: grid; | ||
grid-template-areas: "wine title title" | ||
"foot foot foot" | ||
"space space button"; | ||
|
||
|
||
&__image { | ||
width: 230px; | ||
height: 100%; | ||
grid-area: wine; | ||
img { | ||
width: 100%; | ||
height: 100%; | ||
} | ||
} | ||
|
||
&__grid { | ||
margin-top: 100px; | ||
max-width: 1200px; | ||
position: absolute; | ||
height: 100%; | ||
display: grid; | ||
place-content: center; | ||
grid-template-areas: | ||
"box1 box2 p1" | ||
"box3 box4 p2" | ||
"box5 box6 p3"; | ||
|
||
div { | ||
width: 100px; | ||
height: 200px; | ||
margin-left: 20px; | ||
} | ||
|
||
div[grid-area="box1"]{ | ||
grid-area: box1; | ||
} | ||
div[grid-area="box2"]{ | ||
grid-area: box2; | ||
border-top: 2px dotted $color-primary; | ||
border-left: 2px dotted $color-primary; | ||
margin-top: 50px; | ||
height: 50%; | ||
} | ||
div[grid-area="box3"]{ | ||
grid-area: box3; | ||
border-left: 2px dotted $color-primary; | ||
transform: translateX(20px); | ||
} | ||
div[grid-area="box4"]{ | ||
grid-area: box4; | ||
border-bottom: 2px dotted $color-primary; | ||
height: 50%; | ||
} | ||
div[grid-area="box5"]{ | ||
grid-area: box5; | ||
border-top: 2px dotted $color-primary; | ||
transform: translateX(20px); | ||
} | ||
div[grid-area="box6"]{ | ||
grid-area: box6; | ||
border-top: 2px dotted $color-primary; | ||
} | ||
|
||
article[grid-area="p1"] { | ||
grid-area: p1; | ||
} | ||
article[grid-area="p2"] { | ||
grid-area: p2; | ||
} | ||
article[grid-area="p3"] { | ||
grid-area: p3; | ||
} | ||
|
||
article { | ||
border-left: 2px dotted $color-primary; | ||
height: 100px; | ||
padding-left: 5px; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
} | ||
|
||
div::after, | ||
div::before { | ||
content:""; | ||
position: absolute; | ||
background-color: $color-primary; | ||
} | ||
|
||
div[grid-area="box2"]::after, | ||
div[grid-area="box3"]::after, | ||
div[grid-area="box4"]::after { | ||
border-radius: 50%; | ||
width: 25px; | ||
height: 25px; | ||
border: 4px solid white; | ||
} | ||
|
||
div[grid-area="box2"]::after{ | ||
margin-top: 90px; | ||
margin-left: -13px; | ||
} | ||
|
||
div[grid-area="box3"]::after{ | ||
margin-top: 0px; | ||
margin-left: -13px; | ||
} | ||
|
||
div[grid-area="box4"]::after{ | ||
margin-top: 85px; | ||
margin-left: -13px; | ||
} | ||
|
||
h2 { | ||
font-weight: bold; | ||
} | ||
|
||
@include media(md) { | ||
margin-top: 50px; | ||
} | ||
} | ||
|
||
.top-text { | ||
width: 100%; | ||
grid-area: title; | ||
|
||
transform: translateX(-50px); | ||
h1 { | ||
font-size: $size-lg; | ||
color: $color-primary; | ||
font-weight: bold; | ||
} | ||
} | ||
|
||
.bottom-text { | ||
grid-area: foot; | ||
} | ||
|
||
span { | ||
color: $color-secondary; | ||
font-weight: bold; | ||
} | ||
|
||
&__texts { | ||
width: 100%; | ||
} | ||
|
||
button { | ||
grid-area: button; | ||
width: 210px; | ||
height: 50px; | ||
margin: 0; | ||
|
||
@include media(sm) { | ||
margin: 50px; | ||
} | ||
} | ||
} | ||
} |
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
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
Oops, something went wrong.