-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a19f710
commit 6da5857
Showing
6 changed files
with
183 additions
and
6 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -1,18 +1,81 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<!-- # region head --> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta | ||
name="viewport" | ||
content="width=device-width, initial-scale=1.0" | ||
/> | ||
<title>Product cards</title> | ||
<title>Product 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: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" | ||
/> | ||
<link | ||
rel="stylesheet" | ||
href="./styles/index.scss" | ||
/> | ||
</head> | ||
<!-- # end region --> | ||
|
||
<body> | ||
<h1>Product cards</h1> | ||
<div | ||
class="product-card" | ||
data-qa="card" | ||
> | ||
<img | ||
src="images/imac.jpeg" | ||
alt="Computer" | ||
class="product-card__image" | ||
/> | ||
<h1 class="product-card__items product-card__items--title"> | ||
APPLE A1419 iMac 27" Retina | ||
<br /> | ||
5K Monoblock (MNED2UA/A) | ||
</h1> | ||
|
||
<h2 class="product-card__items product-card__items--product-code"> | ||
Product code: 195434 | ||
</h2> | ||
|
||
<div class="product-card__items product-card__items--position"> | ||
<div class="product-card__items-stars"> | ||
<div class="product-card__items-stars-star"></div> | ||
|
||
<div class="product-card__items-stars-star"></div> | ||
|
||
<div class="product-card__items-stars-star"></div> | ||
|
||
<div class="product-card__items-stars-star"></div> | ||
|
||
<div | ||
class="product-card__items-stars-star product-card__items-stars-star--not-active" | ||
></div> | ||
</div> | ||
<h2 class="product-card__items-reviews">Reviews: 5</h2> | ||
</div> | ||
|
||
<div class="product-card__items product-card__items--position"> | ||
<h2 class="product-card__price product-card__price--letters">Price:</h2> | ||
<h2 class="product-card__price product-card__price--numbers">$2,199</h2> | ||
</div> | ||
<a | ||
href="#" | ||
class="product-card__items product-card__items--link" | ||
data-qa="hover" | ||
> | ||
Buy | ||
</a> | ||
</div> | ||
</body> | ||
</html> |
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,90 @@ | ||
.product-card { | ||
width: 200px; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
border: 1px solid #f3f3f3; | ||
padding: 32px 16px 16px; | ||
} | ||
|
||
.product-card__items { | ||
display: flex; | ||
width: 100%; | ||
padding: 0; | ||
margin: 0; | ||
} | ||
|
||
.product-card__image { | ||
width: 160px; | ||
height: 134px; | ||
} | ||
|
||
.product-card__items--title { | ||
font-size: 12px; | ||
font-weight: 500; | ||
line-height: 18px; | ||
text-align: center; | ||
margin-top: 40px; | ||
} | ||
|
||
.product-card__items--product-code { | ||
display: flex; | ||
justify-content: flex-start; | ||
font-size: 10px; | ||
font-weight: 400; | ||
line-height: 14px; | ||
margin-top: 4px; | ||
} | ||
|
||
.product-card__items--position { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
} | ||
|
||
.product-card__items-reviews { | ||
font-size: 10px; | ||
font-weight: 400; | ||
line-height: 14px; | ||
} | ||
|
||
.product-card__price { | ||
display: flex; | ||
margin-top: 24px; | ||
} | ||
|
||
.product-card__price--letters { | ||
font-size: 12px; | ||
font-weight: 400; | ||
line-height: 18px; | ||
} | ||
|
||
.product-card__price--numbers { | ||
font-size: 16px; | ||
font-weight: 700; | ||
line-height: 18px; | ||
} | ||
|
||
.product-card__items--link { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
background-color: #00acdc; | ||
width: 166px; | ||
height: 40px; | ||
border-radius: 5px; | ||
font-size: 14px; | ||
font-weight: 700; | ||
line-height: 40px; | ||
text-align: center; | ||
text-transform: uppercase; | ||
text-decoration: none; | ||
color: #f3f3f3; | ||
} | ||
|
||
.product-card__items--link:hover { | ||
background-color: #f3f3f3; | ||
color: #00acdc; | ||
border: 1px solid #00acdc; | ||
border-radius: 5px; | ||
} |
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 |
---|---|---|
@@ -1,3 +1,10 @@ | ||
body { | ||
margin: 0; | ||
@import 'body'; | ||
@import 'stars'; | ||
|
||
* { | ||
box-sizing: border-box; | ||
} | ||
|
||
html { | ||
font-family: Roboto, sans-serif; | ||
} |
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,17 @@ | ||
.product-card__items-stars { | ||
display: flex; | ||
margin-top: 24px; | ||
} | ||
|
||
.product-card__items-stars-star { | ||
display: flex; | ||
background-image: url(../images/star-active.svg); | ||
background-repeat: no-repeat; | ||
background-position: center; | ||
width: 16px; | ||
height: 16px; | ||
} | ||
|
||
.product-card__items-stars-star--not-active { | ||
background-image: url(../images/star.svg); | ||
} |