-
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
add tast solution #5192
base: master
Are you sure you want to change the base?
add tast solution #5192
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
<!-- #region head --> | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
|
@@ -7,12 +8,37 @@ | |
content="width=device-width, initial-scale=1.0" | ||
/> | ||
<title>Product cards</title> | ||
<link rel="preconnect" href="https://fonts.googleapis.com"> | ||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> | ||
<link href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap" rel="stylesheet"> | ||
<link | ||
rel="stylesheet" | ||
href="./styles/index.scss" | ||
href="./styles/index.css" | ||
/> | ||
</head> | ||
<!-- #endregion --> | ||
<body> | ||
<h1>Product cards</h1> | ||
<div class="card" data-qa="card"> | ||
<div class="card__image"></div> | ||
<div class="card__info"> | ||
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. remove this redundant container |
||
<div class="card__name">APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)</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 h3 tag for card title |
||
<div class="card__code">Product code: 195434</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 paragraph tag for other text |
||
<div class="card__rating"> | ||
<div class="card__stars"> | ||
<div class="card__star"></div> | ||
<div class="card__star"></div> | ||
<div class="card__star"></div> | ||
<div class="card__star"></div> | ||
<div class="card__star"></div> | ||
</div> | ||
Comment on lines
+27
to
+33
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. reuse stars block from previous task |
||
<div class="card__reviews">Reviews: 5</div> | ||
</div> | ||
<div class="card__price"> | ||
<div class="card__priceText">Price:</div> | ||
<div class="card__priceValue">$2,199</div> | ||
</div> | ||
<div class="card__button" data-qa="hover">Buy</div> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,3 +1,130 @@ | ||||||
$font-size: 10px; | ||||||
|
||||||
body { | ||||||
margin: 0; | ||||||
font-family: Roboto, sans-serif; | ||||||
} | ||||||
|
||||||
.card { | ||||||
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. Add border for card element. |
||||||
box-sizing: border-box; | ||||||
width: 200px; | ||||||
height: 408px; | ||||||
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. Remove hardcoded height. It should be setted by elements inside card |
||||||
display: flex; | ||||||
flex-direction: column; | ||||||
align-items: center; | ||||||
|
||||||
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
|
||||||
&__image { | ||||||
margin-top: 32px; | ||||||
box-sizing: border-box; | ||||||
background-image: url(../images/imac.jpeg); | ||||||
background-size: cover; | ||||||
width: 160px; | ||||||
height: 134px; | ||||||
} | ||||||
|
||||||
&__info { | ||||||
box-sizing: border-box; | ||||||
display: flex; | ||||||
flex-direction: column; | ||||||
margin-left: 17px; | ||||||
margin-right: 17px; | ||||||
Comment on lines
+29
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. This margins should be removed. Just use padding for card element instead |
||||||
} | ||||||
|
||||||
&__name { | ||||||
margin-top: 40px; | ||||||
font-size: $font-size * 1.2; | ||||||
font-weight: 500; | ||||||
line-height: $font-size * 1.8; | ||||||
text-align: left; | ||||||
color: #000000; | ||||||
} | ||||||
|
||||||
&__code { | ||||||
font-size: 10px; | ||||||
font-weight: 400; | ||||||
line-height: $font-size * 1.4; | ||||||
text-align: left; | ||||||
color: #616070; | ||||||
margin-top: 4px; | ||||||
} | ||||||
|
||||||
.&__rating { | ||||||
margin-top: 16px; | ||||||
display: flex; | ||||||
justify-content: space-between; | ||||||
} | ||||||
|
||||||
&__stars { | ||||||
display: flex; | ||||||
flex-direction: row; | ||||||
justify-content: space-between; | ||||||
} | ||||||
|
||||||
.&__star { | ||||||
box-sizing: border-box; | ||||||
width: 16px; | ||||||
height: 16px; | ||||||
background-image: url(../images/star.svg); | ||||||
background-repeat: no-repeat; | ||||||
background-size: cover; | ||||||
display: flex; | ||||||
flex-direction: row; | ||||||
margin-right: 4px; | ||||||
} | ||||||
|
||||||
.&__reviews { | ||||||
font-size: $font-size; | ||||||
font-weight: 400; | ||||||
line-height: $font-size * 1.4; | ||||||
text-align: right; | ||||||
} | ||||||
|
||||||
.&__price { | ||||||
margin-top: 24px; | ||||||
display: flex; | ||||||
flex-direction: row; | ||||||
justify-content: space-between; | ||||||
} | ||||||
|
||||||
.&__priceText { | ||||||
font-size: $font-size * 1.2; | ||||||
font-weight: 400; | ||||||
line-height: $font-size * 1.8; | ||||||
color: #616070; | ||||||
} | ||||||
|
||||||
.&__priceValue { | ||||||
font-size: $font-size * 1.6; | ||||||
font-weight: 700; | ||||||
line-height: $font-size * 1.8; | ||||||
color: #060B35; | ||||||
} | ||||||
|
||||||
&__button { | ||||||
box-sizing: border-box; | ||||||
margin-top: 16px; | ||||||
background-color: #00ACDC; | ||||||
font-size: $font-size * 1.4; | ||||||
line-height: $font-size * 1.6; | ||||||
width: 166px; | ||||||
height: 40px; | ||||||
border-radius: 5px; | ||||||
display: flex; | ||||||
justify-content: center; | ||||||
align-items: center; | ||||||
color: #FFFFFF; | ||||||
text-transform: uppercase; | ||||||
} | ||||||
} | ||||||
|
||||||
.card .card__star:nth-child(-n+4) { | ||||||
background-image: url(../images/star-active.svg); | ||||||
} | ||||||
Comment on lines
+120
to
+122
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. Reuse styles for stars from previous task. Also use separate file for them |
||||||
|
||||||
.card__button:hover { | ||||||
box-sizing: border-box; | ||||||
background-color: #FFFFFF; | ||||||
color: #00ACDC; | ||||||
border-radius: 5px; | ||||||
border: 1px solid #00ACDC | ||||||
} |
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.
use semantic tag image to display card picture