-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create product card #5125
base: master
Are you sure you want to change the base?
Create product card #5125
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -11,8 +11,53 @@ | |||||||||||||||||
rel="stylesheet" | ||||||||||||||||||
href="./styles/index.scss" | ||||||||||||||||||
/> | ||||||||||||||||||
<link | ||||||||||||||||||
href="https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap" | ||||||||||||||||||
rel="stylesheet" | ||||||||||||||||||
/> | ||||||||||||||||||
</head> | ||||||||||||||||||
<body> | ||||||||||||||||||
<h1>Product cards</h1> | ||||||||||||||||||
<div | ||||||||||||||||||
class="card" | ||||||||||||||||||
data-qa="card" | ||||||||||||||||||
> | ||||||||||||||||||
<div class="card__content"> | ||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||
<div class="card__item-image"></div> | ||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. use image tag to show imac picture. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thank you so much for review and suggestions, will fix it :) |
||||||||||||||||||
<div class="card__item"> | ||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This tag is redundant here, please remove it. |
||||||||||||||||||
<div class="card__item-name"> | ||||||||||||||||||
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A) | ||||||||||||||||||
</div> | ||||||||||||||||||
<div class="card__item-code">Product code: 195434</div> | ||||||||||||||||||
Comment on lines
+27
to
+30
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. use semantic tags for text. Please make it for everywhere.
Suggested change
|
||||||||||||||||||
</div> | ||||||||||||||||||
<div class="review"> | ||||||||||||||||||
<div class="review__star"> | ||||||||||||||||||
<div class="review__star-stars"></div> | ||||||||||||||||||
|
||||||||||||||||||
<div class="review__star-stars"></div> | ||||||||||||||||||
|
||||||||||||||||||
<div class="review__star-stars"></div> | ||||||||||||||||||
|
||||||||||||||||||
<div class="review__star-stars"></div> | ||||||||||||||||||
|
||||||||||||||||||
<div class="review__star-stars"></div> | ||||||||||||||||||
</div> | ||||||||||||||||||
|
||||||||||||||||||
<div class="review__comments">Reviews: 5</div> | ||||||||||||||||||
</div> | ||||||||||||||||||
|
||||||||||||||||||
<div class="price"> | ||||||||||||||||||
<div class="price__item">Price:</div> | ||||||||||||||||||
|
||||||||||||||||||
<div class="price__amount">$2,199</div> | ||||||||||||||||||
</div> | ||||||||||||||||||
|
||||||||||||||||||
<div | ||||||||||||||||||
class="buy" | ||||||||||||||||||
data-qa="hover" | ||||||||||||||||||
> | ||||||||||||||||||
<a class="buy__button">Buy</a> | ||||||||||||||||||
</div> | ||||||||||||||||||
Comment on lines
+54
to
+59
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use a link without div cover tag |
||||||||||||||||||
</div> | ||||||||||||||||||
</div> | ||||||||||||||||||
</body> | ||||||||||||||||||
</html> |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,87 @@ | ||||||
.card { | ||||||
width: 200px; | ||||||
height: 400px; | ||||||
margin: 40px; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this margin is redundant here, please remove it |
||||||
|
||||||
padding: 32px 19px 16px; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
border: 1px solid rgb(214, 212, 212); | ||||||
border-radius: 5px; | ||||||
box-sizing: border-box; | ||||||
align-items: center; | ||||||
|
||||||
&__item-image { | ||||||
background: no-repeat; | ||||||
background-image: url(../images/imac.jpeg); | ||||||
background-size: cover; | ||||||
|
||||||
height: 134px; | ||||||
} | ||||||
|
||||||
&__content { | ||||||
height: 100%; | ||||||
width: 100%; | ||||||
|
||||||
display: flex; | ||||||
flex-direction: column; | ||||||
justify-content: space-between; | ||||||
} | ||||||
|
||||||
&__item-name { | ||||||
font-size: 12px; | ||||||
font-weight: 500; | ||||||
} | ||||||
|
||||||
&__item-code { | ||||||
margin-top: 4px; | ||||||
font-size: 10px; | ||||||
color: $light-color-text; | ||||||
} | ||||||
} | ||||||
|
||||||
.review { | ||||||
display: flex; | ||||||
justify-content: space-between; | ||||||
|
||||||
&__comments { | ||||||
font-size: 10px; | ||||||
line-height: 14px; | ||||||
} | ||||||
} | ||||||
|
||||||
.price { | ||||||
display: flex; | ||||||
justify-content: space-between; | ||||||
|
||||||
&__item { | ||||||
color: $light-color-text; | ||||||
font-size: 12px; | ||||||
} | ||||||
|
||||||
&__amount { | ||||||
font-size: 16px; | ||||||
font-weight: 700; | ||||||
} | ||||||
} | ||||||
|
||||||
.buy { | ||||||
height: 40px; | ||||||
border-radius: 5px; | ||||||
|
||||||
color: white; | ||||||
text-transform: uppercase; | ||||||
|
||||||
background: $buy-button-color; | ||||||
|
||||||
font-size: 14px; | ||||||
font-weight: 700; | ||||||
text-align: center; | ||||||
align-content: center; | ||||||
|
||||||
&:hover { | ||||||
border: 1px solid $buy-button-color; | ||||||
background-color: white; | ||||||
color: $buy-button-color; | ||||||
box-sizing: border-box; | ||||||
} | ||||||
} |
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,15 @@ | ||||||||||||||||||||||||||||
.review__star { | ||||||||||||||||||||||||||||
display: flex; | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
&-stars { | ||||||||||||||||||||||||||||
background-image: url(../images/star.svg); | ||||||||||||||||||||||||||||
background-repeat: no-repeat; | ||||||||||||||||||||||||||||
width: 16px; | ||||||||||||||||||||||||||||
height: 16px; | ||||||||||||||||||||||||||||
padding: 2px; | ||||||||||||||||||||||||||||
Comment on lines
+4
to
+9
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
& .review__star-stars:nth-child(-n + 4) { | ||||||||||||||||||||||||||||
background-image: url(../images/star-active.svg); | ||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
@import './utils/variables'; | ||
@import './blocks/card'; | ||
@import './blocks/stars'; | ||
|
||
body { | ||
margin: 0; | ||
|
||
font-family: $main-font; | ||
line-height: $main-line-height; | ||
font-weight: $main-font-weight; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
$main-font: 'Roboto', 'Arial', sans-serif; | ||
$main-color-text: rgba(6, 11, 53, 1); | ||
$main-font-weight: 400; | ||
$light-color-text: rgba(97, 96, 112, 1); | ||
$buy-button-color: rgba(0, 172, 220, 1); | ||
$main-line-height: 18px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This tag is redundant here, please remove it.