-
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 #57 from frontendcafe/issue-27/card-nuestros-vinos
Issue 27/card nuestros vinos
- Loading branch information
Showing
5 changed files
with
214 additions
and
4 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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import React from 'react'; | ||
import Button from '../Button'; | ||
import './styles.scss'; | ||
|
||
const CardOurWinesDesktop = ({title, img, background, info}) => { | ||
|
||
return ( | ||
<section className={`cardWine cardWine--${background}`}> | ||
<img className="cardWine-img"src={img} alt="Imagen de vino"/> | ||
<div className="cardWine__container"> | ||
<div className="cardWine__container-text"> | ||
<h2>{title.substring (0, title.indexOf("-")-1)}</h2> | ||
<h3>{title.substring(title.indexOf("-")+1, title.length)}</h3> | ||
</div> | ||
<p className="cardWine__container-info">{info}</p> | ||
<Button variant="secondary" text="Quiero saber más" clases="cardWine__container-button"></Button> | ||
</div> | ||
</section> | ||
) | ||
} | ||
export default CardOurWinesDesktop; |
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,110 @@ | ||
@use 'src/styles/utils' as *; | ||
|
||
.cardWine { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: flex-end; | ||
width: 382px; | ||
border-radius: 2px; | ||
height: 700px; | ||
margin-top: 100px; | ||
margin-left: 80px; | ||
position: relative; | ||
|
||
&--primary { | ||
background-color: $color-primary; | ||
} | ||
|
||
&--secondary { | ||
background-color: $color-secondary; | ||
} | ||
|
||
&--colorCard { | ||
background-color: $color-card; | ||
} | ||
|
||
&-img { | ||
width: 146px; | ||
position: absolute; | ||
top: -20px; | ||
} | ||
|
||
&__container { | ||
display: flex; | ||
|
||
&-text { | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
transform: translateY(-30px); | ||
|
||
h2, h3 { | ||
font-size: $size-3xl; | ||
font-weight: 700; | ||
line-height: 42px; | ||
letter-spacing: 0.05em; | ||
color: $color-bg; | ||
} | ||
} | ||
|
||
&-info { | ||
display: none; | ||
} | ||
|
||
&-button { | ||
display: none; | ||
} | ||
} | ||
|
||
&:hover { | ||
width: 650px; | ||
flex-direction: row; | ||
@include media(lg) { | ||
width: 850px; | ||
} | ||
& .cardWine{ | ||
&-img{ | ||
width: 220px; | ||
top: -80px; | ||
left: -75px; | ||
} | ||
&__container{ | ||
flex-direction: column; | ||
padding-left: 170px; | ||
|
||
&-text { | ||
flex-direction: row; | ||
transform: translateY(0px); | ||
padding-bottom: 60px; | ||
justify-content: flex-start; | ||
|
||
h3 { | ||
padding-left: 6px; | ||
} | ||
} | ||
|
||
&-info { | ||
display: inline; | ||
justify-content: center; | ||
align-items: center; | ||
color: $color-bg; | ||
font-size: 20px; | ||
font-weight: 400; | ||
line-height: 30px; | ||
letter-spacing: 0.05em; | ||
padding-right: 30px; | ||
|
||
} | ||
|
||
&-button { | ||
display: inline; | ||
width: 167px; | ||
margin-top: 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import React from 'react'; | ||
import Button from '../Button'; | ||
import './styles.scss'; | ||
|
||
const CardOurWinesMobile = ({title, img, background}) => { | ||
|
||
return ( | ||
<section className={`cardWineMobile cardWineMobile--${background}`}> | ||
<div className="cardWineMobile__container"> | ||
<img className="cardWineMobile__container-img"src={img} alt="Imagen de vino"/> | ||
<div className="cardWineMobile__container-text"> | ||
<h2>{title.substring (0, title.indexOf("-")-1)}</h2> | ||
<h3>{title.substring(title.indexOf("-")+1, title.length)}</h3> | ||
</div> | ||
</div> | ||
<Button variant="secondary" text="Más información" clases="cardWineMobile__button"></Button> | ||
</section> | ||
) | ||
} | ||
|
||
export default CardOurWinesMobile; |
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,55 @@ | ||
@use 'src/styles/utils' as *; | ||
|
||
.cardWineMobile { | ||
display: flex; | ||
flex-direction: column; | ||
width: 185px; | ||
border-radius: $rounded; | ||
margin: 30px; | ||
|
||
&--primary { | ||
background-color: $color-primary; | ||
} | ||
|
||
&--secondary { | ||
background-color: $color-secondary; | ||
} | ||
|
||
&--colorCard { | ||
background-color: $color-card; | ||
} | ||
|
||
&__container { | ||
display: flex; | ||
flex-direction: row; | ||
margin: 0px 10px; | ||
|
||
&-text { | ||
display: flex; | ||
flex-direction: column; | ||
align-self: center; | ||
align-items: center; | ||
justify-content: center; | ||
margin-left: 8px; | ||
|
||
h2, h3{ | ||
font-size: $size-base; | ||
font-weight: 700; | ||
line-height: 24px; | ||
letter-spacing: 0.05em; | ||
color: $color-bg; | ||
} | ||
} | ||
|
||
&-img { | ||
width: 65px; | ||
position: relative; | ||
top: -20px; | ||
align-self: stretch; | ||
} | ||
} | ||
|
||
&__button { | ||
margin: 0px 10px 10px; | ||
} | ||
} |
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