-
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 #4875
add task solution #4875
Changes from 1 commit
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 |
---|---|---|
|
@@ -7,12 +7,65 @@ | |
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" | ||
/> | ||
<link | ||
href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500&display=swap" | ||
rel="stylesheet" | ||
/> | ||
<link | ||
rel="stylesheet" | ||
href="./styles/index.scss" | ||
/> | ||
</head> | ||
<body> | ||
<h1>Product cards</h1> | ||
<div | ||
class="product-card" | ||
data-qa="card" | ||
> | ||
<img | ||
src="/src/images/imac.jpeg" | ||
alt="prodact img" | ||
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. There is a typo in the alt attribute. It should be 'product img' instead of 'prodact img'. 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. |
||
class="product-card__image" | ||
/> | ||
<div class="product-card__product-title"> | ||
<span>APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)</span> | ||
</div> | ||
|
||
<div class="product-card__product-code"> | ||
<span class="product-card__code">Product code: 195434</span> | ||
</div> | ||
|
||
<div class="product-card__reviews"> | ||
<div class="product-card__stars"> | ||
<span class="product-card__star"></span> | ||
<span class="product-card__star"></span> | ||
<span class="product-card__star"></span> | ||
<span class="product-card__star"></span> | ||
<span class="product-card__star"></span> | ||
|
||
<span class="product-card__reviws-count">Reviews: 5</span> | ||
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. There is a typo in the class name 'product-card__reviws-count'. It should be 'product-card__reviews-count'. |
||
</div> | ||
</div> | ||
|
||
<div class="product-card__cost"> | ||
<span class="product-card__price-label">Price:</span> | ||
<span class="product-card__price">$2,199</span> | ||
</div> | ||
<a | ||
href="#" | ||
class="product-card__button-buy" | ||
data-qa="hover" | ||
> | ||
Buy | ||
</a> | ||
<section></section> | ||
</div> | ||
</body> | ||
</html> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,123 @@ | ||
* { | ||
box-sizing: border-box; | ||
} | ||
|
||
body { | ||
margin: 0; | ||
padding: 0; | ||
font-family: Roboto, Arial, sans-serif; | ||
} | ||
|
||
.product-card { | ||
width: 200px; | ||
height: 408px; | ||
border: 1px solid #f3f3f3; | ||
border-radius: 5px; | ||
background-color: #fff; | ||
|
||
&__image { | ||
display: flex; | ||
margin: 32px 19px 40px; | ||
width: 160px; | ||
height: 134px; | ||
} | ||
|
||
&__product-title { | ||
margin: 0 16px 4px; | ||
font-size: 12px; | ||
line-height: 18px; | ||
font-weight: 500; | ||
} | ||
|
||
&__product-code { | ||
display: flex; | ||
margin: 0 0 16px 16px; | ||
} | ||
|
||
&__code { | ||
font-weight: 400; | ||
font-size: 10px; | ||
line-height: 14px; | ||
color: #616070; | ||
} | ||
|
||
&__stars { | ||
display: flex; | ||
margin-left: 16px; | ||
} | ||
|
||
&__star { | ||
background-image: url(/src/images/star-active.svg); | ||
width: 16px; | ||
height: 16px; | ||
background-size: contain; | ||
background-repeat: no-repeat; | ||
} | ||
|
||
&__star:not(:first-child) { | ||
margin-left: 4px; | ||
} | ||
|
||
&__star:nth-child(n + 5) { | ||
background-image: url(/src/images/star.svg); | ||
} | ||
|
||
&__reviws-count { | ||
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. There is a typo in the class name |
||
display: flex; | ||
align-items: center; | ||
margin: 0 16px 0 17px; | ||
font-weight: 400; | ||
font-size: 10px; | ||
line-height: 14px; | ||
} | ||
|
||
&__cost { | ||
display: flex; | ||
justify-content: space-between; | ||
margin: 24px 16px 0; | ||
} | ||
|
||
&__price-label { | ||
font-weight: 400; | ||
font-size: 12px; | ||
line-height: 18px; | ||
color: #616070; | ||
} | ||
|
||
&__price { | ||
font-weight: 700; | ||
font-size: 16px; | ||
line-height: 18px; | ||
color: #060b35; | ||
} | ||
|
||
&__button-buy { | ||
display: flex; | ||
align-items: center; | ||
margin: 16px; | ||
padding: 12px 70px; | ||
border-radius: 5px; | ||
background-color: #00acdc; | ||
text-transform: uppercase; | ||
text-decoration: none; | ||
color: #fff; | ||
font-weight: 700; | ||
font-size: 14px; | ||
line-height: 16px; | ||
} | ||
|
||
&__button-buy:hover { | ||
display: flex; | ||
margin: 16px; | ||
padding: 12px 70px; | ||
border-radius: 5px; | ||
border: 1px solid #00acdc; | ||
background-color: #fff; | ||
text-transform: uppercase; | ||
text-decoration: none; | ||
color: #00acdc; | ||
font-weight: 700; | ||
font-size: 14px; | ||
line-height: 16px; | ||
} | ||
} |
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.
The stylesheet link should point to a CSS file, not an SCSS file. SCSS files need to be compiled to CSS before they can be linked in HTML.