-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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 task solution #4631
base: master
Are you sure you want to change the base?
add task solution #4631
Changes from 2 commits
cb0727f
c834bf4
c0515d5
5da603e
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,61 @@ | |
rel="stylesheet" | ||
href="./styles/index.scss" | ||
/> | ||
<link | ||
rel="preconnect" | ||
href="https://fonts.googleapis.com" | ||
/> | ||
<link | ||
rel="preconnect" | ||
href="https://fonts.gstatic.com" | ||
/> | ||
<link | ||
href="https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&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" | ||
> | ||
<img | ||
src="./images/imac.jpeg" | ||
alt="phtot of i-mac" | ||
class="card__photo" | ||
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 more informative alt 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. not fixed. 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. |
||
/> | ||
|
||
<div class="item"> | ||
<div class="item__name"> | ||
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A) | ||
</div> | ||
|
||
<div class="item__code">Product code: 195434</div> | ||
|
||
<div class="review"> | ||
<div class="stars stars--4"> | ||
<div class="stars__star"></div> | ||
<div class="stars__star"></div> | ||
<div class="stars__star"></div> | ||
<div class="stars__star"></div> | ||
<div class="stars__star"></div> | ||
</div> | ||
<div class="review__count">Reviews: 5</div> | ||
</div> | ||
|
||
<div class="item__price"> | ||
<div class="item__price-header">Price:</div> | ||
<div class="item__price-value">$2,199</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 semantic tags where possible instead of only divs |
||
</div> | ||
</div> | ||
|
||
<a | ||
href="#1" | ||
class="card__btn" | ||
data-qa="hover" | ||
> | ||
Buy | ||
</a> | ||
</div> | ||
</body> | ||
</html> |
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -1,3 +1,129 @@ | ||||||||||||||||||||||
$bc-image: url(/src/images/star-active.svg); | ||||||||||||||||||||||
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. do u need this variable?But why?u used it only once |
||||||||||||||||||||||
$btn-color: #00acdc; | ||||||||||||||||||||||
$main-acent: #060b35; | ||||||||||||||||||||||
$secondary: #616070; | ||||||||||||||||||||||
$btn-hover-color: #fff; | ||||||||||||||||||||||
|
||||||||||||||||||||||
body { | ||||||||||||||||||||||
margin: 0; | ||||||||||||||||||||||
font-family: Roboto, sans-serif; | ||||||||||||||||||||||
font-weight: 400; | ||||||||||||||||||||||
font-size: 10px; | ||||||||||||||||||||||
line-height: 14px; | ||||||||||||||||||||||
} | ||||||||||||||||||||||
|
||||||||||||||||||||||
.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. |
||||||||||||||||||||||
font-family: Roboto, sans-serif; | ||||||||||||||||||||||
font-weight: 400; | ||||||||||||||||||||||
font-size: 10px; | ||||||||||||||||||||||
line-height: 14px; | ||||||||||||||||||||||
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. do u need it?
Suggested change
|
||||||||||||||||||||||
|
||||||||||||||||||||||
box-sizing: border-box; | ||||||||||||||||||||||
width: 200px; | ||||||||||||||||||||||
border: 1px solid #f3f3f3; | ||||||||||||||||||||||
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 variables for all colors |
||||||||||||||||||||||
border-radius: 5px; | ||||||||||||||||||||||
padding: 32px 16px 16px; | ||||||||||||||||||||||
|
||||||||||||||||||||||
&__photo { | ||||||||||||||||||||||
display: block; | ||||||||||||||||||||||
margin: 0 auto 40px; | ||||||||||||||||||||||
width: 160px; | ||||||||||||||||||||||
height: 134px; | ||||||||||||||||||||||
} | ||||||||||||||||||||||
&__btn { | ||||||||||||||||||||||
display: flex; | ||||||||||||||||||||||
align-items: center; | ||||||||||||||||||||||
justify-content: center; | ||||||||||||||||||||||
color: #fff; | ||||||||||||||||||||||
text-transform: uppercase; | ||||||||||||||||||||||
text-decoration: none; | ||||||||||||||||||||||
font-size: 14px; | ||||||||||||||||||||||
font-weight: 700; | ||||||||||||||||||||||
line-height: 16px; | ||||||||||||||||||||||
|
||||||||||||||||||||||
width: 100%; | ||||||||||||||||||||||
height: 40px; | ||||||||||||||||||||||
box-sizing: border-box; | ||||||||||||||||||||||
border: 1px solid $btn-color; | ||||||||||||||||||||||
border-radius: 5px; | ||||||||||||||||||||||
background: $btn-color; | ||||||||||||||||||||||
|
||||||||||||||||||||||
&:hover { | ||||||||||||||||||||||
background: $btn-hover-color; | ||||||||||||||||||||||
color: $btn-color; | ||||||||||||||||||||||
} | ||||||||||||||||||||||
} | ||||||||||||||||||||||
} | ||||||||||||||||||||||
|
||||||||||||||||||||||
.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. What item is it? |
||||||||||||||||||||||
&__name { | ||||||||||||||||||||||
font-size: 12px; | ||||||||||||||||||||||
font-weight: 500; | ||||||||||||||||||||||
line-height: 18px; | ||||||||||||||||||||||
text-align: left; | ||||||||||||||||||||||
color: $main-acent; | ||||||||||||||||||||||
margin-bottom: 4px; | ||||||||||||||||||||||
} | ||||||||||||||||||||||
|
||||||||||||||||||||||
&__code { | ||||||||||||||||||||||
line-height: 14px; | ||||||||||||||||||||||
text-align: left; | ||||||||||||||||||||||
margin-bottom: 16px; | ||||||||||||||||||||||
color: $secondary; | ||||||||||||||||||||||
} | ||||||||||||||||||||||
|
||||||||||||||||||||||
&__price { | ||||||||||||||||||||||
display: flex; | ||||||||||||||||||||||
justify-content: space-between; | ||||||||||||||||||||||
line-height: 18px; | ||||||||||||||||||||||
margin-bottom: 16px; | ||||||||||||||||||||||
color: $secondary; | ||||||||||||||||||||||
|
||||||||||||||||||||||
&-value { | ||||||||||||||||||||||
font-size: 16px; | ||||||||||||||||||||||
font-weight: 700; | ||||||||||||||||||||||
text-align: right; | ||||||||||||||||||||||
color: #060b35; | ||||||||||||||||||||||
} | ||||||||||||||||||||||
|
||||||||||||||||||||||
&-header { | ||||||||||||||||||||||
font-size: 12px; | ||||||||||||||||||||||
text-align: left; | ||||||||||||||||||||||
color: #616070; | ||||||||||||||||||||||
} | ||||||||||||||||||||||
} | ||||||||||||||||||||||
} | ||||||||||||||||||||||
|
||||||||||||||||||||||
.stars { | ||||||||||||||||||||||
display: flex; | ||||||||||||||||||||||
flex-direction: row; | ||||||||||||||||||||||
|
||||||||||||||||||||||
&__star { | ||||||||||||||||||||||
background-image: url(/src/images/star.svg); | ||||||||||||||||||||||
background-position: center; | ||||||||||||||||||||||
height: 16px; | ||||||||||||||||||||||
margin-right: 4px; | ||||||||||||||||||||||
width: 16px; | ||||||||||||||||||||||
background-repeat: no-repeat; | ||||||||||||||||||||||
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
u can use just background for it |
||||||||||||||||||||||
} | ||||||||||||||||||||||
|
||||||||||||||||||||||
&.stars--4 :nth-child(-n + 4) { | ||||||||||||||||||||||
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. It should be the same functionality as in the |
||||||||||||||||||||||
background-image: $bc-image; | ||||||||||||||||||||||
} | ||||||||||||||||||||||
|
||||||||||||||||||||||
& :last-of-type { | ||||||||||||||||||||||
margin: 0; | ||||||||||||||||||||||
} | ||||||||||||||||||||||
} | ||||||||||||||||||||||
|
||||||||||||||||||||||
.review { | ||||||||||||||||||||||
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. |
||||||||||||||||||||||
display: flex; | ||||||||||||||||||||||
justify-content: space-between; | ||||||||||||||||||||||
align-items: center; | ||||||||||||||||||||||
margin-bottom: 24px; | ||||||||||||||||||||||
|
||||||||||||||||||||||
&__count { | ||||||||||||||||||||||
text-align: right; | ||||||||||||||||||||||
color: $main-acent; | ||||||||||||||||||||||
} | ||||||||||||||||||||||
} |
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 only the fonts u need. u only use a couple of fonts, but u import them all